Skip to content

Sync with skeleton and adapt to ruff 0.16 defaults - #163

Merged
jaraco merged 22 commits into
mainfrom
skeleton-update
Oct 3, 2026
Merged

jaraco merged 22 commits into
mainfrom
skeleton-update

Conversation

@jaraco

@jaraco jaraco commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Brings zipp up to date with jaraco/skeleton and repairs the lint regressions from ruff 0.16's expanded default rules (jaraco/skeleton#210).

Skeleton

  • Merges skeleton main, including the C408 configuration (dict(a=1) allowed), N999/B008/PLC0414 ignores, and the reusable test-suite workflow.
  • Merges Ignore B018 (useless-expression) skeleton#220 (ignore B018) ahead of its landing upstream; the change is identical, so a later skeleton merge will be a no-op for ruff.toml.

Fixes for new ruff defaults

Per jaraco/skeleton#210, violations are fixed rather than suppressed:

  • UP036: removed conftest.py and tests/compat/py38.py, shims only relevant to Python ≤3.9.
  • C408: dict() → {} in tests/compat/py313.py.
  • PLW0642: CompleteDirs.make no longer reassigns cls.
  • RUF059: unused unpacked names marked with _ or collapsed to *_; test_mutability retains an explicit entry-count check before mutating.
  • SIM117: combined nested with statements.
  • RUF100: dropped noqa: F821 on EncodingWarning, now a known builtin.

tox (tests, ruff, mypy, coverage) and tox -e docs pass locally.

🤖 Generated with Claude Code

jaraco and others added 21 commits July 12, 2026 12:51
PyPy 3.10 no longer has wheels for cryptography and other Rust-built
extensions, so projects pulling them transitively fail the pypy job.

Closes jaraco/skeleton#205

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CFFI does not support the free-threaded build of CPython 3.13, breaking
any project that depends transitively on cffi/cryptography. Free-threaded
3.14+ is supported, so 3.14t remains.

Closes jaraco/skeleton#206

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
… collateral (jaraco/skeleton#199)

* Initial plan

* Add reusable workflow to share test/collateral setup steps

Agent-Logs-Url: https://github.com/jaraco/skeleton/sessions/ae6f447e-da11-4a46-a8d7-23cdbbffe148

Co-authored-by: jaraco <308610+jaraco@users.noreply.github.com>

* Remove duplicated env block from main.yml

Agent-Logs-Url: https://github.com/jaraco/skeleton/sessions/35bde516-10a9-4b0d-8c1f-6daa390f7011

Co-authored-by: jaraco <308610+jaraco@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jaraco <308610+jaraco@users.noreply.github.com>
… first step

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…skeleton#209)

A job that calls a reusable workflow may not set 'continue-on-error';
GitHub rejects the whole file at startup ("Unexpected value
'continue-on-error'") before creating any jobs. The reusable-workflow
refactor in jaraco/skeleton#199 moved the 'test' job to a reusable-workflow
call while keeping the job-level 'continue-on-error', taking CI dark on
skeleton and every downstream project that has since merged.

Set continue-on-error on the reusable workflow's run job instead, keyed
on the pre-release Python version already special-cased there. This
preserves the allow-3.15-to-fail behavior in a single file, without
threading an extra input through the caller.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Retain the dict(a=1) call style as an elegant alternative to
string-keyed literals rather than have Ruff 0.16's new default rewrite
it. Ref jaraco/skeleton#210.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Switch from ignoring C408 (unnecessary-collection-call) entirely to
enabling flake8-comprehensions allow-dict-calls-with-keyword-arguments,
which retains the preferred dict(a=1) keyword-call style while C408 still
flags dict() and dict([...]). Suggested by @Avasam; matches the
configuration in pypa/setuptools#4785. Ref jaraco/skeleton#210.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ruff 0.16 flags N999 for projects whose source directory is the
distribution name and is redirected to a different import package (e.g.
namespace layouts, as used throughout coherent-oss), even though that
dotted name is a valid module. Reported upstream as astral-sh/ruff#27801;
ignore it here rather than carry a per-file noqa in every such project.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
B006 already catches shared mutable defaults; B008 flags every call
regardless of mutability, and escaping it requires enumerating
fully-qualified names in each downstream project.

Closes jaraco/skeleton#214

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Ref jaraco/skeleton#210.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Addresses UP036 now that requires-python is >=3.10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…059).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RUF059, SIM117, B018, and RUF100 (EncodingWarning is now a known builtin).
Ref jaraco/skeleton#210.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ref jaraco/skeleton#112, jaraco/skeleton#210.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread tests/test_path.py Outdated
"""
root = zipfile.Path(alpharep)
a, n, b, g, j = root.iterdir()
assert len(list(root.iterdir())) == 5

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is meaningfully different than the one it replaced. In the one it replaced, the letters represented the different expected paths and even though we didn't assert they matched, they provided a meaningful link to the source structure. Let's revert this change and suppress the nuisance alert (same for other references to alpharep).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we want to use _a, _b, ... =. I'm not really sure if that's better than suppressing the check. Just pick one.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored a, n, b, g, j in all five alpharep unpackings with # noqa: RUF059. I picked suppression over _-prefixes so the lines stay identical to the originals (and CPython's copy) apart from the comment. 759663e

The names mirror the alpharep fixture structure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jaraco
jaraco merged commit f5078d5 into main Oct 3, 2026
32 checks passed
@jaraco
jaraco deleted the skeleton-update branch October 3, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants