Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
with:
platform: ubuntu-latest
tox-env: ${{ matrix.job }}
secrets: inherit

check: # This job does nothing and is only used for the branch protection
if: always()
Expand Down
15 changes: 15 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ ignore = [
"COM812",
"COM819",

# N999 (invalid-module-name) yields false positives when a project's
# source directory is the distribution name and is redirected to a
# different import package (e.g. namespace layouts); the dotted directory
# name is itself a valid module. See
# https://github.com/astral-sh/ruff/issues/27801.
"N999",

# B008 is over-reaching; see jaraco/skeleton#214
"B008", # function-call-in-default-argument

# PLC0414 flags `import X as X`, the idiom type checkers recognize as an
# explicit re-export, and its fix (with F401) silently drops public names.
# See jaraco/skeleton#210.
"PLC0414", # useless-import-alias

# local
"PERF203", # try-except-in-loop, micro-optimisation with many false-positive. Worth checking but don't block CI
"PT007", # temporarily disabled, TODO: configure and standardize to preference
Expand Down
4 changes: 2 additions & 2 deletions setuptools/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def emit(
due = date(*due_date) if due_date else None

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

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