Thanks to visit codestin.com
Credit goes to github.com

Skip to content

enable preview mode for ruff #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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(".."))

Expand Down Expand Up @@ -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),
Expand All @@ -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 }}"
Expand Down
1 change: 1 addition & 0 deletions {{ cookiecutter.__dirname }}/ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ target-version = "py38"
line-length = 100

[lint]
preview = true
select = ["I", "PL", "UP"]

extend-select = [
Expand Down
Loading