-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implement copyright notice detection #4701
Implement copyright notice detection #4701
Conversation
@@ -154,6 +160,24 @@ pub(crate) fn check_physical_lines( | |||
diagnostics.push(diagnostic); | |||
} | |||
} | |||
if enforce_copyright_header && !checked_copyright_header_absent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also do dep injection here and pass regexp as an arg. However, that would essentially put all the logic in physical_lines.rs. Let me know which you would prefer
8f85de1
to
0e2c5bb
Compare
PR Check ResultsBenchmarkLinux
Windows
|
0095fc8
to
b54b536
Compare
Signed-off-by: ryan <ryang@waabi.ai>
b54b536
to
5d4dc6f
Compare
Hi, I made a first stab at implementing #4701 flake8-copyright However, it seems like the "pre-commit" check in CI is failing due to a lack of copyright headers on some python files in the scripts directory https://github.com/charliermarsh/ruff/actions/runs/5115146921/jobs/9196121487?pr=4701 When I tried adding noqa, when emulating CI and running the command locally, it would overwrite my changes. |
Sorry if this was documented somewhere/asked again, but wondering if there's a group of people to assign as reviewers for PR's? |
crates/ruff/src/rules/flake8_copyright/rules/copyright_header_absent.rs
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/flake8_copyright/rules/copyright_header_absent.rs
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/flake8_copyright/rules/copyright_header_absent.rs
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/flake8_copyright/rules/copyright_header_absent.rs
Outdated
Show resolved
Hide resolved
df4c283
to
3a3a8ff
Compare
3a3a8ff
to
d7ca0db
Compare
crates/ruff/src/rules/flake8_copyright/rules/copyright_header_absent.rs
Outdated
Show resolved
Hide resolved
e493ec4
to
248f020
Compare
248f020
to
a18b4d8
Compare
Addressed comments. This PR should be good for re-review. However, the CI problem still lingers. I tried adding |
Sorry, missed that question -- can we add |
TIL nested pyproject.toml. Neat! |
addressed all comments. Wondering if @charliermarsh or @MichaReiser could re-review please? |
## Summary Add copyright notice detection to enforce the presence of copyright headers in Python files. Configurable settings include: the relevant regular expression, the author name, and the minimum file size, similar to [flake8-copyright](https://github.com/savoirfairelinux/flake8-copyright). Closes #3579 --------- Signed-off-by: ryan <ryang@waabi.ai> Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
Hi! Cool to see a another new rule has landed. Two comments - as seen in 0.0.237:
|
Thanks for this. I had intentionally renamed to "Copyright-related rules" but perhaps that was a mistake. (I think it's probably a bug that |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://beta.ruff.rs/docs) ([source](https://github.com/astral-sh/ruff), [changelog](https://github.com/astral-sh/ruff/releases)) | `^0.0.272` -> `^0.0.273` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>astral-sh/ruff</summary> ### [`v0.0.273`](https://github.com/astral-sh/ruff/releases/tag/v0.0.273) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.272...v0.0.273) <!-- Release notes generated using configuration in .github/release.yml at main --> ##### What's Changed Highlights include: - Autofix capabilities for rules like `flake8-import-conventions`, which require symbol renames across a file. - Significant decrease in Ruff's cache size (e.g., a ~50% decrease for FastAPI). - Dozens and dozens of bug fixes + performance improvements. ##### Rules - \[`copyright`] Implement copyright notice detection by [@​Ryang20718](https://github.com/Ryang20718) in [https://github.com/astral-sh/ruff/pull/4701](https://github.com/astral-sh/ruff/pull/4701) - \[`flake8-datetimez`] Enable UTC-import for `datetime-utc-alias` fix by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5100](https://github.com/astral-sh/ruff/pull/5100) - \[`flake8-implicit-str-concat`] Add autofix for `ISC001` by [@​tkukushkin](https://github.com/tkukushkin) in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - \[`flake8-import-conventions`] Enable autofix for unconventional imports rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5152](https://github.com/astral-sh/ruff/pull/5152) - \[`flake8-pyi`] Add autofix for `Set`-to-`AbstractSet` rewrite using reference tracking by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5074](https://github.com/astral-sh/ruff/pull/5074) - \[`flake8-pyi`] Implement PYI044 by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - \[`flake8-return`] Extend revised `RET504` implementation to `with` statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4998](https://github.com/astral-sh/ruff/pull/4998) - \[`flake8-return`] Implement autofix for revised `RET504` rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4999](https://github.com/astral-sh/ruff/pull/4999) - \[`flake8-return`] Refactor `RET504` to only enforce assignment-then-return pattern by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4997](https://github.com/astral-sh/ruff/pull/4997) - \[`flake8-slots`] Add plugin, add `SLOT000`, `SLOT001` and `SLOT002` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4909](https://github.com/astral-sh/ruff/pull/4909) - \[`perflint`] Add `perflint` plugin, add first rule `PERF102` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4821](https://github.com/astral-sh/ruff/pull/4821) - \[`pylint`] Add Pylint rule `comparison-with-itself` (`R0124`) by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/4957](https://github.com/astral-sh/ruff/pull/4957) - \[`pyupgrade`] Add a rule to remove unnecessary parentheses in class definitions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5032](https://github.com/astral-sh/ruff/pull/5032) - \[`ruff`] Add a rule for static keys in dict comprehensions by [@​rodjunger](https://github.com/rodjunger) in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - \[`ruff`] Add rule to disallow implicit optional with autofix by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4831](https://github.com/astral-sh/ruff/pull/4831) - \[`ruff`] Expand RUF008 to all classes, but to a new code (RUF012) by [@​adampauls](https://github.com/adampauls) in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - \[`ruff`] Remove unannotated attributes from RUF008 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5049](https://github.com/astral-sh/ruff/pull/5049) - \[`ruff`] Upgrade explicit-type-conversion rule (`RUF010`) to remove unnecessary `str` calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4971](https://github.com/astral-sh/ruff/pull/4971) ##### Settings - Option (`-o`/`--output-file`) to write output to a file by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4950](https://github.com/astral-sh/ruff/pull/4950) - Add JSON Lines (NDJSON) message serialization by [@​akx](https://github.com/akx) in [https://github.com/astral-sh/ruff/pull/5048](https://github.com/astral-sh/ruff/pull/5048) - Add rule documentation URL to JSON output by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5187](https://github.com/astral-sh/ruff/pull/5187) ##### Caching - Only use a single cache file per Python package by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5117](https://github.com/astral-sh/ruff/pull/5117) - Open cache files in parallel by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5120](https://github.com/astral-sh/ruff/pull/5120) ##### Jupyter - Add support for auto-fix in Jupyter notebooks by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4665](https://github.com/astral-sh/ruff/pull/4665) - Add roundtrip support for Jupyter notebook by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5028](https://github.com/astral-sh/ruff/pull/5028) ##### Bug Fixes - Handle decorators in class-parenthesis-modifying rules by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5034](https://github.com/astral-sh/ruff/pull/5034) - Allow re-assignments to `__all__` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4967](https://github.com/astral-sh/ruff/pull/4967) - Handled dict and set inside f-string ([#​4249](https://github.com/astral-sh/ruff/issues/4249)) by [@​DavideCanton](https://github.com/DavideCanton) in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - Support concatenated string key removals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4976](https://github.com/astral-sh/ruff/pull/4976) - Respect 'is not' operators split across newlines by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4977](https://github.com/astral-sh/ruff/pull/4977) - Parenthesize expressions prior to lexing in F632 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5001](https://github.com/astral-sh/ruff/pull/5001) - Ignore pyproject.toml for adding noqa directives by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5013](https://github.com/astral-sh/ruff/pull/5013) - Support 'reason' argument to `pytest.fail` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5040](https://github.com/astral-sh/ruff/pull/5040) - Allow `async with` in `redefined-loop-name` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5125](https://github.com/astral-sh/ruff/pull/5125) - Skip `DJ008` enforcement in stub files by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5139](https://github.com/astral-sh/ruff/pull/5139) - Detect continuations at start-of-file by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5173](https://github.com/astral-sh/ruff/pull/5173) - Fix allowed-ellipsis detection by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5174](https://github.com/astral-sh/ruff/pull/5174) - Remove continuations before trailing semicolons by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5199](https://github.com/astral-sh/ruff/pull/5199) - Support parenthesized expressions when splitting compound assertions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5219](https://github.com/astral-sh/ruff/pull/5219) - Use phf for confusables to reduce llvm lines by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/4926](https://github.com/astral-sh/ruff/pull/4926) - Allow private accesses within special dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4968](https://github.com/astral-sh/ruff/pull/4968) - Support concatenated literals in format-literals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4974](https://github.com/astral-sh/ruff/pull/4974) - Fix line numbers in source frames by [@​MichaReiser](https://github.com/MichaReiser) in [https://github.com/astral-sh/ruff/pull/4984](https://github.com/astral-sh/ruff/pull/4984) - Suggest combining async with statements by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5022](https://github.com/astral-sh/ruff/pull/5022) - Improve `TypedDict` conversion logic for shadowed builtins and dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5038](https://github.com/astral-sh/ruff/pull/5038) - Support glob patterns in pep8\_naming ignore-names by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5024](https://github.com/astral-sh/ruff/pull/5024) - Respect all `__all__` definitions for docstring visibility by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5052](https://github.com/astral-sh/ruff/pull/5052) - Don't treat annotations as resolved in forward references by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5060](https://github.com/astral-sh/ruff/pull/5060) - Consider ignore-names in all pep8 naming rules by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5079](https://github.com/astral-sh/ruff/pull/5079) - Ignore `reimplemented-builtin` if using `await` by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5101](https://github.com/astral-sh/ruff/pull/5101) - Allow space in filename for powershell + windows + python module by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5115](https://github.com/astral-sh/ruff/pull/5115) - Don't treat straight imports of **future** as `__future__` imports by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5128](https://github.com/astral-sh/ruff/pull/5128) - Remove continuations when deleting statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5198](https://github.com/astral-sh/ruff/pull/5198) - Fix corner case involving terminal backslash after fixing `W293` by [@​evanrittenhouse](https://github.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/5172](https://github.com/astral-sh/ruff/pull/5172) - Fix subprocess.run on Windows Python 3.7 by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5220](https://github.com/astral-sh/ruff/pull/5220) ##### New Contributors - [@​rodjunger](https://github.com/rodjunger) made their first contribution in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - [@​DavideCanton](https://github.com/DavideCanton) made their first contribution in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) made their first contribution in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - [@​adampauls](https://github.com/adampauls) made their first contribution in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - [@​tkukushkin](https://github.com/tkukushkin) made their first contribution in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - [@​Taybou](https://github.com/Taybou) made their first contribution in [https://github.com/astral-sh/ruff/pull/5088](https://github.com/astral-sh/ruff/pull/5088) - [@​davidszotten](https://github.com/davidszotten) made their first contribution in [https://github.com/astral-sh/ruff/pull/5158](https://github.com/astral-sh/ruff/pull/5158) - [@​dosisod](https://github.com/dosisod) made their first contribution in [https://github.com/astral-sh/ruff/pull/5203](https://github.com/astral-sh/ruff/pull/5203) **Full Changelog**: astral-sh/ruff@v0.0.272...v0.0.273 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://beta.ruff.rs/docs) ([source](https://github.com/astral-sh/ruff), [changelog](https://github.com/astral-sh/ruff/releases)) | `0.0.272` -> `0.0.274` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>astral-sh/ruff</summary> ### [`v0.0.274`](https://github.com/astral-sh/ruff/releases/tag/v0.0.274) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.273...v0.0.274) <!-- Release notes generated using configuration in .github/release.yml at v0.0.274 --> #### What's Changed Follow-up release to `v0.0.273` to fix a panic in cache accesses. ##### Bug Fixes - Use package roots rather than package members for cache initialization by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5233](https://github.com/astral-sh/ruff/pull/5233) - Avoid `.unwrap()` on cache access by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5229](https://github.com/astral-sh/ruff/pull/5229) - Revert change to `RUF010` to remove unnecessary `str` calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5232](https://github.com/astral-sh/ruff/pull/5232) - Avoid erroneous RUF013 violations for quoted annotations by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5234](https://github.com/astral-sh/ruff/pull/5234) **Full Changelog**: astral-sh/ruff@v0.0.273...v0.0.274 ### [`v0.0.273`](https://github.com/astral-sh/ruff/releases/tag/v0.0.273) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.272...v0.0.273) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed Highlights include: - Autofix capabilities for rules like `flake8-import-conventions`, which require symbol renames across a file. - Significant decrease in Ruff's cache size (e.g., a ~50% decrease for FastAPI). - Dozens and dozens of bug fixes + performance improvements. ##### Rules - \[`copyright`] Implement copyright notice detection by [@​Ryang20718](https://github.com/Ryang20718) in [https://github.com/astral-sh/ruff/pull/4701](https://github.com/astral-sh/ruff/pull/4701) - \[`flake8-datetimez`] Enable UTC-import for `datetime-utc-alias` fix by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5100](https://github.com/astral-sh/ruff/pull/5100) - \[`flake8-implicit-str-concat`] Add autofix for `ISC001` by [@​tkukushkin](https://github.com/tkukushkin) in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - \[`flake8-import-conventions`] Enable autofix for unconventional imports rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5152](https://github.com/astral-sh/ruff/pull/5152) - \[`flake8-pyi`] Add autofix for `Set`-to-`AbstractSet` rewrite using reference tracking by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5074](https://github.com/astral-sh/ruff/pull/5074) - \[`flake8-pyi`] Implement PYI044 by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - \[`flake8-return`] Extend revised `RET504` implementation to `with` statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4998](https://github.com/astral-sh/ruff/pull/4998) - \[`flake8-return`] Implement autofix for revised `RET504` rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4999](https://github.com/astral-sh/ruff/pull/4999) - \[`flake8-return`] Refactor `RET504` to only enforce assignment-then-return pattern by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4997](https://github.com/astral-sh/ruff/pull/4997) - \[`flake8-slots`] Add plugin, add `SLOT000`, `SLOT001` and `SLOT002` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4909](https://github.com/astral-sh/ruff/pull/4909) - \[`perflint`] Add `perflint` plugin, add first rule `PERF102` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4821](https://github.com/astral-sh/ruff/pull/4821) - \[`pylint`] Add Pylint rule `comparison-with-itself` (`R0124`) by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/4957](https://github.com/astral-sh/ruff/pull/4957) - \[`pyupgrade`] Add a rule to remove unnecessary parentheses in class definitions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5032](https://github.com/astral-sh/ruff/pull/5032) - \[`ruff`] Add a rule for static keys in dict comprehensions by [@​rodjunger](https://github.com/rodjunger) in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - \[`ruff`] Add rule to disallow implicit optional with autofix by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4831](https://github.com/astral-sh/ruff/pull/4831) - \[`ruff`] Expand RUF008 to all classes, but to a new code (RUF012) by [@​adampauls](https://github.com/adampauls) in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - \[`ruff`] Remove unannotated attributes from RUF008 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5049](https://github.com/astral-sh/ruff/pull/5049) - \[`ruff`] Upgrade explicit-type-conversion rule (`RUF010`) to remove unnecessary `str` calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4971](https://github.com/astral-sh/ruff/pull/4971) ##### Settings - Option (`-o`/`--output-file`) to write output to a file by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4950](https://github.com/astral-sh/ruff/pull/4950) - Add JSON Lines (NDJSON) message serialization by [@​akx](https://github.com/akx) in [https://github.com/astral-sh/ruff/pull/5048](https://github.com/astral-sh/ruff/pull/5048) - Add rule documentation URL to JSON output by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5187](https://github.com/astral-sh/ruff/pull/5187) ##### Caching - Only use a single cache file per Python package by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5117](https://github.com/astral-sh/ruff/pull/5117) - Open cache files in parallel by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5120](https://github.com/astral-sh/ruff/pull/5120) ##### Jupyter - Add support for auto-fix in Jupyter notebooks by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4665](https://github.com/astral-sh/ruff/pull/4665) - Add roundtrip support for Jupyter notebook by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5028](https://github.com/astral-sh/ruff/pull/5028) ##### Bug Fixes - Handle decorators in class-parenthesis-modifying rules by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5034](https://github.com/astral-sh/ruff/pull/5034) - Allow re-assignments to `__all__` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4967](https://github.com/astral-sh/ruff/pull/4967) - Handled dict and set inside f-string ([#​4249](https://github.com/astral-sh/ruff/issues/4249)) by [@​DavideCanton](https://github.com/DavideCanton) in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - Support concatenated string key removals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4976](https://github.com/astral-sh/ruff/pull/4976) - Respect 'is not' operators split across newlines by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4977](https://github.com/astral-sh/ruff/pull/4977) - Parenthesize expressions prior to lexing in F632 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5001](https://github.com/astral-sh/ruff/pull/5001) - Ignore pyproject.toml for adding noqa directives by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5013](https://github.com/astral-sh/ruff/pull/5013) - Support 'reason' argument to `pytest.fail` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5040](https://github.com/astral-sh/ruff/pull/5040) - Allow `async with` in `redefined-loop-name` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5125](https://github.com/astral-sh/ruff/pull/5125) - Skip `DJ008` enforcement in stub files by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5139](https://github.com/astral-sh/ruff/pull/5139) - Detect continuations at start-of-file by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5173](https://github.com/astral-sh/ruff/pull/5173) - Fix allowed-ellipsis detection by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5174](https://github.com/astral-sh/ruff/pull/5174) - Remove continuations before trailing semicolons by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5199](https://github.com/astral-sh/ruff/pull/5199) - Support parenthesized expressions when splitting compound assertions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5219](https://github.com/astral-sh/ruff/pull/5219) - Use phf for confusables to reduce llvm lines by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/4926](https://github.com/astral-sh/ruff/pull/4926) - Allow private accesses within special dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4968](https://github.com/astral-sh/ruff/pull/4968) - Support concatenated literals in format-literals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4974](https://github.com/astral-sh/ruff/pull/4974) - Fix line numbers in source frames by [@​MichaReiser](https://github.com/MichaReiser) in [https://github.com/astral-sh/ruff/pull/4984](https://github.com/astral-sh/ruff/pull/4984) - Suggest combining async with statements by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5022](https://github.com/astral-sh/ruff/pull/5022) - Improve `TypedDict` conversion logic for shadowed builtins and dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5038](https://github.com/astral-sh/ruff/pull/5038) - Support glob patterns in pep8\_naming ignore-names by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5024](https://github.com/astral-sh/ruff/pull/5024) - Respect all `__all__` definitions for docstring visibility by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5052](https://github.com/astral-sh/ruff/pull/5052) - Don't treat annotations as resolved in forward references by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5060](https://github.com/astral-sh/ruff/pull/5060) - Consider ignore-names in all pep8 naming rules by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5079](https://github.com/astral-sh/ruff/pull/5079) - Ignore `reimplemented-builtin` if using `await` by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5101](https://github.com/astral-sh/ruff/pull/5101) - Allow space in filename for powershell + windows + python module by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5115](https://github.com/astral-sh/ruff/pull/5115) - Don't treat straight imports of **future** as `__future__` imports by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5128](https://github.com/astral-sh/ruff/pull/5128) - Remove continuations when deleting statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5198](https://github.com/astral-sh/ruff/pull/5198) - Fix corner case involving terminal backslash after fixing `W293` by [@​evanrittenhouse](https://github.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/5172](https://github.com/astral-sh/ruff/pull/5172) - Fix subprocess.run on Windows Python 3.7 by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5220](https://github.com/astral-sh/ruff/pull/5220) #### New Contributors - [@​rodjunger](https://github.com/rodjunger) made their first contribution in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - [@​DavideCanton](https://github.com/DavideCanton) made their first contribution in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) made their first contribution in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - [@​adampauls](https://github.com/adampauls) made their first contribution in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - [@​tkukushkin](https://github.com/tkukushkin) made their first contribution in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - [@​Taybou](https://github.com/Taybou) made their first contribution in [https://github.com/astral-sh/ruff/pull/5088](https://github.com/astral-sh/ruff/pull/5088) - [@​davidszotten](https://github.com/davidszotten) made their first contribution in [https://github.com/astral-sh/ruff/pull/5158](https://github.com/astral-sh/ruff/pull/5158) - [@​dosisod](https://github.com/dosisod) made their first contribution in [https://github.com/astral-sh/ruff/pull/5203](https://github.com/astral-sh/ruff/pull/5203) **Full Changelog**: astral-sh/ruff@v0.0.272...v0.0.273 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jankatins/pr-workflow-example). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://beta.ruff.rs/docs) ([source](https://github.com/astral-sh/ruff), [changelog](https://github.com/astral-sh/ruff/releases)) | `==0.0.272` -> `==0.0.274` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>astral-sh/ruff</summary> ### [`v0.0.274`](https://github.com/astral-sh/ruff/releases/tag/v0.0.274) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.273...v0.0.274) <!-- Release notes generated using configuration in .github/release.yml at v0.0.274 --> #### What's Changed Follow-up release to `v0.0.273` to fix a panic in cache accesses. ##### Bug Fixes - Use package roots rather than package members for cache initialization by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5233](https://github.com/astral-sh/ruff/pull/5233) - Avoid `.unwrap()` on cache access by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5229](https://github.com/astral-sh/ruff/pull/5229) - Revert change to `RUF010` to remove unnecessary `str` calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5232](https://github.com/astral-sh/ruff/pull/5232) - Avoid erroneous RUF013 violations for quoted annotations by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5234](https://github.com/astral-sh/ruff/pull/5234) **Full Changelog**: astral-sh/ruff@v0.0.273...v0.0.274 ### [`v0.0.273`](https://github.com/astral-sh/ruff/releases/tag/v0.0.273) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.272...v0.0.273) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed Highlights include: - Autofix capabilities for rules like `flake8-import-conventions`, which require symbol renames across a file. - Significant decrease in Ruff's cache size (e.g., a ~50% decrease for FastAPI). - Dozens and dozens of bug fixes + performance improvements. ##### Rules - \[`copyright`] Implement copyright notice detection by [@​Ryang20718](https://github.com/Ryang20718) in [https://github.com/astral-sh/ruff/pull/4701](https://github.com/astral-sh/ruff/pull/4701) - \[`flake8-datetimez`] Enable UTC-import for `datetime-utc-alias` fix by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5100](https://github.com/astral-sh/ruff/pull/5100) - \[`flake8-implicit-str-concat`] Add autofix for `ISC001` by [@​tkukushkin](https://github.com/tkukushkin) in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - \[`flake8-import-conventions`] Enable autofix for unconventional imports rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5152](https://github.com/astral-sh/ruff/pull/5152) - \[`flake8-pyi`] Add autofix for `Set`-to-`AbstractSet` rewrite using reference tracking by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5074](https://github.com/astral-sh/ruff/pull/5074) - \[`flake8-pyi`] Implement PYI044 by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - \[`flake8-return`] Extend revised `RET504` implementation to `with` statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4998](https://github.com/astral-sh/ruff/pull/4998) - \[`flake8-return`] Implement autofix for revised `RET504` rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4999](https://github.com/astral-sh/ruff/pull/4999) - \[`flake8-return`] Refactor `RET504` to only enforce assignment-then-return pattern by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4997](https://github.com/astral-sh/ruff/pull/4997) - \[`flake8-slots`] Add plugin, add `SLOT000`, `SLOT001` and `SLOT002` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4909](https://github.com/astral-sh/ruff/pull/4909) - \[`perflint`] Add `perflint` plugin, add first rule `PERF102` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4821](https://github.com/astral-sh/ruff/pull/4821) - \[`pylint`] Add Pylint rule `comparison-with-itself` (`R0124`) by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/4957](https://github.com/astral-sh/ruff/pull/4957) - \[`pyupgrade`] Add a rule to remove unnecessary parentheses in class definitions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5032](https://github.com/astral-sh/ruff/pull/5032) - \[`ruff`] Add a rule for static keys in dict comprehensions by [@​rodjunger](https://github.com/rodjunger) in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - \[`ruff`] Add rule to disallow implicit optional with autofix by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4831](https://github.com/astral-sh/ruff/pull/4831) - \[`ruff`] Expand RUF008 to all classes, but to a new code (RUF012) by [@​adampauls](https://github.com/adampauls) in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - \[`ruff`] Remove unannotated attributes from RUF008 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5049](https://github.com/astral-sh/ruff/pull/5049) - \[`ruff`] Upgrade explicit-type-conversion rule (`RUF010`) to remove unnecessary `str` calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4971](https://github.com/astral-sh/ruff/pull/4971) ##### Settings - Option (`-o`/`--output-file`) to write output to a file by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4950](https://github.com/astral-sh/ruff/pull/4950) - Add JSON Lines (NDJSON) message serialization by [@​akx](https://github.com/akx) in [https://github.com/astral-sh/ruff/pull/5048](https://github.com/astral-sh/ruff/pull/5048) - Add rule documentation URL to JSON output by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5187](https://github.com/astral-sh/ruff/pull/5187) ##### Caching - Only use a single cache file per Python package by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5117](https://github.com/astral-sh/ruff/pull/5117) - Open cache files in parallel by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5120](https://github.com/astral-sh/ruff/pull/5120) ##### Jupyter - Add support for auto-fix in Jupyter notebooks by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4665](https://github.com/astral-sh/ruff/pull/4665) - Add roundtrip support for Jupyter notebook by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5028](https://github.com/astral-sh/ruff/pull/5028) ##### Bug Fixes - Handle decorators in class-parenthesis-modifying rules by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5034](https://github.com/astral-sh/ruff/pull/5034) - Allow re-assignments to `__all__` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4967](https://github.com/astral-sh/ruff/pull/4967) - Handled dict and set inside f-string ([#​4249](https://github.com/astral-sh/ruff/issues/4249)) by [@​DavideCanton](https://github.com/DavideCanton) in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - Support concatenated string key removals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4976](https://github.com/astral-sh/ruff/pull/4976) - Respect 'is not' operators split across newlines by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4977](https://github.com/astral-sh/ruff/pull/4977) - Parenthesize expressions prior to lexing in F632 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5001](https://github.com/astral-sh/ruff/pull/5001) - Ignore pyproject.toml for adding noqa directives by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5013](https://github.com/astral-sh/ruff/pull/5013) - Support 'reason' argument to `pytest.fail` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5040](https://github.com/astral-sh/ruff/pull/5040) - Allow `async with` in `redefined-loop-name` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5125](https://github.com/astral-sh/ruff/pull/5125) - Skip `DJ008` enforcement in stub files by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5139](https://github.com/astral-sh/ruff/pull/5139) - Detect continuations at start-of-file by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5173](https://github.com/astral-sh/ruff/pull/5173) - Fix allowed-ellipsis detection by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5174](https://github.com/astral-sh/ruff/pull/5174) - Remove continuations before trailing semicolons by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5199](https://github.com/astral-sh/ruff/pull/5199) - Support parenthesized expressions when splitting compound assertions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5219](https://github.com/astral-sh/ruff/pull/5219) - Use phf for confusables to reduce llvm lines by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/4926](https://github.com/astral-sh/ruff/pull/4926) - Allow private accesses within special dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4968](https://github.com/astral-sh/ruff/pull/4968) - Support concatenated literals in format-literals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4974](https://github.com/astral-sh/ruff/pull/4974) - Fix line numbers in source frames by [@​MichaReiser](https://github.com/MichaReiser) in [https://github.com/astral-sh/ruff/pull/4984](https://github.com/astral-sh/ruff/pull/4984) - Suggest combining async with statements by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5022](https://github.com/astral-sh/ruff/pull/5022) - Improve `TypedDict` conversion logic for shadowed builtins and dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5038](https://github.com/astral-sh/ruff/pull/5038) - Support glob patterns in pep8\_naming ignore-names by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5024](https://github.com/astral-sh/ruff/pull/5024) - Respect all `__all__` definitions for docstring visibility by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5052](https://github.com/astral-sh/ruff/pull/5052) - Don't treat annotations as resolved in forward references by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5060](https://github.com/astral-sh/ruff/pull/5060) - Consider ignore-names in all pep8 naming rules by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5079](https://github.com/astral-sh/ruff/pull/5079) - Ignore `reimplemented-builtin` if using `await` by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5101](https://github.com/astral-sh/ruff/pull/5101) - Allow space in filename for powershell + windows + python module by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5115](https://github.com/astral-sh/ruff/pull/5115) - Don't treat straight imports of **future** as `__future__` imports by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5128](https://github.com/astral-sh/ruff/pull/5128) - Remove continuations when deleting statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5198](https://github.com/astral-sh/ruff/pull/5198) - Fix corner case involving terminal backslash after fixing `W293` by [@​evanrittenhouse](https://github.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/5172](https://github.com/astral-sh/ruff/pull/5172) - Fix subprocess.run on Windows Python 3.7 by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5220](https://github.com/astral-sh/ruff/pull/5220) #### New Contributors - [@​rodjunger](https://github.com/rodjunger) made their first contribution in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - [@​DavideCanton](https://github.com/DavideCanton) made their first contribution in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) made their first contribution in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - [@​adampauls](https://github.com/adampauls) made their first contribution in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - [@​tkukushkin](https://github.com/tkukushkin) made their first contribution in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - [@​Taybou](https://github.com/Taybou) made their first contribution in [https://github.com/astral-sh/ruff/pull/5088](https://github.com/astral-sh/ruff/pull/5088) - [@​davidszotten](https://github.com/davidszotten) made their first contribution in [https://github.com/astral-sh/ruff/pull/5158](https://github.com/astral-sh/ruff/pull/5158) - [@​dosisod](https://github.com/dosisod) made their first contribution in [https://github.com/astral-sh/ruff/pull/5203](https://github.com/astral-sh/ruff/pull/5203) **Full Changelog**: astral-sh/ruff@v0.0.272...v0.0.273 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/allenporter/pyrainbird). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://beta.ruff.rs/docs) ([source](https://github.com/astral-sh/ruff), [changelog](https://github.com/astral-sh/ruff/releases)) | `==0.0.272` -> `==0.0.275` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>astral-sh/ruff</summary> ### [`v0.0.275`](https://github.com/astral-sh/ruff/releases/tag/v0.0.275) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.274...v0.0.275) <!-- Release notes generated using configuration in .github/release.yml at v0.0.275 --> #### What's Changed Highlights include a 7-10x decrease in Ruff's cache size. ##### Rules - Add support for top-level quoted annotations in RUF013 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5235](https://github.com/astral-sh/ruff/pull/5235) - Add support for nested quoted annotations in RUF013 by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5254](https://github.com/astral-sh/ruff/pull/5254) - Move `compare-to-empty-string` (`PLC1901`) to nursery by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5264](https://github.com/astral-sh/ruff/pull/5264) - Ignore Pydantic classes when evaluating `mutable-class-default` (`RUF012`) by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5273](https://github.com/astral-sh/ruff/pull/5273) - Allow `typing.Final` for `mutable-class-default annotations` (`RUF012`) by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5274](https://github.com/astral-sh/ruff/pull/5274) - Modify `deprecated-import` (`UP035`) to prefer `typing_extensions` in some versions by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5291](https://github.com/astral-sh/ruff/pull/5291) ##### Bug Fixes - Restore existing bindings when unbinding caught exceptions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5256](https://github.com/astral-sh/ruff/pull/5256) - Avoid including nursery rules in linter-level selectors by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5268](https://github.com/astral-sh/ruff/pull/5268) #### New Contributors - [@​jgberry](https://github.com/jgberry) made their first contribution in [https://github.com/astral-sh/ruff/pull/5221](https://github.com/astral-sh/ruff/pull/5221) **Full Changelog**: astral-sh/ruff@v0.0.274...v0.0.275 ### [`v0.0.274`](https://github.com/astral-sh/ruff/releases/tag/v0.0.274) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.273...v0.0.274) <!-- Release notes generated using configuration in .github/release.yml at v0.0.274 --> #### What's Changed Follow-up release to `v0.0.273` to fix a panic in cache accesses. ##### Bug Fixes - Use package roots rather than package members for cache initialization by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5233](https://github.com/astral-sh/ruff/pull/5233) - Avoid `.unwrap()` on cache access by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5229](https://github.com/astral-sh/ruff/pull/5229) - Revert change to `RUF010` to remove unnecessary `str` calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5232](https://github.com/astral-sh/ruff/pull/5232) - Avoid erroneous RUF013 violations for quoted annotations by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5234](https://github.com/astral-sh/ruff/pull/5234) **Full Changelog**: astral-sh/ruff@v0.0.273...v0.0.274 ### [`v0.0.273`](https://github.com/astral-sh/ruff/releases/tag/v0.0.273) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.272...v0.0.273) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed Highlights include: - Autofix capabilities for rules like `flake8-import-conventions`, which require symbol renames across a file. - Significant decrease in Ruff's cache size (e.g., a ~50% decrease for FastAPI). - Dozens and dozens of bug fixes + performance improvements. ##### Rules - \[`copyright`] Implement copyright notice detection by [@​Ryang20718](https://github.com/Ryang20718) in [https://github.com/astral-sh/ruff/pull/4701](https://github.com/astral-sh/ruff/pull/4701) - \[`flake8-datetimez`] Enable UTC-import for `datetime-utc-alias` fix by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5100](https://github.com/astral-sh/ruff/pull/5100) - \[`flake8-implicit-str-concat`] Add autofix for `ISC001` by [@​tkukushkin](https://github.com/tkukushkin) in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - \[`flake8-import-conventions`] Enable autofix for unconventional imports rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5152](https://github.com/astral-sh/ruff/pull/5152) - \[`flake8-pyi`] Add autofix for `Set`-to-`AbstractSet` rewrite using reference tracking by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5074](https://github.com/astral-sh/ruff/pull/5074) - \[`flake8-pyi`] Implement PYI044 by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - \[`flake8-return`] Extend revised `RET504` implementation to `with` statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4998](https://github.com/astral-sh/ruff/pull/4998) - \[`flake8-return`] Implement autofix for revised `RET504` rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4999](https://github.com/astral-sh/ruff/pull/4999) - \[`flake8-return`] Refactor `RET504` to only enforce assignment-then-return pattern by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4997](https://github.com/astral-sh/ruff/pull/4997) - \[`flake8-slots`] Add plugin, add `SLOT000`, `SLOT001` and `SLOT002` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4909](https://github.com/astral-sh/ruff/pull/4909) - \[`perflint`] Add `perflint` plugin, add first rule `PERF102` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4821](https://github.com/astral-sh/ruff/pull/4821) - \[`pylint`] Add Pylint rule `comparison-with-itself` (`R0124`) by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/4957](https://github.com/astral-sh/ruff/pull/4957) - \[`pyupgrade`] Add a rule to remove unnecessary parentheses in class definitions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5032](https://github.com/astral-sh/ruff/pull/5032) - \[`ruff`] Add a rule for static keys in dict comprehensions by [@​rodjunger](https://github.com/rodjunger) in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - \[`ruff`] Add rule to disallow implicit optional with autofix by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4831](https://github.com/astral-sh/ruff/pull/4831) - \[`ruff`] Expand RUF008 to all classes, but to a new code (RUF012) by [@​adampauls](https://github.com/adampauls) in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - \[`ruff`] Remove unannotated attributes from RUF008 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5049](https://github.com/astral-sh/ruff/pull/5049) - \[`ruff`] Upgrade explicit-type-conversion rule (`RUF010`) to remove unnecessary `str` calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4971](https://github.com/astral-sh/ruff/pull/4971) ##### Settings - Option (`-o`/`--output-file`) to write output to a file by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4950](https://github.com/astral-sh/ruff/pull/4950) - Add JSON Lines (NDJSON) message serialization by [@​akx](https://github.com/akx) in [https://github.com/astral-sh/ruff/pull/5048](https://github.com/astral-sh/ruff/pull/5048) - Add rule documentation URL to JSON output by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5187](https://github.com/astral-sh/ruff/pull/5187) ##### Caching - Only use a single cache file per Python package by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5117](https://github.com/astral-sh/ruff/pull/5117) - Open cache files in parallel by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5120](https://github.com/astral-sh/ruff/pull/5120) ##### Jupyter - Add support for auto-fix in Jupyter notebooks by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4665](https://github.com/astral-sh/ruff/pull/4665) - Add roundtrip support for Jupyter notebook by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5028](https://github.com/astral-sh/ruff/pull/5028) ##### Bug Fixes - Handle decorators in class-parenthesis-modifying rules by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5034](https://github.com/astral-sh/ruff/pull/5034) - Allow re-assignments to `__all__` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4967](https://github.com/astral-sh/ruff/pull/4967) - Handled dict and set inside f-string ([#​4249](https://github.com/astral-sh/ruff/issues/4249)) by [@​DavideCanton](https://github.com/DavideCanton) in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - Support concatenated string key removals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4976](https://github.com/astral-sh/ruff/pull/4976) - Respect 'is not' operators split across newlines by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4977](https://github.com/astral-sh/ruff/pull/4977) - Parenthesize expressions prior to lexing in F632 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5001](https://github.com/astral-sh/ruff/pull/5001) - Ignore pyproject.toml for adding noqa directives by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5013](https://github.com/astral-sh/ruff/pull/5013) - Support 'reason' argument to `pytest.fail` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5040](https://github.com/astral-sh/ruff/pull/5040) - Allow `async with` in `redefined-loop-name` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5125](https://github.com/astral-sh/ruff/pull/5125) - Skip `DJ008` enforcement in stub files by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5139](https://github.com/astral-sh/ruff/pull/5139) - Detect continuations at start-of-file by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5173](https://github.com/astral-sh/ruff/pull/5173) - Fix allowed-ellipsis detection by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5174](https://github.com/astral-sh/ruff/pull/5174) - Remove continuations before trailing semicolons by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5199](https://github.com/astral-sh/ruff/pull/5199) - Support parenthesized expressions when splitting compound assertions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5219](https://github.com/astral-sh/ruff/pull/5219) - Use phf for confusables to reduce llvm lines by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/4926](https://github.com/astral-sh/ruff/pull/4926) - Allow private accesses within special dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4968](https://github.com/astral-sh/ruff/pull/4968) - Support concatenated literals in format-literals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4974](https://github.com/astral-sh/ruff/pull/4974) - Fix line numbers in source frames by [@​MichaReiser](https://github.com/MichaReiser) in [https://github.com/astral-sh/ruff/pull/4984](https://github.com/astral-sh/ruff/pull/4984) - Suggest combining async with statements by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5022](https://github.com/astral-sh/ruff/pull/5022) - Improve `TypedDict` conversion logic for shadowed builtins and dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5038](https://github.com/astral-sh/ruff/pull/5038) - Support glob patterns in pep8\_naming ignore-names by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5024](https://github.com/astral-sh/ruff/pull/5024) - Respect all `__all__` definitions for docstring visibility by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5052](https://github.com/astral-sh/ruff/pull/5052) - Don't treat annotations as resolved in forward references by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5060](https://github.com/astral-sh/ruff/pull/5060) - Consider ignore-names in all pep8 naming rules by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5079](https://github.com/astral-sh/ruff/pull/5079) - Ignore `reimplemented-builtin` if using `await` by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5101](https://github.com/astral-sh/ruff/pull/5101) - Allow space in filename for powershell + windows + python module by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5115](https://github.com/astral-sh/ruff/pull/5115) - Don't treat straight imports of **future** as `__future__` imports by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5128](https://github.com/astral-sh/ruff/pull/5128) - Remove continuations when deleting statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5198](https://github.com/astral-sh/ruff/pull/5198) - Fix corner case involving terminal backslash after fixing `W293` by [@​evanrittenhouse](https://github.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/5172](https://github.com/astral-sh/ruff/pull/5172) - Fix subprocess.run on Windows Python 3.7 by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5220](https://github.com/astral-sh/ruff/pull/5220) #### New Contributors - [@​rodjunger](https://github.com/rodjunger) made their first contribution in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - [@​DavideCanton](https://github.com/DavideCanton) made their first contribution in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) made their first contribution in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - [@​adampauls](https://github.com/adampauls) made their first contribution in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - [@​tkukushkin](https://github.com/tkukushkin) made their first contribution in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - [@​Taybou](https://github.com/Taybou) made their first contribution in [https://github.com/astral-sh/ruff/pull/5088](https://github.com/astral-sh/ruff/pull/5088) - [@​davidszotten](https://github.com/davidszotten) made their first contribution in [https://github.com/astral-sh/ruff/pull/5158](https://github.com/astral-sh/ruff/pull/5158) - [@​dosisod](https://github.com/dosisod) made their first contribution in [https://github.com/astral-sh/ruff/pull/5203](https://github.com/astral-sh/ruff/pull/5203) **Full Changelog**: astral-sh/ruff@v0.0.272...v0.0.273 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/allenporter/flux-local). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [docs/MarkDown](https://github.com/Python-Markdown/markdown) ([changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/change_log/index.md)) | `==3.3.7` -> `==3.4.3` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [docs/mkdocs-material](https://github.com/squidfunk/mkdocs-material) | `==9.1.14` -> `==9.1.17` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [docs/mkdocstrings](https://github.com/mkdocstrings/mkdocstrings) ([changelog](https://mkdocstrings.github.io/changelog)) | `==0.21.2` -> `==0.22.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [misc-lint/blacken-docs](https://github.com/asottile/blacken-docs) ([changelog](https://github.com/adamchainz/blacken-docs/blob/main/CHANGELOG.rst)) | `==1.13.0` -> `==1.14.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [misc-lint/pycln](https://hadialqattan.github.io/pycln) ([source](https://github.com/hadialqattan/pycln)) | `==2.1.3` -> `==2.1.5` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [misc-lint/ruff](https://beta.ruff.rs/docs) ([source](https://github.com/astral-sh/ruff), [changelog](https://github.com/astral-sh/ruff/releases)) | `==0.0.272` -> `==0.0.275` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [pytest/pytest](https://docs.pytest.org/en/latest/) ([source](https://github.com/pytest-dev/pytest), [changelog](https://docs.pytest.org/en/stable/changelog.html)) | `==7.3.1` -> `==7.4.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [pytest/pytest-mock](https://github.com/pytest-dev/pytest-mock) ([changelog](https://pytest-mock.readthedocs.io/en/latest/changelog.html)) | `==3.10.0` -> `==3.11.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [typecheck/mypy](https://www.mypy-lang.org/) ([source](https://github.com/python/mypy), [changelog](https://mypy-lang.blogspot.com/)) | `==1.3.0` -> `==1.4.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Python-Markdown/markdown (docs/MarkDown)</summary> ### [`v3.4.3`](https://github.com/Python-Markdown/markdown/compare/3.4.2...3.4.3) [Compare Source](https://github.com/Python-Markdown/markdown/compare/3.4.2...3.4.3) ### [`v3.4.2`](https://github.com/Python-Markdown/markdown/compare/3.4.1...3.4.2) [Compare Source](https://github.com/Python-Markdown/markdown/compare/3.4.1...3.4.2) ### [`v3.4.1`](https://github.com/Python-Markdown/markdown/compare/3.4...3.4.1) [Compare Source](https://github.com/Python-Markdown/markdown/compare/3.4...3.4.1) ### [`v3.4`](https://github.com/Python-Markdown/markdown/compare/3.3.7...3.4) [Compare Source](https://github.com/Python-Markdown/markdown/compare/3.3.7...3.4) </details> <details> <summary>squidfunk/mkdocs-material (docs/mkdocs-material)</summary> ### [`v9.1.17`](https://github.com/squidfunk/mkdocs-material/releases/tag/9.1.17): mkdocs-material-9.1.17 [Compare Source](https://github.com/squidfunk/mkdocs-material/compare/9.1.16...9.1.17) - Fixed [#​5633](https://github.com/squidfunk/mkdocs-material/issues/5633): Code annotations with nested lists incorrectly mounted - Fixed [#​5628](https://github.com/squidfunk/mkdocs-material/issues/5628): Regression in new social plugin configuration scheme ### [`v9.1.16`](https://github.com/squidfunk/mkdocs-material/releases/tag/9.1.16): mkdocs-material-9.1.16 [Compare Source](https://github.com/squidfunk/mkdocs-material/compare/9.1.15...9.1.16) - Updated Indonesian translations - Ensure scroll bar follows color scheme of operating system ### [`v9.1.15`](https://github.com/squidfunk/mkdocs-material/releases/tag/9.1.15): mkdocs-material-9.1.15 [Compare Source](https://github.com/squidfunk/mkdocs-material/compare/9.1.14...9.1.15) - Fixed [#​5566](https://github.com/squidfunk/mkdocs-material/issues/5566): Indicate color scheme to operating system - Fixed [#​5565](https://github.com/squidfunk/mkdocs-material/issues/5565): Update `Dockerfile` to latest version of base image - Fixed [#​5554](https://github.com/squidfunk/mkdocs-material/issues/5554): Add additional version tags (`9`, `9.1`) to Docker image - Fixed [#​5536](https://github.com/squidfunk/mkdocs-material/issues/5536): Strip tags of ARIA labels in table of contents </details> <details> <summary>mkdocstrings/mkdocstrings (docs/mkdocstrings)</summary> ### [`v0.22.0`](https://github.com/mkdocstrings/mkdocstrings/blob/HEAD/CHANGELOG.md#​0220-httpsgithubcommkdocstringsmkdocstringsreleasestag0220---2023-05-25) [Compare Source](https://github.com/mkdocstrings/mkdocstrings/compare/0.21.2...0.22.0) <small>[Compare with 0.21.2](https://github.com/mkdocstrings/mkdocstrings/compare/0.21.2...0.22.0)</small> ##### Features - Allow extensions to add templates ([cf0af05](https://github.com/mkdocstrings/mkdocstrings/commit/cf0af059eb89240eba0437de417c124389e2f20e) by Timothée Mazzucotelli). [PR #​569](https://github.com/mkdocstrings/mkdocstrings/pull/569) ##### Code Refactoring - Report inventory loading errors ([2c05d78](https://github.com/mkdocstrings/mkdocstrings/commit/2c05d7854b87251e26c1a2e1810b85702ff110f3) by Timothée Mazzucotelli). Co-authored-by: Oleh Prypin <oleh@pryp.in> </details> <details> <summary>asottile/blacken-docs (misc-lint/blacken-docs)</summary> ### [`v1.14.0`](https://github.com/asottile/blacken-docs/blob/HEAD/CHANGELOG.rst#​1140-2023-06-13) [Compare Source](https://github.com/asottile/blacken-docs/compare/1.13.0...1.14.0) - Support Python 3.12. </details> <details> <summary>hadialqattan/pycln (misc-lint/pycln)</summary> ### [`v2.1.5`](https://github.com/hadialqattan/pycln/releases/tag/v2.1.5) [Compare Source](https://github.com/hadialqattan/pycln/compare/v2.1.4...v2.1.5) ##### Changed - [Widen `pathspec` version artificial lock by @​hadialqattan](https://github.com/hadialqattan/pycln/pull/203) ### [`v2.1.4`](https://github.com/hadialqattan/pycln/releases/tag/v2.1.4) [Compare Source](https://github.com/hadialqattan/pycln/compare/v2.1.3...v2.1.4) ##### Fixed - [Detect third-party libs installed in editable mode by @​hadialqattan](https://github.com/hadialqattan/pycln/pull/200) - [Preserve the original line break format by @​maxbachmann & @​hadialqattan](https://github.com/hadialqattan/pycln/pull/197) ##### Changed - [Bump JRubics/poetry-publish from 1.16 to 1.17 by @​dependabot\[bot\]](https://github.com/hadialqattan/pycln/pull/201) - [Remove `pathspec` version artificial lock by @​hadialqattan](https://github.com/hadialqattan/pycln/pull/199) - [Bump codecov/codecov-action from 3.1.1 to 3.1.4 by @​dependabot\[bot\]](https://github.com/hadialqattan/pycln/pull/198) - [Bump typer from 0.7.0 to 0.9.0 by @​dependabot\[bot\]](https://github.com/hadialqattan/pycln/pull/195) </details> <details> <summary>astral-sh/ruff (misc-lint/ruff)</summary> ### [`v0.0.275`](https://github.com/astral-sh/ruff/releases/tag/v0.0.275) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.274...v0.0.275) <!-- Release notes generated using configuration in .github/release.yml at v0.0.275 --> #### What's Changed Highlights include a 7-10x decrease in Ruff's cache size. ##### Rules - Add support for top-level quoted annotations in RUF013 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5235](https://github.com/astral-sh/ruff/pull/5235) - Add support for nested quoted annotations in RUF013 by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5254](https://github.com/astral-sh/ruff/pull/5254) - Move `compare-to-empty-string` (`PLC1901`) to nursery by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5264](https://github.com/astral-sh/ruff/pull/5264) - Ignore Pydantic classes when evaluating `mutable-class-default` (`RUF012`) by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5273](https://github.com/astral-sh/ruff/pull/5273) - Allow `typing.Final` for `mutable-class-default annotations` (`RUF012`) by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5274](https://github.com/astral-sh/ruff/pull/5274) - Modify `deprecated-import` (`UP035`) to prefer `typing_extensions` in some versions by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5291](https://github.com/astral-sh/ruff/pull/5291) ##### Bug Fixes - Restore existing bindings when unbinding caught exceptions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5256](https://github.com/astral-sh/ruff/pull/5256) - Avoid including nursery rules in linter-level selectors by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5268](https://github.com/astral-sh/ruff/pull/5268) #### New Contributors - [@​jgberry](https://github.com/jgberry) made their first contribution in [https://github.com/astral-sh/ruff/pull/5221](https://github.com/astral-sh/ruff/pull/5221) **Full Changelog**: astral-sh/ruff@v0.0.274...v0.0.275 ### [`v0.0.274`](https://github.com/astral-sh/ruff/releases/tag/v0.0.274) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.273...v0.0.274) <!-- Release notes generated using configuration in .github/release.yml at v0.0.274 --> #### What's Changed Follow-up release to `v0.0.273` to fix a panic in cache accesses. ##### Bug Fixes - Use package roots rather than package members for cache initialization by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5233](https://github.com/astral-sh/ruff/pull/5233) - Avoid `.unwrap()` on cache access by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5229](https://github.com/astral-sh/ruff/pull/5229) - Revert change to `RUF010` to remove unnecessary `str` calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5232](https://github.com/astral-sh/ruff/pull/5232) - Avoid erroneous RUF013 violations for quoted annotations by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5234](https://github.com/astral-sh/ruff/pull/5234) **Full Changelog**: astral-sh/ruff@v0.0.273...v0.0.274 ### [`v0.0.273`](https://github.com/astral-sh/ruff/releases/tag/v0.0.273) [Compare Source](https://github.com/astral-sh/ruff/compare/v0.0.272...v0.0.273) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed Highlights include: - Autofix capabilities for rules like `flake8-import-conventions`, which require symbol renames across a file. - Significant decrease in Ruff's cache size (e.g., a ~50% decrease for FastAPI). - Dozens and dozens of bug fixes + performance improvements. ##### Rules - \[`copyright`] Implement copyright notice detection by [@​Ryang20718](https://github.com/Ryang20718) in [https://github.com/astral-sh/ruff/pull/4701](https://github.com/astral-sh/ruff/pull/4701) - \[`flake8-datetimez`] Enable UTC-import for `datetime-utc-alias` fix by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5100](https://github.com/astral-sh/ruff/pull/5100) - \[`flake8-implicit-str-concat`] Add autofix for `ISC001` by [@​tkukushkin](https://github.com/tkukushkin) in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - \[`flake8-import-conventions`] Enable autofix for unconventional imports rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5152](https://github.com/astral-sh/ruff/pull/5152) - \[`flake8-pyi`] Add autofix for `Set`-to-`AbstractSet` rewrite using reference tracking by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5074](https://github.com/astral-sh/ruff/pull/5074) - \[`flake8-pyi`] Implement PYI044 by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - \[`flake8-return`] Extend revised `RET504` implementation to `with` statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4998](https://github.com/astral-sh/ruff/pull/4998) - \[`flake8-return`] Implement autofix for revised `RET504` rule by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4999](https://github.com/astral-sh/ruff/pull/4999) - \[`flake8-return`] Refactor `RET504` to only enforce assignment-then-return pattern by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4997](https://github.com/astral-sh/ruff/pull/4997) - \[`flake8-slots`] Add plugin, add `SLOT000`, `SLOT001` and `SLOT002` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4909](https://github.com/astral-sh/ruff/pull/4909) - \[`perflint`] Add `perflint` plugin, add first rule `PERF102` by [@​qdegraaf](https://github.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/4821](https://github.com/astral-sh/ruff/pull/4821) - \[`pylint`] Add Pylint rule `comparison-with-itself` (`R0124`) by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/4957](https://github.com/astral-sh/ruff/pull/4957) - \[`pyupgrade`] Add a rule to remove unnecessary parentheses in class definitions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5032](https://github.com/astral-sh/ruff/pull/5032) - \[`ruff`] Add a rule for static keys in dict comprehensions by [@​rodjunger](https://github.com/rodjunger) in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - \[`ruff`] Add rule to disallow implicit optional with autofix by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4831](https://github.com/astral-sh/ruff/pull/4831) - \[`ruff`] Expand RUF008 to all classes, but to a new code (RUF012) by [@​adampauls](https://github.com/adampauls) in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - \[`ruff`] Remove unannotated attributes from RUF008 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5049](https://github.com/astral-sh/ruff/pull/5049) - \[`ruff`] Upgrade explicit-type-conversion rule (`RUF010`) to remove unnecessary `str` calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4971](https://github.com/astral-sh/ruff/pull/4971) ##### Settings - Option (`-o`/`--output-file`) to write output to a file by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4950](https://github.com/astral-sh/ruff/pull/4950) - Add JSON Lines (NDJSON) message serialization by [@​akx](https://github.com/akx) in [https://github.com/astral-sh/ruff/pull/5048](https://github.com/astral-sh/ruff/pull/5048) - Add rule documentation URL to JSON output by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5187](https://github.com/astral-sh/ruff/pull/5187) ##### Caching - Only use a single cache file per Python package by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5117](https://github.com/astral-sh/ruff/pull/5117) - Open cache files in parallel by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5120](https://github.com/astral-sh/ruff/pull/5120) ##### Jupyter - Add support for auto-fix in Jupyter notebooks by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/4665](https://github.com/astral-sh/ruff/pull/4665) - Add roundtrip support for Jupyter notebook by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5028](https://github.com/astral-sh/ruff/pull/5028) ##### Bug Fixes - Handle decorators in class-parenthesis-modifying rules by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5034](https://github.com/astral-sh/ruff/pull/5034) - Allow re-assignments to `__all__` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4967](https://github.com/astral-sh/ruff/pull/4967) - Handled dict and set inside f-string ([#​4249](https://github.com/astral-sh/ruff/issues/4249)) by [@​DavideCanton](https://github.com/DavideCanton) in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - Support concatenated string key removals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4976](https://github.com/astral-sh/ruff/pull/4976) - Respect 'is not' operators split across newlines by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4977](https://github.com/astral-sh/ruff/pull/4977) - Parenthesize expressions prior to lexing in F632 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5001](https://github.com/astral-sh/ruff/pull/5001) - Ignore pyproject.toml for adding noqa directives by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5013](https://github.com/astral-sh/ruff/pull/5013) - Support 'reason' argument to `pytest.fail` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5040](https://github.com/astral-sh/ruff/pull/5040) - Allow `async with` in `redefined-loop-name` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5125](https://github.com/astral-sh/ruff/pull/5125) - Skip `DJ008` enforcement in stub files by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5139](https://github.com/astral-sh/ruff/pull/5139) - Detect continuations at start-of-file by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5173](https://github.com/astral-sh/ruff/pull/5173) - Fix allowed-ellipsis detection by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5174](https://github.com/astral-sh/ruff/pull/5174) - Remove continuations before trailing semicolons by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5199](https://github.com/astral-sh/ruff/pull/5199) - Support parenthesized expressions when splitting compound assertions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5219](https://github.com/astral-sh/ruff/pull/5219) - Use phf for confusables to reduce llvm lines by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/4926](https://github.com/astral-sh/ruff/pull/4926) - Allow private accesses within special dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4968](https://github.com/astral-sh/ruff/pull/4968) - Support concatenated literals in format-literals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/4974](https://github.com/astral-sh/ruff/pull/4974) - Fix line numbers in source frames by [@​MichaReiser](https://github.com/MichaReiser) in [https://github.com/astral-sh/ruff/pull/4984](https://github.com/astral-sh/ruff/pull/4984) - Suggest combining async with statements by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5022](https://github.com/astral-sh/ruff/pull/5022) - Improve `TypedDict` conversion logic for shadowed builtins and dunder methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5038](https://github.com/astral-sh/ruff/pull/5038) - Support glob patterns in pep8\_naming ignore-names by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5024](https://github.com/astral-sh/ruff/pull/5024) - Respect all `__all__` definitions for docstring visibility by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5052](https://github.com/astral-sh/ruff/pull/5052) - Don't treat annotations as resolved in forward references by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5060](https://github.com/astral-sh/ruff/pull/5060) - Consider ignore-names in all pep8 naming rules by [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) in [https://github.com/astral-sh/ruff/pull/5079](https://github.com/astral-sh/ruff/pull/5079) - Ignore `reimplemented-builtin` if using `await` by [@​tjkuson](https://github.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5101](https://github.com/astral-sh/ruff/pull/5101) - Allow space in filename for powershell + windows + python module by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5115](https://github.com/astral-sh/ruff/pull/5115) - Don't treat straight imports of **future** as `__future__` imports by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5128](https://github.com/astral-sh/ruff/pull/5128) - Remove continuations when deleting statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5198](https://github.com/astral-sh/ruff/pull/5198) - Fix corner case involving terminal backslash after fixing `W293` by [@​evanrittenhouse](https://github.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/5172](https://github.com/astral-sh/ruff/pull/5172) - Fix subprocess.run on Windows Python 3.7 by [@​konstin](https://github.com/konstin) in [https://github.com/astral-sh/ruff/pull/5220](https://github.com/astral-sh/ruff/pull/5220) #### New Contributors - [@​rodjunger](https://github.com/rodjunger) made their first contribution in [https://github.com/astral-sh/ruff/pull/4929](https://github.com/astral-sh/ruff/pull/4929) - [@​DavideCanton](https://github.com/DavideCanton) made their first contribution in [https://github.com/astral-sh/ruff/pull/4563](https://github.com/astral-sh/ruff/pull/4563) - [@​Thomasdezeeuw](https://github.com/Thomasdezeeuw) made their first contribution in [https://github.com/astral-sh/ruff/pull/5021](https://github.com/astral-sh/ruff/pull/5021) - [@​adampauls](https://github.com/adampauls) made their first contribution in [https://github.com/astral-sh/ruff/pull/4390](https://github.com/astral-sh/ruff/pull/4390) - [@​tkukushkin](https://github.com/tkukushkin) made their first contribution in [https://github.com/astral-sh/ruff/pull/4853](https://github.com/astral-sh/ruff/pull/4853) - [@​Taybou](https://github.com/Taybou) made their first contribution in [https://github.com/astral-sh/ruff/pull/5088](https://github.com/astral-sh/ruff/pull/5088) - [@​davidszotten](https://github.com/davidszotten) made their first contribution in [https://github.com/astral-sh/ruff/pull/5158](https://github.com/astral-sh/ruff/pull/5158) - [@​dosisod](https://github.com/dosisod) made their first contribution in [https://github.com/astral-sh/ruff/pull/5203](https://github.com/astral-sh/ruff/pull/5203) **Full Changelog**: astral-sh/ruff@v0.0.272...v0.0.273 </details> <details> <summary>pytest-dev/pytest (pytest/pytest)</summary> ### [`v7.4.0`](https://github.com/pytest-dev/pytest/releases/tag/7.4.0) [Compare Source](https://github.com/pytest-dev/pytest/compare/7.3.2...7.4.0) # pytest 7.4.0 (2023-06-23) ## Features - [#​10901](https://github.com/pytest-dev/pytest/issues/10901): Added `ExceptionInfo.from_exception() <pytest.ExceptionInfo.from_exception>`{.interpreted-text role="func"}, a simpler way to create an `~pytest.ExceptionInfo`{.interpreted-text role="class"} from an exception. This can replace `ExceptionInfo.from_exc_info() <pytest.ExceptionInfo.from_exc_info()>`{.interpreted-text role="func"} for most uses. ## Improvements - [#​10872](https://github.com/pytest-dev/pytest/issues/10872): Update test log report annotation to named tuple and fixed inconsistency in docs for `pytest_report_teststatus`{.interpreted-text role="hook"} hook. - [#​10907](https://github.com/pytest-dev/pytest/issues/10907): When an exception traceback to be displayed is completely filtered out (by mechanisms such as `__tracebackhide__`, internal frames, and similar), now only the exception string and the following message are shown: "All traceback entries are hidden. Pass \[--full-trace]{.title-ref} to see hidden and internal frames.". Previously, the last frame of the traceback was shown, even though it was hidden. - [#​10940](https://github.com/pytest-dev/pytest/issues/10940): Improved verbose output (`-vv`) of `skip` and `xfail` reasons by performing text wrapping while leaving a clear margin for progress output. Added `TerminalReporter.wrap_write()` as a helper for that. - [#​10991](https://github.com/pytest-dev/pytest/issues/10991): Added handling of `%f` directive to print microseconds in log format options, such as `log-date-format`. - [#​11005](https://github.com/pytest-dev/pytest/issues/11005): Added the underlying exception to the cache provider's path creation and write warning messages. - [#​11013](https://github.com/pytest-dev/pytest/issues/11013): Added warning when `testpaths`{.interpreted-text role="confval"} is set, but paths are not found by glob. In this case, pytest will fall back to searching from the current directory. - [#​11043](https://github.com/pytest-dev/pytest/issues/11043): When \[--confcutdir]{.title-ref} is not specified, and there is no config file present, the conftest cutoff directory (\[--confcutdir]{.title-ref}) is now set to the `rootdir <rootdir>`{.interpreted-text role="ref"}. Previously in such cases, \[conftest.py]{.title-ref} files would be probed all the way to the root directory of the filesystem. If you are badly affected by this change, consider adding an empty config file to your desired cutoff directory, or explicitly set \[--confcutdir]{.title-ref}. - [#​11081](https://github.com/pytest-dev/pytest/issues/11081): The `norecursedirs`{.interpreted-text role="confval"} check is now performed in a `pytest_ignore_collect`{.interpreted-text role="hook"} implementation, so plugins can affect it. If after updating to this version you see that your \[norecursedirs]{.title-ref} setting is not being respected, it means that a conftest or a plugin you use has a bad \[pytest_ignore_collect]{.title-ref} implementation. Most likely, your hook returns \[False]{.title-ref} for paths it does not want to ignore, which ends the processing and doesn't allow other plugins, including pytest itself, to ignore the path. The fix is to return \[None]{.title-ref} instead of \[False]{.title-ref} for paths your hook doesn't want to ignore. - [#​8711](https://github.com/pytest-dev/pytest/issues/8711): `caplog.set_level() <pytest.LogCaptureFixture.set_level>`{.interpreted-text role="func"} and `caplog.at_level() <pytest.LogCaptureFixture.at_level>`{.interpreted-text role="func"} will temporarily enable the requested `level` if `level` was disabled globally via `logging.disable(LEVEL)`. ## Bug Fixes - [#​10831](https://github.com/pytest-dev/pytest/issues/10831): Terminal Reporting: Fixed bug when running in `--tb=line` mode where `pytest.fail(pytrace=False)` tests report `None`. - [#​11068](https://github.com/pytest-dev/pytest/issues/11068): Fixed the `--last-failed` whole-file skipping functionality ("skipped N files") for `non-python test files <non-python tests>`{.interpreted-text role="ref"}. - [#​11104](https://github.com/pytest-dev/pytest/issues/11104): Fixed a regression in pytest 7.3.2 which caused to `testpaths`{.interpreted-text role="confval"} to be considered for loading initial conftests, even when it was not utilized (e.g. when explicit paths were given on the command line). Now the `testpaths` are only considered when they are in use. - [#​1904](https://github.com/pytest-dev/pytest/issues/1904): Fixed traceback entries hidden with `__tracebackhide__ = True` still being shown for chained exceptions (parts after "... the above exception ..." message). - [#​7781](https://github.com/pytest-dev/pytest/issues/7781): Fix writing non-encodable text to log file when using `--debug`. ## Improved Documentation - [#​9146](https://github.com/pytest-dev/pytest/issues/9146): Improved documentation for `caplog.set_level() <pytest.LogCaptureFixture.set_level>`{.interpreted-text role="func"}. ## Trivial/Internal Changes - [#​11031](https://github.com/pytest-dev/pytest/issues/11031): Enhanced the CLI flag for `-c` to now include `--config-file` to make it clear that this flag applies to the usage of a custom config file. ### [`v7.3.2`](https://github.com/pytest-dev/pytest/releases/tag/7.3.2) [Compare Source](https://github.com/pytest-dev/pytest/compare/7.3.1...7.3.2) # pytest 7.3.2 (2023-06-10) ## Bug Fixes - [#​10169](https://github.com/pytest-dev/pytest/issues/10169): Fix bug where very long option names could cause pytest to break with `OSError: [Errno 36] File name too long` on some systems. - [#​10894](https://github.com/pytest-dev/pytest/issues/10894): Support for Python 3.12 (beta at the time of writing). - [#​10987](https://github.com/pytest-dev/pytest/issues/10987): `testpaths`{.interpreted-text role="confval"} is now honored to load root `conftests`. - [#​10999](https://github.com/pytest-dev/pytest/issues/10999): The \[monkeypatch]{.title-ref} \[setitem]{.title-ref}/\[delitem]{.title-ref} type annotations now allow \[TypedDict]{.title-ref} arguments. - [#​11028](https://github.com/pytest-dev/pytest/issues/11028): Fixed bug in assertion rewriting where a variable assigned with the walrus operator could not be used later in a function call. - [#​11054](https://github.com/pytest-dev/pytest/issues/11054): Fixed `--last-failed`'s "(skipped N files)" functionality for files inside of packages (directories with \[\__init\_\_.py]{.title-ref} files). </details> <details> <summary>pytest-dev/pytest-mock (pytest/pytest-mock)</summary> ### [`v3.11.1`](https://github.com/pytest-dev/pytest-mock/blob/HEAD/CHANGELOG.rst#​3111-2023-06-15) [Compare Source](https://github.com/pytest-dev/pytest-mock/compare/v3.11.0...v3.11.1) (This release source code is identical to `3.11.0` except a small internal fix to deployment/CI) - Fixed introspection for failed `assert_has_calls` (`#365`\_). - Updated type annotations for `mocker.patch` and `mocker.spy` (`#364`\_). .. \_#̴[https://github.com/pytest-dev/pytest-mock/pull/365](https://github.com/pytest-dev/pytest-mock/pull/365)ull/365 .. \[https://github.com/pytest-dev/pytest-mock/pull/364](https://github.com/pytest-dev/pytest-mock/pull/364)-mock/pull/364 ### [`v3.11.0`](https://github.com/pytest-dev/pytest-mock/blob/HEAD/CHANGELOG.rst#​3110-2023-06-15) [Compare Source](https://github.com/pytest-dev/pytest-mock/compare/v3.10.0...v3.11.0) - Fixed introspection for failed `assert_has_calls` (`#365`\_). - Updated type annotations for `mocker.patch` and `mocker.spy` (`#364`\_). .. \_#̴[https://github.com/pytest-dev/pytest-mock/pull/365](https://github.com/pytest-dev/pytest-mock/pull/365)ull/365 .. \[https://github.com/pytest-dev/pytest-mock/pull/364](https://github.com/pytest-dev/pytest-mock/pull/364)-mock/pull/364 </details> <details> <summary>python/mypy (typecheck/mypy)</summary> ### [`v1.4.0`](https://github.com/python/mypy/compare/v1.3.0...v1.4.0) [Compare Source](https://github.com/python/mypy/compare/v1.3.0...v1.4.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every 3 months on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/AlexWaygood/typeshed-stats). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDQuMiIsInVwZGF0ZWRJblZlciI6IjM1LjE0NC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Summary
Add copyright notice detection to enforce the presence of copyright headers in Python files.
Configurable settings include: the relevant regular expression, the author name, and the minimum file size, similar to flake8-copyright.
Closes #3579