Skip to content

Commit 788309c

Browse files
authored
Merge pull request #243 from Neradoc/ruff-preview-enable
enable preview mode for ruff
2 parents e1f081f + 9c0bde6 commit 788309c

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

{{ cookiecutter.__dirname }}/docs/{% if cookiecutter.sphinx_docs in ['y', 'yes'] %}conf.py{% endif %}

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
# -*- coding: utf-8 -*-
2-
31
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
42
#
53
# SPDX-License-Identifier: MIT
64

5+
import datetime
76
import os
87
import sys
9-
import datetime
108

119
sys.path.insert(0, os.path.abspath(".."))
1210

@@ -34,10 +32,10 @@ autodoc_preserve_defaults = True
3432

3533
intersphinx_mapping = {
3634
"python": ("https://docs.python.org/3", None),
37-
{%- if cookiecutter.requires_bus_device in ["y", "yes"] -%}
35+
{% if cookiecutter.requires_bus_device in ["y", "yes"] -%}
3836
"BusDevice": ("https://docs.circuitpython.org/projects/busdevice/en/latest/", None),
39-
{% endif %}
40-
{%- if cookiecutter.requires_register in ["y", "yes"] -%}
37+
{%- endif %}
38+
{% if cookiecutter.requires_register in ["y", "yes"] -%}
4139
"Register": ("https://docs.circuitpython.org/projects/register/en/latest/", None),
4240
{%- endif %}
4341
"CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
@@ -59,9 +57,7 @@ project = "{% if cookiecutter.target_bundle != 'CircuitPython Org' %}{% if cooki
5957
creation_year = "{% now 'utc', '%Y' %}"
6058
current_year = str(datetime.datetime.now().year)
6159
year_duration = (
62-
current_year
63-
if current_year == creation_year
64-
else creation_year + " - " + current_year
60+
current_year if current_year == creation_year else creation_year + " - " + current_year
6561
)
6662
copyright = year_duration + " {{ cookiecutter.author_name }}"
6763
author = "{{ cookiecutter.author_name }}"

{{ cookiecutter.__dirname }}/ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ target-version = "py38"
66
line-length = 100
77

88
[lint]
9+
preview = true
910
select = ["I", "PL", "UP"]
1011

1112
extend-select = [

0 commit comments

Comments
 (0)