Note: The pre-commit manager in Renovate is not supported by the pre-commit maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.
Release Notes
charliermarsh/ruff-pre-commit (charliermarsh/ruff-pre-commit)
### [`v0.0.276`](https://togithub.com/astral-sh/ruff-pre-commit/releases/tag/v0.0.276)
[Compare Source](https://togithub.com/charliermarsh/ruff-pre-commit/compare/v0.0.275...v0.0.276)
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.276
astral-sh/ruff (ruff)
### [`v0.0.276`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.276)
[Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.275...v0.0.276)
See the [release blog post](https://astral.sh/blog/ruff-v0.0.276) for more, including detailed descriptions of any newly added rules.
#### What's Changed
Highlights include: experimental support for linting Jupyter Notebooks.
To opt-in to linting Jupyter Notebook files, add the `*.ipynb` pattern to your [`include`](settings.md#include)
setting, like so:
```toml
[tool.ruff]
### Allow Ruff to discover `*.ipynb` files.
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
```
This will prompt Ruff to discover Jupyter Notebook files in any specified directories, and lint them
accordingly.
Jupyter Notebook support is currently opt-in and experimental. We'd love your help testing it out.
Have feedback? Run into issues? [Let us know!](https://togithub.com/astral-sh/ruff/issues/new)
##### New Rules
- \[`flake8-pyi`] Implement `PYI002`, `PYI003`, `PYI004`, `PYI005` by [@density](https://togithub.com/density) in [https://github.com/astral-sh/ruff/pull/5457](https://togithub.com/astral-sh/ruff/pull/5457)
- \[`numpy`] Implement `numpy-deprecated-function` (`NPY003`) by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5468](https://togithub.com/astral-sh/ruff/pull/5468)
- \[`perflint`] Implement `unnecessary-list-cast` (`PERF101`) by [@qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/5121](https://togithub.com/astral-sh/ruff/pull/5121)
- \[`perflint`] Implement `try-except-in-loop` (`PERF203`) by [@evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/5166](https://togithub.com/astral-sh/ruff/pull/5166)
- \[`perflint`] Implement `manual-list-comprehension` (`PERF401`) and `manual-list-copy` (`PERF402`) rules by [@qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/5298](https://togithub.com/astral-sh/ruff/pull/5298)
- \[`pylint`] Implement Pylint `single-string-used-for-slots` (`C0205`) as `single-string-slots` (`PLC0205`) by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5399](https://togithub.com/astral-sh/ruff/pull/5399)
##### Jupyter
- Experimental release for Jupyter notebook integration by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5363](https://togithub.com/astral-sh/ruff/pull/5363)
- Enable --watch for Jupyter notebooks by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5394](https://togithub.com/astral-sh/ruff/pull/5394)
- Consider Jupyter index for code frames (`--show-source`) by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5402](https://togithub.com/astral-sh/ruff/pull/5402)
- fixup! Consider Jupyter index for code frames (`--show-source`) ([#5402](https://togithub.com/astral-sh/ruff/issues/5402)) by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5414](https://togithub.com/astral-sh/ruff/pull/5414)
##### Settings
- \[`pyupgrade`] Restore the `keep-runtime-typing` setting by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5470](https://togithub.com/astral-sh/ruff/pull/5470)
- Add `PythonVersion::Py312` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5316](https://togithub.com/astral-sh/ruff/pull/5316)
##### Bug Fixes
- Support `pydantic.BaseSettings` in `mutable-class-default` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5312](https://togithub.com/astral-sh/ruff/pull/5312)
- Allow `__slots__` assignments in `mutable-class-default` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5314](https://togithub.com/astral-sh/ruff/pull/5314)
- Avoid syntax errors when removing f-string prefixes by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5319](https://togithub.com/astral-sh/ruff/pull/5319)
- Ignore unpacking in `iteration-over-set` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5392](https://togithub.com/astral-sh/ruff/pull/5392)
- Replace same length equal line with dash line in D407 by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5383](https://togithub.com/astral-sh/ruff/pull/5383)
- Exclude docstrings from PYI053 by [@intgr](https://togithub.com/intgr) in [https://github.com/astral-sh/ruff/pull/5405](https://togithub.com/astral-sh/ruff/pull/5405)
- Use "manual" fixability for E731 in shadowed context by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5430](https://togithub.com/astral-sh/ruff/pull/5430)
- Detect consecutive, non-newline-delimited NumPy sections by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5467](https://togithub.com/astral-sh/ruff/pull/5467)
- Fix `unnecessary-encode-utf8` to fix `encode` on parenthesized strings correctly by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5478](https://togithub.com/astral-sh/ruff/pull/5478)
- Allow `Final` assignments in stubs by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5490](https://togithub.com/astral-sh/ruff/pull/5490)
- Respect `abc` decorators when classifying function types by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5315](https://togithub.com/astral-sh/ruff/pull/5315)
- Allow `@Author` format for "Missing Author" rule in `flake8-todos` by [@mayrholu](https://togithub.com/mayrholu) in [https://github.com/astral-sh/ruff/pull/4903](https://togithub.com/astral-sh/ruff/pull/4903)
- Ignore type aliases for RUF013 by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5344](https://togithub.com/astral-sh/ruff/pull/5344)
- Change W605 autofix to use raw strings if possible by [@hauntsaninja](https://togithub.com/hauntsaninja) in [https://github.com/astral-sh/ruff/pull/5352](https://togithub.com/astral-sh/ruff/pull/5352)
- Add space when migrating to raw string by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5358](https://togithub.com/astral-sh/ruff/pull/5358)
- Update the `invalid-escape-sequence` rule by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5359](https://togithub.com/astral-sh/ruff/pull/5359)
- Include BaseException in B017 rule by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5466](https://togithub.com/astral-sh/ruff/pull/5466)
- \[`flake8-django`] Skip duplicate violations in `DJ012` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5469](https://togithub.com/astral-sh/ruff/pull/5469)
#### New Contributors
- [@mayrholu](https://togithub.com/mayrholu) made their first contribution in [https://github.com/astral-sh/ruff/pull/4903](https://togithub.com/astral-sh/ruff/pull/4903)
- [@hauntsaninja](https://togithub.com/hauntsaninja) made their first contribution in [https://github.com/astral-sh/ruff/pull/5352](https://togithub.com/astral-sh/ruff/pull/5352)
- [@ethunk](https://togithub.com/ethunk) made their first contribution in [https://github.com/astral-sh/ruff/pull/5397](https://togithub.com/astral-sh/ruff/pull/5397)
- [@LouisDISPA](https://togithub.com/LouisDISPA) made their first contribution in [https://github.com/astral-sh/ruff/pull/5475](https://togithub.com/astral-sh/ruff/pull/5475)
**Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.275...v0.0.276
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 these updates again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
v0.0.275
->v0.0.276
==0.0.275
->==0.0.276
Note: The
pre-commit
manager in Renovate is not supported by thepre-commit
maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.Release Notes
charliermarsh/ruff-pre-commit (charliermarsh/ruff-pre-commit)
### [`v0.0.276`](https://togithub.com/astral-sh/ruff-pre-commit/releases/tag/v0.0.276) [Compare Source](https://togithub.com/charliermarsh/ruff-pre-commit/compare/v0.0.275...v0.0.276) See: https://github.com/astral-sh/ruff/releases/tag/v0.0.276astral-sh/ruff (ruff)
### [`v0.0.276`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.276) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.275...v0.0.276) See the [release blog post](https://astral.sh/blog/ruff-v0.0.276) for more, including detailed descriptions of any newly added rules. #### What's Changed Highlights include: experimental support for linting Jupyter Notebooks. To opt-in to linting Jupyter Notebook files, add the `*.ipynb` pattern to your [`include`](settings.md#include) setting, like so: ```toml [tool.ruff] ### Allow Ruff to discover `*.ipynb` files. include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"] ``` This will prompt Ruff to discover Jupyter Notebook files in any specified directories, and lint them accordingly. Jupyter Notebook support is currently opt-in and experimental. We'd love your help testing it out. Have feedback? Run into issues? [Let us know!](https://togithub.com/astral-sh/ruff/issues/new) ##### New Rules - \[`flake8-pyi`] Implement `PYI002`, `PYI003`, `PYI004`, `PYI005` by [@density](https://togithub.com/density) in [https://github.com/astral-sh/ruff/pull/5457](https://togithub.com/astral-sh/ruff/pull/5457) - \[`numpy`] Implement `numpy-deprecated-function` (`NPY003`) by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5468](https://togithub.com/astral-sh/ruff/pull/5468) - \[`perflint`] Implement `unnecessary-list-cast` (`PERF101`) by [@qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/5121](https://togithub.com/astral-sh/ruff/pull/5121) - \[`perflint`] Implement `try-except-in-loop` (`PERF203`) by [@evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/astral-sh/ruff/pull/5166](https://togithub.com/astral-sh/ruff/pull/5166) - \[`perflint`] Implement `manual-list-comprehension` (`PERF401`) and `manual-list-copy` (`PERF402`) rules by [@qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/5298](https://togithub.com/astral-sh/ruff/pull/5298) - \[`pylint`] Implement Pylint `single-string-used-for-slots` (`C0205`) as `single-string-slots` (`PLC0205`) by [@tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5399](https://togithub.com/astral-sh/ruff/pull/5399) ##### Jupyter - Experimental release for Jupyter notebook integration by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5363](https://togithub.com/astral-sh/ruff/pull/5363) - Enable --watch for Jupyter notebooks by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5394](https://togithub.com/astral-sh/ruff/pull/5394) - Consider Jupyter index for code frames (`--show-source`) by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5402](https://togithub.com/astral-sh/ruff/pull/5402) - fixup! Consider Jupyter index for code frames (`--show-source`) ([#5402](https://togithub.com/astral-sh/ruff/issues/5402)) by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5414](https://togithub.com/astral-sh/ruff/pull/5414) ##### Settings - \[`pyupgrade`] Restore the `keep-runtime-typing` setting by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5470](https://togithub.com/astral-sh/ruff/pull/5470) - Add `PythonVersion::Py312` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5316](https://togithub.com/astral-sh/ruff/pull/5316) ##### Bug Fixes - Support `pydantic.BaseSettings` in `mutable-class-default` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5312](https://togithub.com/astral-sh/ruff/pull/5312) - Allow `__slots__` assignments in `mutable-class-default` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5314](https://togithub.com/astral-sh/ruff/pull/5314) - Avoid syntax errors when removing f-string prefixes by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5319](https://togithub.com/astral-sh/ruff/pull/5319) - Ignore unpacking in `iteration-over-set` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5392](https://togithub.com/astral-sh/ruff/pull/5392) - Replace same length equal line with dash line in D407 by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5383](https://togithub.com/astral-sh/ruff/pull/5383) - Exclude docstrings from PYI053 by [@intgr](https://togithub.com/intgr) in [https://github.com/astral-sh/ruff/pull/5405](https://togithub.com/astral-sh/ruff/pull/5405) - Use "manual" fixability for E731 in shadowed context by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5430](https://togithub.com/astral-sh/ruff/pull/5430) - Detect consecutive, non-newline-delimited NumPy sections by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5467](https://togithub.com/astral-sh/ruff/pull/5467) - Fix `unnecessary-encode-utf8` to fix `encode` on parenthesized strings correctly by [@harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5478](https://togithub.com/astral-sh/ruff/pull/5478) - Allow `Final` assignments in stubs by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5490](https://togithub.com/astral-sh/ruff/pull/5490) - Respect `abc` decorators when classifying function types by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5315](https://togithub.com/astral-sh/ruff/pull/5315) - Allow `@Author` format for "Missing Author" rule in `flake8-todos` by [@mayrholu](https://togithub.com/mayrholu) in [https://github.com/astral-sh/ruff/pull/4903](https://togithub.com/astral-sh/ruff/pull/4903) - Ignore type aliases for RUF013 by [@dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5344](https://togithub.com/astral-sh/ruff/pull/5344) - Change W605 autofix to use raw strings if possible by [@hauntsaninja](https://togithub.com/hauntsaninja) in [https://github.com/astral-sh/ruff/pull/5352](https://togithub.com/astral-sh/ruff/pull/5352) - Add space when migrating to raw string by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5358](https://togithub.com/astral-sh/ruff/pull/5358) - Update the `invalid-escape-sequence` rule by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5359](https://togithub.com/astral-sh/ruff/pull/5359) - Include BaseException in B017 rule by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5466](https://togithub.com/astral-sh/ruff/pull/5466) - \[`flake8-django`] Skip duplicate violations in `DJ012` by [@charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5469](https://togithub.com/astral-sh/ruff/pull/5469) #### New Contributors - [@mayrholu](https://togithub.com/mayrholu) made their first contribution in [https://github.com/astral-sh/ruff/pull/4903](https://togithub.com/astral-sh/ruff/pull/4903) - [@hauntsaninja](https://togithub.com/hauntsaninja) made their first contribution in [https://github.com/astral-sh/ruff/pull/5352](https://togithub.com/astral-sh/ruff/pull/5352) - [@ethunk](https://togithub.com/ethunk) made their first contribution in [https://github.com/astral-sh/ruff/pull/5397](https://togithub.com/astral-sh/ruff/pull/5397) - [@LouisDISPA](https://togithub.com/LouisDISPA) made their first contribution in [https://github.com/astral-sh/ruff/pull/5475](https://togithub.com/astral-sh/ruff/pull/5475) **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.275...v0.0.276Configuration
π 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 these updates again.
This PR has been generated by Mend Renovate. View repository job log here.