-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 flake8-i18n #3741
Implement flake8-i18n #3741
Conversation
ed6f44a
to
58e2197
Compare
PR Check ResultsEcosystemℹ️ ecosystem check detected changes. (+1, -0, 0 error(s)) zulip (+1, -0)
+ corporate/lib/stripe.py:1010:17: INT001 f-string is resolved before function call; consider `_("string %s") % arg` BenchmarkLinux
Windows
|
crates/ruff/src/checkers/ast/mod.rs
Outdated
if let Some(diagnostic) = | ||
flake8_i18n::rules::f_string_in_i18n_func_call(args) | ||
{ | ||
self.diagnostics.push(diagnostic); | ||
} |
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.
Nit:
if let Some(diagnostic) = | |
flake8_i18n::rules::f_string_in_i18n_func_call(args) | |
{ | |
self.diagnostics.push(diagnostic); | |
} | |
self.diagnostics.extend(flake8_i18n::rules::f_string_in_i18n_func_call(args)) |
pub function_names: Option<Vec<String>>, | ||
|
||
#[option( | ||
default = r#"["_", "gettext", "ngettext"]"#, | ||
value_type = "list[str]", | ||
example = r#" | ||
[tool.ruff.flake8-i18n] | ||
extend-function-names = ["ugettetxt"] | ||
"# | ||
)] | ||
/// This will be appended to the function_names | ||
/// (or to the default values if that field is missing) | ||
pub extend_function_names: Option<Vec<String>>, |
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.
Can we use Vec<String>
directly or is it important to know whether the settings where empty vs None
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.
True, it's fine to use a regular Vec
here.
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.
After this change tests are failing in CI but no idea why, 'cause they pass locally.
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.
I see, some changes in main, I will rebase to fix them.
4477b04
to
fbc35f2
Compare
f3ed6bb
to
e8a8483
Compare
Nice work here. I made a few minor but otherwise merging as-is. Thanks for getting involved :) |
4a37e88
to
99f4970
Compare
.unwrap_or_else(default_func_names) | ||
.into_iter() | ||
.chain(options.extend_function_names) | ||
.collect(), |
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.
I changed this to use an iterator.
@@ -195,6 +195,8 @@ are: | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||
""" | |||
|
|||
- flake8-i18n, licensed as "GNU General Public License v2 (GPLv2)". |
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.
@charliermarsh -- I'm not certain on this but wanted to ask the question -- does including a GPL tool in Ruff mean that (all/part of) Ruff would be considered a derivative work for the purposes of GPL, and therefore that Ruff would need to be re-licenced (or this PR reverted or etc)? This is the first GPL tool to be integrated, and I wanted to flag the concern as early as possible. Thanks, Adam
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.
Lemme look into it.
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.
There are already other parts including GPL3 (flake8-django for instance).
- edit: well only that one, but I think GPL3 is even more infectious than GPL2.
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.
I'll have to get some more informed opinions on this, I'm not sure myself on whether these constitute derivative works.
If they do, and we'd have to re-license under GPL, then I'd err on the side of removing them, or going back to the authors and asking if they'd consider re-licensing under MIT or a dual license.
flake8-django
is confusing because on PyPI it appears dual-licensed, and it includes the MIT trove classifiers:
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.
I'll have to get some more informed opinions on this, I'm not sure myself on whether these constitute derivative works.
Sorry to cause the trouble and thank you both for looking in to this.
flake8-django
is confusing because on PyPI it appears dual-licensed, and it includes the MIT trove classifiers:
It seems this has been noted already: rocioar/flake8-django#101 and rocioar/flake8-django#102. Sorry not to have flagged this at the time for flake8-django
, but it seems the MIT
trove classifier may have been a mistake when that project adopted Poetry.
A
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.
No, thank you for calling this out! It's important to get right. I'll try to reach out to the flake8-django
maintainer.
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.
Hum... This is such a common "idea", I've done it before without even knowing about flake8-i18n. We were working in a project and switched to Python 3.6 and many members of a the team started to use f-strings inside _
. I became such a common mistake we had to "invent" our checker.
I'm not a lawyer, but I don't think this can be gathered as derivative work.
This reverts commit 5cb1203.
@charliermarsh should I talk to @vharitonsky to see if he can change the license for us or will you do it? |
@leiserfg - If you're willing to that'd be great. |
To be honest, I don't think this can be considered derivative work as we barely used some of their ideas, and ideas can be patented but not copyrighted. |
@charliermarsh I found another implementation that does basically the same and is licensed under BSD, is it fine if we reference that one instead? |
@leiserfg - Yeah that looks fine to me. I do think we could in theory include these rules without referencing |
Let's continue to use the |
Thx! |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://togithub.com/charliermarsh/ruff) | `^0.0.259` -> `^0.0.260` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/compatibility-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/confidence-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.260`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.260) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.259...v0.0.260) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Rules - \[`flake8-bugbear`] Add more immutable functions for `B008` by [@​rouge8](https://togithub.com/rouge8) in [https://github.com/charliermarsh/ruff/pull/3764](https://togithub.com/charliermarsh/ruff/pull/3764) - \[`flake8-bugbear`] Allow `pathlib.Path()` in `B008` by [@​rouge8](https://togithub.com/rouge8) in [https://github.com/charliermarsh/ruff/pull/3794](https://togithub.com/charliermarsh/ruff/pull/3794) - \[`flake8-bugbear`] Expand the scope of useless-expression (B018) by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3455](https://togithub.com/charliermarsh/ruff/pull/3455) - \[`flake8-bugbear`]: Implement rule `B031` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3680](https://togithub.com/charliermarsh/ruff/pull/3680) - \[`flake8-gettext`] Implement `flake8-gettext` by [@​leiserfg](https://togithub.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/3785](https://togithub.com/charliermarsh/ruff/pull/3785) - \[`flake8-logging-format`] Add support for `.log(level, msg)` calls in `flake8-logging-format` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3726](https://togithub.com/charliermarsh/ruff/pull/3726) - \[`flake8-logging-format`] Allow aliased `logging` module as a logger candidate by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3718](https://togithub.com/charliermarsh/ruff/pull/3718) - \[`flake8-pyi`] Add autofix for `PYI014` by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3729](https://togithub.com/charliermarsh/ruff/pull/3729) - \[`flake8-pyi`] Implement `PYI012` by [@​JBLDKY](https://togithub.com/JBLDKY) in [https://github.com/charliermarsh/ruff/pull/3743](https://togithub.com/charliermarsh/ruff/pull/3743) - \[`flake8-pyi`] Implement `PYI015` by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3728](https://togithub.com/charliermarsh/ruff/pull/3728) - \[`flake8-simplify`] Fix SIM222 and SIM223 false negative by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3740](https://togithub.com/charliermarsh/ruff/pull/3740) - \[`isort`]: support submodules in known\_(first|third)\_party config options by [@​astaric](https://togithub.com/astaric) in [https://github.com/charliermarsh/ruff/pull/3768](https://togithub.com/charliermarsh/ruff/pull/3768) - \[`pycodestyle`] Use unicode-width to determine line-length instead of character count by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/3714](https://togithub.com/charliermarsh/ruff/pull/3714) - \[`pydocstyle`] Implement autofix for `D403` by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3731](https://togithub.com/charliermarsh/ruff/pull/3731) - \[`pylint`] Avoid `useless-import alias` (`C0414`) in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3761](https://togithub.com/charliermarsh/ruff/pull/3761) - \[`pylint`] Exempt `PLR1711` and `RET501` if non-`None` annotation by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3705](https://togithub.com/charliermarsh/ruff/pull/3705) - \[`tryceratops`] Exempt return with side effects for TRY300 by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3780](https://togithub.com/charliermarsh/ruff/pull/3780) ##### Bug Fixes - Avoid parsing `ForwardRef` contents as type references by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3698](https://togithub.com/charliermarsh/ruff/pull/3698) - Avoid parsing f-strings in type annotations by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3699](https://togithub.com/charliermarsh/ruff/pull/3699) - Include `with` statements in complexity calculation by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3771](https://togithub.com/charliermarsh/ruff/pull/3771) - Use import alias locations for `pep8-naming` import rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3772](https://togithub.com/charliermarsh/ruff/pull/3772) - Allow `TID252` to fix all valid module paths by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3796](https://togithub.com/charliermarsh/ruff/pull/3796) - Fix SIM118 auto-fix by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3695](https://togithub.com/charliermarsh/ruff/pull/3695) - Avoid panics for implicitly concatenated forward references by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3700](https://togithub.com/charliermarsh/ruff/pull/3700) - Allow simple container literals as default values by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3703](https://togithub.com/charliermarsh/ruff/pull/3703) - Traverse over nested string type annotations by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3724](https://togithub.com/charliermarsh/ruff/pull/3724) - Use `wild::args()` and add `wild` as a dependency by [@​agriyakhetarpal](https://togithub.com/agriyakhetarpal) in [https://github.com/charliermarsh/ruff/pull/3739](https://togithub.com/charliermarsh/ruff/pull/3739) - Avoid overlong-line errors for lines that end with URLs by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3663](https://togithub.com/charliermarsh/ruff/pull/3663) - Sort statistics by count by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3748](https://togithub.com/charliermarsh/ruff/pull/3748) - Reduce explicit clones by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/3793](https://togithub.com/charliermarsh/ruff/pull/3793) - Add flymake-ruff to docs by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3800](https://togithub.com/charliermarsh/ruff/pull/3800) #### New Contributors - [@​agriyakhetarpal](https://togithub.com/agriyakhetarpal) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3739](https://togithub.com/charliermarsh/ruff/pull/3739) - [@​leiserfg](https://togithub.com/leiserfg) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3741](https://togithub.com/charliermarsh/ruff/pull/3741) - [@​JBLDKY](https://togithub.com/JBLDKY) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3743](https://togithub.com/charliermarsh/ruff/pull/3743) - [@​astaric](https://togithub.com/astaric) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3768](https://togithub.com/charliermarsh/ruff/pull/3768) **Full Changelog**: astral-sh/ruff@v0.0.259...v0.0.260 </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://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMi4xIiwidXBkYXRlZEluVmVyIjoiMzUuMjIuMSJ9--> Signed-off-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://togithub.com/charliermarsh/ruff) | `==0.0.259` -> `==0.0.260` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/compatibility-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/confidence-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.260`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.260) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.259...v0.0.260) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Rules - \[`flake8-bugbear`] Add more immutable functions for `B008` by [@​rouge8](https://togithub.com/rouge8) in [https://github.com/charliermarsh/ruff/pull/3764](https://togithub.com/charliermarsh/ruff/pull/3764) - \[`flake8-bugbear`] Allow `pathlib.Path()` in `B008` by [@​rouge8](https://togithub.com/rouge8) in [https://github.com/charliermarsh/ruff/pull/3794](https://togithub.com/charliermarsh/ruff/pull/3794) - \[`flake8-bugbear`] Expand the scope of useless-expression (B018) by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3455](https://togithub.com/charliermarsh/ruff/pull/3455) - \[`flake8-bugbear`]: Implement rule `B031` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3680](https://togithub.com/charliermarsh/ruff/pull/3680) - \[`flake8-gettext`] Implement `flake8-gettext` by [@​leiserfg](https://togithub.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/3785](https://togithub.com/charliermarsh/ruff/pull/3785) - \[`flake8-logging-format`] Add support for `.log(level, msg)` calls in `flake8-logging-format` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3726](https://togithub.com/charliermarsh/ruff/pull/3726) - \[`flake8-logging-format`] Allow aliased `logging` module as a logger candidate by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3718](https://togithub.com/charliermarsh/ruff/pull/3718) - \[`flake8-pyi`] Add autofix for `PYI014` by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3729](https://togithub.com/charliermarsh/ruff/pull/3729) - \[`flake8-pyi`] Implement `PYI012` by [@​JBLDKY](https://togithub.com/JBLDKY) in [https://github.com/charliermarsh/ruff/pull/3743](https://togithub.com/charliermarsh/ruff/pull/3743) - \[`flake8-pyi`] Implement `PYI015` by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3728](https://togithub.com/charliermarsh/ruff/pull/3728) - \[`flake8-simplify`] Fix SIM222 and SIM223 false negative by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3740](https://togithub.com/charliermarsh/ruff/pull/3740) - \[`isort`]: support submodules in known\_(first|third)\_party config options by [@​astaric](https://togithub.com/astaric) in [https://github.com/charliermarsh/ruff/pull/3768](https://togithub.com/charliermarsh/ruff/pull/3768) - \[`pycodestyle`] Use unicode-width to determine line-length instead of character count by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/3714](https://togithub.com/charliermarsh/ruff/pull/3714) - \[`pydocstyle`] Implement autofix for `D403` by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3731](https://togithub.com/charliermarsh/ruff/pull/3731) - \[`pylint`] Avoid `useless-import alias` (`C0414`) in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3761](https://togithub.com/charliermarsh/ruff/pull/3761) - \[`pylint`] Exempt `PLR1711` and `RET501` if non-`None` annotation by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3705](https://togithub.com/charliermarsh/ruff/pull/3705) - \[`tryceratops`] Exempt return with side effects for TRY300 by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3780](https://togithub.com/charliermarsh/ruff/pull/3780) ##### Bug Fixes - Avoid parsing `ForwardRef` contents as type references by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3698](https://togithub.com/charliermarsh/ruff/pull/3698) - Avoid parsing f-strings in type annotations by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3699](https://togithub.com/charliermarsh/ruff/pull/3699) - Include `with` statements in complexity calculation by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3771](https://togithub.com/charliermarsh/ruff/pull/3771) - Use import alias locations for `pep8-naming` import rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3772](https://togithub.com/charliermarsh/ruff/pull/3772) - Allow `TID252` to fix all valid module paths by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3796](https://togithub.com/charliermarsh/ruff/pull/3796) - Fix SIM118 auto-fix by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3695](https://togithub.com/charliermarsh/ruff/pull/3695) - Avoid panics for implicitly concatenated forward references by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3700](https://togithub.com/charliermarsh/ruff/pull/3700) - Allow simple container literals as default values by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3703](https://togithub.com/charliermarsh/ruff/pull/3703) - Traverse over nested string type annotations by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3724](https://togithub.com/charliermarsh/ruff/pull/3724) - Use `wild::args()` and add `wild` as a dependency by [@​agriyakhetarpal](https://togithub.com/agriyakhetarpal) in [https://github.com/charliermarsh/ruff/pull/3739](https://togithub.com/charliermarsh/ruff/pull/3739) - Avoid overlong-line errors for lines that end with URLs by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3663](https://togithub.com/charliermarsh/ruff/pull/3663) - Sort statistics by count by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3748](https://togithub.com/charliermarsh/ruff/pull/3748) - Reduce explicit clones by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/3793](https://togithub.com/charliermarsh/ruff/pull/3793) - Add flymake-ruff to docs by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3800](https://togithub.com/charliermarsh/ruff/pull/3800) #### New Contributors - [@​agriyakhetarpal](https://togithub.com/agriyakhetarpal) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3739](https://togithub.com/charliermarsh/ruff/pull/3739) - [@​leiserfg](https://togithub.com/leiserfg) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3741](https://togithub.com/charliermarsh/ruff/pull/3741) - [@​JBLDKY](https://togithub.com/JBLDKY) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3743](https://togithub.com/charliermarsh/ruff/pull/3743) - [@​astaric](https://togithub.com/astaric) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3768](https://togithub.com/charliermarsh/ruff/pull/3768) **Full Changelog**: astral-sh/ruff@v0.0.259...v0.0.260 </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://app.renovatebot.com/dashboard#github/allenporter/pyrainbird). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMy4zIiwidXBkYXRlZEluVmVyIjoiMzUuMjMuMyJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://togithub.com/charliermarsh/ruff) | `==0.0.259` -> `==0.0.260` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/compatibility-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/confidence-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.260`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.260) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.259...v0.0.260) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Rules - \[`flake8-bugbear`] Add more immutable functions for `B008` by [@​rouge8](https://togithub.com/rouge8) in [https://github.com/charliermarsh/ruff/pull/3764](https://togithub.com/charliermarsh/ruff/pull/3764) - \[`flake8-bugbear`] Allow `pathlib.Path()` in `B008` by [@​rouge8](https://togithub.com/rouge8) in [https://github.com/charliermarsh/ruff/pull/3794](https://togithub.com/charliermarsh/ruff/pull/3794) - \[`flake8-bugbear`] Expand the scope of useless-expression (B018) by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3455](https://togithub.com/charliermarsh/ruff/pull/3455) - \[`flake8-bugbear`]: Implement rule `B031` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3680](https://togithub.com/charliermarsh/ruff/pull/3680) - \[`flake8-gettext`] Implement `flake8-gettext` by [@​leiserfg](https://togithub.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/3785](https://togithub.com/charliermarsh/ruff/pull/3785) - \[`flake8-logging-format`] Add support for `.log(level, msg)` calls in `flake8-logging-format` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3726](https://togithub.com/charliermarsh/ruff/pull/3726) - \[`flake8-logging-format`] Allow aliased `logging` module as a logger candidate by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/3718](https://togithub.com/charliermarsh/ruff/pull/3718) - \[`flake8-pyi`] Add autofix for `PYI014` by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3729](https://togithub.com/charliermarsh/ruff/pull/3729) - \[`flake8-pyi`] Implement `PYI012` by [@​JBLDKY](https://togithub.com/JBLDKY) in [https://github.com/charliermarsh/ruff/pull/3743](https://togithub.com/charliermarsh/ruff/pull/3743) - \[`flake8-pyi`] Implement `PYI015` by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3728](https://togithub.com/charliermarsh/ruff/pull/3728) - \[`flake8-simplify`] Fix SIM222 and SIM223 false negative by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3740](https://togithub.com/charliermarsh/ruff/pull/3740) - \[`isort`]: support submodules in known\_(first|third)\_party config options by [@​astaric](https://togithub.com/astaric) in [https://github.com/charliermarsh/ruff/pull/3768](https://togithub.com/charliermarsh/ruff/pull/3768) - \[`pycodestyle`] Use unicode-width to determine line-length instead of character count by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/3714](https://togithub.com/charliermarsh/ruff/pull/3714) - \[`pydocstyle`] Implement autofix for `D403` by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3731](https://togithub.com/charliermarsh/ruff/pull/3731) - \[`pylint`] Avoid `useless-import alias` (`C0414`) in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3761](https://togithub.com/charliermarsh/ruff/pull/3761) - \[`pylint`] Exempt `PLR1711` and `RET501` if non-`None` annotation by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3705](https://togithub.com/charliermarsh/ruff/pull/3705) - \[`tryceratops`] Exempt return with side effects for TRY300 by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3780](https://togithub.com/charliermarsh/ruff/pull/3780) ##### Bug Fixes - Avoid parsing `ForwardRef` contents as type references by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3698](https://togithub.com/charliermarsh/ruff/pull/3698) - Avoid parsing f-strings in type annotations by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3699](https://togithub.com/charliermarsh/ruff/pull/3699) - Include `with` statements in complexity calculation by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3771](https://togithub.com/charliermarsh/ruff/pull/3771) - Use import alias locations for `pep8-naming` import rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3772](https://togithub.com/charliermarsh/ruff/pull/3772) - Allow `TID252` to fix all valid module paths by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3796](https://togithub.com/charliermarsh/ruff/pull/3796) - Fix SIM118 auto-fix by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3695](https://togithub.com/charliermarsh/ruff/pull/3695) - Avoid panics for implicitly concatenated forward references by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3700](https://togithub.com/charliermarsh/ruff/pull/3700) - Allow simple container literals as default values by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3703](https://togithub.com/charliermarsh/ruff/pull/3703) - Traverse over nested string type annotations by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3724](https://togithub.com/charliermarsh/ruff/pull/3724) - Use `wild::args()` and add `wild` as a dependency by [@​agriyakhetarpal](https://togithub.com/agriyakhetarpal) in [https://github.com/charliermarsh/ruff/pull/3739](https://togithub.com/charliermarsh/ruff/pull/3739) - Avoid overlong-line errors for lines that end with URLs by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3663](https://togithub.com/charliermarsh/ruff/pull/3663) - Sort statistics by count by [@​JonathanPlasse](https://togithub.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3748](https://togithub.com/charliermarsh/ruff/pull/3748) - Reduce explicit clones by [@​MichaReiser](https://togithub.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/3793](https://togithub.com/charliermarsh/ruff/pull/3793) - Add flymake-ruff to docs by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3800](https://togithub.com/charliermarsh/ruff/pull/3800) #### New Contributors - [@​agriyakhetarpal](https://togithub.com/agriyakhetarpal) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3739](https://togithub.com/charliermarsh/ruff/pull/3739) - [@​leiserfg](https://togithub.com/leiserfg) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3741](https://togithub.com/charliermarsh/ruff/pull/3741) - [@​JBLDKY](https://togithub.com/JBLDKY) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3743](https://togithub.com/charliermarsh/ruff/pull/3743) - [@​astaric](https://togithub.com/astaric) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3768](https://togithub.com/charliermarsh/ruff/pull/3768) **Full Changelog**: astral-sh/ruff@v0.0.259...v0.0.260 </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://app.renovatebot.com/dashboard#github/allenporter/flux-local). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yMi4xIiwidXBkYXRlZEluVmVyIjoiMzUuMjIuMSJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Closes #3294.