diff --git a/{{ cookiecutter.__dirname }}/docs/{% if cookiecutter.sphinx_docs in ['y', 'yes'] %}conf.py{% endif %} b/{{ cookiecutter.__dirname }}/docs/{% if cookiecutter.sphinx_docs in ['y', 'yes'] %}conf.py{% endif %} index fbc00ea..cadb1e9 100644 --- a/{{ cookiecutter.__dirname }}/docs/{% if cookiecutter.sphinx_docs in ['y', 'yes'] %}conf.py{% endif %} +++ b/{{ cookiecutter.__dirname }}/docs/{% if cookiecutter.sphinx_docs in ['y', 'yes'] %}conf.py{% endif %} @@ -1,12 +1,10 @@ -# -*- coding: utf-8 -*- - # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries # # SPDX-License-Identifier: MIT +import datetime import os import sys -import datetime sys.path.insert(0, os.path.abspath("..")) @@ -34,10 +32,10 @@ autodoc_preserve_defaults = True intersphinx_mapping = { "python": ("https://docs.python.org/3", None), - {%- if cookiecutter.requires_bus_device in ["y", "yes"] -%} + {% if cookiecutter.requires_bus_device in ["y", "yes"] -%} "BusDevice": ("https://docs.circuitpython.org/projects/busdevice/en/latest/", None), - {% endif %} - {%- if cookiecutter.requires_register in ["y", "yes"] -%} + {%- endif %} + {% if cookiecutter.requires_register in ["y", "yes"] -%} "Register": ("https://docs.circuitpython.org/projects/register/en/latest/", None), {%- endif %} "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None), @@ -59,9 +57,7 @@ project = "{% if cookiecutter.target_bundle != 'CircuitPython Org' %}{% if cooki creation_year = "{% now 'utc', '%Y' %}" current_year = str(datetime.datetime.now().year) year_duration = ( - current_year - if current_year == creation_year - else creation_year + " - " + current_year + current_year if current_year == creation_year else creation_year + " - " + current_year ) copyright = year_duration + " {{ cookiecutter.author_name }}" author = "{{ cookiecutter.author_name }}" diff --git a/{{ cookiecutter.__dirname }}/ruff.toml b/{{ cookiecutter.__dirname }}/ruff.toml index db37c83..970c292 100644 --- a/{{ cookiecutter.__dirname }}/ruff.toml +++ b/{{ cookiecutter.__dirname }}/ruff.toml @@ -6,6 +6,7 @@ target-version = "py38" line-length = 100 [lint] +preview = true select = ["I", "PL", "UP"] extend-select = [