diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fdbd83cb01..8a7997cd54 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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() diff --git a/ruff.toml b/ruff.toml index b5ba290538..5acb78ea3b 100644 --- a/ruff.toml +++ b/ruff.toml @@ -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 diff --git a/setuptools/warnings.py b/setuptools/warnings.py index 8a5969ba25..e677460a84 100644 --- a/setuptools/warnings.py +++ b/setuptools/warnings.py @@ -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) @@ -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 {}),