Skip to content

Commit 8419f00

Browse files
authored
Merge pull request #5356 from pypa/skeleton-ruff-0.16
Merge jaraco/skeleton; fix the Ruff 0.17 unused-noqa failure
2 parents 4e612f9 + 6dadc86 commit 8419f00

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
with:
7474
platform: ubuntu-latest
7575
tox-env: ${{ matrix.job }}
76+
secrets: inherit
7677

7778
check: # This job does nothing and is only used for the branch protection
7879
if: always()

‎ruff.toml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@ ignore = [
4646
"COM812",
4747
"COM819",
4848

49+
# N999 (invalid-module-name) yields false positives when a project's
50+
# source directory is the distribution name and is redirected to a
51+
# different import package (e.g. namespace layouts); the dotted directory
52+
# name is itself a valid module. See
53+
# https://github.com/astral-sh/ruff/issues/27801.
54+
"N999",
55+
56+
# B008 is over-reaching; see jaraco/skeleton#214
57+
"B008", # function-call-in-default-argument
58+
59+
# PLC0414 flags `import X as X`, the idiom type checkers recognize as an
60+
# explicit re-export, and its fix (with F401) silently drops public names.
61+
# See jaraco/skeleton#210.
62+
"PLC0414", # useless-import-alias
63+
4964
# local
5065
"PERF203", # try-except-in-loop, micro-optimisation with many false-positive. Worth checking but don't block CI
5166
"PT007", # temporarily disabled, TODO: configure and standardize to preference

‎setuptools/warnings.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def emit(
4747
due = date(*due_date) if due_date else None
4848

4949
text = cls._format(summary_, details_, due, see_url or docs_url, kwargs)
50-
if due and due < date.today() and _should_enforce(): # noqa: DTZ011 # local date intended for due-date comparison
50+
if due and due < date.today() and _should_enforce():
5151
raise cls(text)
5252
warnings.warn(text, cls, stacklevel=stacklevel + 1)
5353

@@ -61,7 +61,7 @@ def _format(
6161
format_args: dict | None = None,
6262
) -> str:
6363
"""Private: reserved for ``setuptools`` internal use only"""
64-
today = date.today() # noqa: DTZ011 # local date intended for due-date comparison
64+
today = date.today()
6565
summary = cleandoc(summary).format_map(format_args or {})
6666
possible_parts = [
6767
cleandoc(details).format_map(format_args or {}),

0 commit comments

Comments
 (0)