-
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
[PLE0101
] error when __init__
returns a value
#3007
Conversation
(@r3m0t Run |
Fixed, I had to change |
Thanks for helping out: implementing pylint rules is really useful! Couple of minor things. Also note that the PR title is used for the changelog. The format for rules is "[ |
All addressed I think |
Don't see the changes, did you push? |
b427605
to
2b12452
Compare
Did you mean the PR title or the commit message itself? Yes, I just force pushed to update the commit message, and added the docs |
Ah sorry, posted two more comments but they were not submitted but still "pending" |
"""dummy class""" | ||
|
||
def __init__(self): | ||
self.callable = lambda: (yield 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.
What about including:
class MyClass:
def __init__(self):
def func():
return 3
self.value = func()
Any other cases?
/// ## Example | ||
/// ```python | ||
/// class InitReturnsValue: | ||
/// def __init__(self, i): |
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.
Add Instead do (example)
See other rules for examples
PLE0101
] error when __init__
returns a value
Welcome! Thanks for the contribution, and thanks to @sbrugman for the review. |
[![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://github.com/charliermarsh/ruff) | `^0.0.247` -> `^0.0.248` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.248/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.248/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.248/compatibility-slim/0.0.247)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.248/confidence-slim/0.0.247)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.248`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.248) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.247...v0.0.248) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Rules - \[`numpy`] numpy-legacy-random by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2960](https://github.com/charliermarsh/ruff/pull/2960) - \[`pycodestyle`] autofix useless semicolons by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/3001](https://github.com/charliermarsh/ruff/pull/3001) - \[`pep8-naming`] Implement `flake8-module-naming` by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2855](https://github.com/charliermarsh/ruff/pull/2855) - \[`flake8-self`] Ignore namedtuple methods in flake8-self by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2998](https://github.com/charliermarsh/ruff/pull/2998) - \[`flake8-simplify`] Merge convert-loop-to-any & convert-loop-to-all to reimplemented-builtin by [@​not-my-profile](https://github.com/not-my-profile) in [https://github.com/charliermarsh/ruff/pull/2903](https://github.com/charliermarsh/ruff/pull/2903) - \[`ruff`] Add support for `ensure_future` for RUF006 by [@​Lunarmagpie](https://github.com/Lunarmagpie) in [https://github.com/charliermarsh/ruff/pull/2943](https://github.com/charliermarsh/ruff/pull/2943) - \[`pylint`] error when `__init__` returns a value by [@​r3m0t](https://github.com/r3m0t) in [https://github.com/charliermarsh/ruff/pull/3007](https://github.com/charliermarsh/ruff/pull/3007) - \[`flake8-pytest-style`] autofix for composite-assertion (PT018) by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2732](https://github.com/charliermarsh/ruff/pull/2732) - \[`flake8-tidy-imports`] extend autofix of relative imports by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2990](https://github.com/charliermarsh/ruff/pull/2990) ##### Settings - Add support for file-scoped `noqa` directives by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2978](https://github.com/charliermarsh/ruff/pull/2978) - Add configuration option for C408 to allow dict calls with keyword arguments. by [@​manueljacob](https://github.com/manueljacob) in [https://github.com/charliermarsh/ruff/pull/2977](https://github.com/charliermarsh/ruff/pull/2977) - feat(isort): Implement isort.force_to_top by [@​spaceone](https://github.com/spaceone) in [https://github.com/charliermarsh/ruff/pull/2877](https://github.com/charliermarsh/ruff/pull/2877) ##### Bug Fixes - Fix add-required-import with multi-line offsets by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2946](https://github.com/charliermarsh/ruff/pull/2946) - Support positional messages in assertion rewrites by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3002](https://github.com/charliermarsh/ruff/pull/3002) - Avoid false-positives for break in with by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3032](https://github.com/charliermarsh/ruff/pull/3032) - Avoid trying to fix implicit returns with control flow by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2962](https://github.com/charliermarsh/ruff/pull/2962) - Handle non-from **future** imports by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2974](https://github.com/charliermarsh/ruff/pull/2974) - Enforce D403 on methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2992](https://github.com/charliermarsh/ruff/pull/2992) - Avoid zero-indexed column for IOError by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2995](https://github.com/charliermarsh/ruff/pull/2995) - Fix for F541 unescape f-string by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2971](https://github.com/charliermarsh/ruff/pull/2971) - Avoid raising `B027` violations in `.pyi` files by [@​JonathanPlasse](https://github.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3016](https://github.com/charliermarsh/ruff/pull/3016) #### New Contributors - [@​Lunarmagpie](https://github.com/Lunarmagpie) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2943](https://github.com/charliermarsh/ruff/pull/2943) - [@​manueljacob](https://github.com/manueljacob) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2966](https://github.com/charliermarsh/ruff/pull/2966) - [@​mwtoews](https://github.com/mwtoews) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2973](https://github.com/charliermarsh/ruff/pull/2973) - [@​ortem](https://github.com/ortem) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2976](https://github.com/charliermarsh/ruff/pull/2976) - [@​thatlittleboy](https://github.com/thatlittleboy) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3027](https://github.com/charliermarsh/ruff/pull/3027) - [@​r3m0t](https://github.com/r3m0t) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3007](https://github.com/charliermarsh/ruff/pull/3007) **Full Changelog**: astral-sh/ruff@v0.0.247...v0.0.248 </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:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNDMuMSIsInVwZGF0ZWRJblZlciI6IjM0LjE0My4xIn0=--> 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://github.com/charliermarsh/ruff) | `==0.0.247` -> `==0.0.253` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.253/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.253/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.253/compatibility-slim/0.0.247)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.253/confidence-slim/0.0.247)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.253`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.253) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.252...v0.0.253) <!-- Release notes generated using configuration in .github/release.yml at 386ca7c9a1bb7ebeb1457b605695c6a09e67092b --> #### What's Changed ##### Rules - \[`pyupgrade`] Avoid rewriting any PEP 604 runtime annotations by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3217](https://github.com/charliermarsh/ruff/pull/3217) - \[`pycodestyle`] Missing whitespace after keyword by [@​carlosmiei](https://github.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3225](https://github.com/charliermarsh/ruff/pull/3225) - \[`pycodestyle`] trailing-whitespace, blank-line-contains-whitespace (W291, W293) by [@​mknaw](https://github.com/mknaw) in [https://github.com/charliermarsh/ruff/pull/3122](https://github.com/charliermarsh/ruff/pull/3122) - \[`flake8-pyi`]: PYI009, PYI010, PYI021 by [@​sbdchd](https://github.com/sbdchd) in [https://github.com/charliermarsh/ruff/pull/3230](https://github.com/charliermarsh/ruff/pull/3230) - \[`flake8-pyi`]: PYI011, PYI014 by [@​sbdchd](https://github.com/sbdchd) in [https://github.com/charliermarsh/ruff/pull/3238](https://github.com/charliermarsh/ruff/pull/3238) - \[`flake8-django`] DJ003, DJ006, DJ007 by [@​lkh42t](https://github.com/lkh42t) in [https://github.com/charliermarsh/ruff/pull/3236](https://github.com/charliermarsh/ruff/pull/3236) - \[`pylint`] Implement pylint's `else-if-used` rule (`PLR5501`) by [@​chanman3388](https://github.com/chanman3388) in [https://github.com/charliermarsh/ruff/pull/3231](https://github.com/charliermarsh/ruff/pull/3231) - \[`pylint`] W0603: global-statement by [@​igozali](https://github.com/igozali) in [https://github.com/charliermarsh/ruff/pull/3227](https://github.com/charliermarsh/ruff/pull/3227) - \[`flake8-pie`] Unnecessary list comprehension, with autofix (PIE802) by [@​matthewlloyd](https://github.com/matthewlloyd) in [https://github.com/charliermarsh/ruff/pull/3149](https://github.com/charliermarsh/ruff/pull/3149) ##### Settings - Allow ruff.toml file to be dot-prefixed (as .ruff.toml) by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3221](https://github.com/charliermarsh/ruff/pull/3221) - \[`pydocstyle`]: Implement `ignore-decorators` by [@​edgarrmondragon](https://github.com/edgarrmondragon) in [https://github.com/charliermarsh/ruff/pull/3229](https://github.com/charliermarsh/ruff/pull/3229) ##### Bug Fixes - Avoid suggesting 'is' for constant literals by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3146](https://github.com/charliermarsh/ruff/pull/3146) - Omit non-.py\[i] files from module naming rules by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3153](https://github.com/charliermarsh/ruff/pull/3153) - Bind star patterns in match statements by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3169](https://github.com/charliermarsh/ruff/pull/3169) - Update RustPython to support \*tuple annotations by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3178](https://github.com/charliermarsh/ruff/pull/3178) - Use `writeln` with --show-settings by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3180](https://github.com/charliermarsh/ruff/pull/3180) - Avoid boolean-trap rules for ConfigParser get() methods by [@​monosans](https://github.com/monosans) in [https://github.com/charliermarsh/ruff/pull/3209](https://github.com/charliermarsh/ruff/pull/3209) - Avoid flagging logging-too-few-args with no arguments by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3220](https://github.com/charliermarsh/ruff/pull/3220) - Expand the range of the COM812 autofix to include the preceding token by [@​matthewlloyd](https://github.com/matthewlloyd) in [https://github.com/charliermarsh/ruff/pull/3241](https://github.com/charliermarsh/ruff/pull/3241) - Avoid flagging Pylint logging rules with starred arguments by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3244](https://github.com/charliermarsh/ruff/pull/3244) - Avoid flagging unfixable `TypedDict` and `NamedTuple` definitions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3148](https://github.com/charliermarsh/ruff/pull/3148) - Fix ExceptionGroup F821 false positive by [@​JonathanPlasse](https://github.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3167](https://github.com/charliermarsh/ruff/pull/3167) - Avoid autofixing some PT violations when comments are present by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3198](https://github.com/charliermarsh/ruff/pull/3198) - Exclude globsets for --show-settings by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3201](https://github.com/charliermarsh/ruff/pull/3201) - \[`flake8-tidy-imports`] fix autofix for relative imports by [@​sciyoshi](https://github.com/sciyoshi) in [https://github.com/charliermarsh/ruff/pull/3197](https://github.com/charliermarsh/ruff/pull/3197) - Fix Markdown errors in docs by [@​JonathanPlasse](https://github.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3187](https://github.com/charliermarsh/ruff/pull/3187) - Normalize treatment of aliased and unaliased imports by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3216](https://github.com/charliermarsh/ruff/pull/3216) - Avoid EXE001 and EXE002 errors from stdin input by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3218](https://github.com/charliermarsh/ruff/pull/3218) - \[bandit]: Do not treat "passed" as "password" for `S105`/`S106`/`S107` by [@​edgarrmondragon](https://github.com/edgarrmondragon) in [https://github.com/charliermarsh/ruff/pull/3222](https://github.com/charliermarsh/ruff/pull/3222) #### New Contributors - [@​mknaw](https://github.com/mknaw) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3122](https://github.com/charliermarsh/ruff/pull/3122) - [@​monosans](https://github.com/monosans) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3209](https://github.com/charliermarsh/ruff/pull/3209) - [@​lkh42t](https://github.com/lkh42t) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3236](https://github.com/charliermarsh/ruff/pull/3236) - [@​igozali](https://github.com/igozali) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3227](https://github.com/charliermarsh/ruff/pull/3227) **Full Changelog**: astral-sh/ruff@v0.0.252...v0.0.253 ### [`v0.0.252`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.252) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.251...v0.0.252) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Rules - \[`pylint`] `redefined-loop-name` (`W2901`) by [@​matthewlloyd](https://github.com/matthewlloyd) in [https://github.com/charliermarsh/ruff/pull/3022](https://github.com/charliermarsh/ruff/pull/3022) - \[`pylint`] ` logging-too-many-args ` (`E1205`) by [@​md384](https://github.com/md384) in [https://github.com/charliermarsh/ruff/pull/3084](https://github.com/charliermarsh/ruff/pull/3084) - \[`pylint`] ` logging-too-few-args ` (`E1206`) by [@​md384](https://github.com/md384) in [https://github.com/charliermarsh/ruff/pull/3084](https://github.com/charliermarsh/ruff/pull/3084) ##### Bug Fixes - Include file permissions in cache key by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3104](https://github.com/charliermarsh/ruff/pull/3104) - Skip EXE001 and EXE002 rules on Windows by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3111](https://github.com/charliermarsh/ruff/pull/3111) - Mark `typing.assert_never` as no return by [@​bluetech](https://github.com/bluetech) in [https://github.com/charliermarsh/ruff/pull/3121](https://github.com/charliermarsh/ruff/pull/3121) - Use file-specific quote for C408 by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3128](https://github.com/charliermarsh/ruff/pull/3128) - Avoid match statement misidentification in token rules by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3129](https://github.com/charliermarsh/ruff/pull/3129) - Upgrade RustPython to handle trailing commas in map patterns by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3130](https://github.com/charliermarsh/ruff/pull/3130) - Avoid useless-else-on-loop for break within match by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3136](https://github.com/charliermarsh/ruff/pull/3136) - Fix isort `no-lines-before` preceded by an empty section by [@​bluetech](https://github.com/bluetech) in [https://github.com/charliermarsh/ruff/pull/3139](https://github.com/charliermarsh/ruff/pull/3139) - Support shell expansion for --config argument by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3107](https://github.com/charliermarsh/ruff/pull/3107) - Fix =/== error in `ManualDictLookup` by [@​Rupt](https://github.com/Rupt) in [https://github.com/charliermarsh/ruff/pull/3117](https://github.com/charliermarsh/ruff/pull/3117) - Include match in nested block check by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3137](https://github.com/charliermarsh/ruff/pull/3137) - Upgrade RustPython to match new flattened exports by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3141](https://github.com/charliermarsh/ruff/pull/3141) #### New Contributors - [@​md384](https://github.com/md384) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3084](https://github.com/charliermarsh/ruff/pull/3084) - [@​Rupt](https://github.com/Rupt) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3117](https://github.com/charliermarsh/ruff/pull/3117) - [@​marijncv](https://github.com/marijncv) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3133](https://github.com/charliermarsh/ruff/pull/3133) **Full Changelog**: astral-sh/ruff@v0.0.251...v0.0.252 ### [`v0.0.251`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.251) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.250...v0.0.251) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Bug Fixes - Create bindings for `MatchAs` patterns by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3098](https://github.com/charliermarsh/ruff/pull/3098) - Avoid prefer-list-builtin for lambdas with `*args` or `**kwargs` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3102](https://github.com/charliermarsh/ruff/pull/3102) **Full Changelog**: astral-sh/ruff@v0.0.250...v0.0.251 ### [`v0.0.250`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.250) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.249...v0.0.250) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed **Ruff now supports all Python 3.10 and 3.11 language features**, including: - Structural Pattern Patching (`match` statements) ([PEP 634](https://peps.python.org/pep-0634/#class-patterns)) - Exception Groups (`except*` statements) ([PEP 654](https://peps.python.org/pep-0654/)) ##### Rules - \[`flake8-bugbear`] Add B029 (`except-with-empty-tuple`) from flake8-bugbear by [@​carlosmiei](https://github.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3068](https://github.com/charliermarsh/ruff/pull/3068) - \[`flake8-bugbear`] Add B032 (`unintentional-type-annotation`) from flake8\_bugbear by [@​carlosmiei](https://github.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3085](https://github.com/charliermarsh/ruff/pull/3085) - \[`tryceratops`]: Add TRY401 (`verbose-log-messages`) by [@​colin99d](https://github.com/colin99d) in [https://github.com/charliermarsh/ruff/pull/3036](https://github.com/charliermarsh/ruff/pull/3036) - \[`flake8-simplify`]: Add SIM116 (`manual-dict-lookup`) by [@​colin99d](https://github.com/colin99d) in [https://github.com/charliermarsh/ruff/pull/2767](https://github.com/charliermarsh/ruff/pull/2767) ##### Features - Add support for TryStar by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3089](https://github.com/charliermarsh/ruff/pull/3089) - Add support for structural pattern matching by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3047](https://github.com/charliermarsh/ruff/pull/3047) ##### Bug Fixes - \[`flake8-pytest`] Use LibCST to fix chained assertions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3087](https://github.com/charliermarsh/ruff/pull/3087) - \[`flake8-boolean-trap`] Avoid boolean-trap rules for positional-only builtin calls by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3075](https://github.com/charliermarsh/ruff/pull/3075) - \[`flake8-boolean-trap`] Ignore setters in flake8-boolean-trap by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3092](https://github.com/charliermarsh/ruff/pull/3092) - \[`flake8-return`] Omit `while-True` loops from implicit return enforcement by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3076](https://github.com/charliermarsh/ruff/pull/3076) #### New Contributors - [@​carlosmiei](https://github.com/carlosmiei) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3068](https://github.com/charliermarsh/ruff/pull/3068) **Full Changelog**: astral-sh/ruff@v0.0.249...v0.0.250 ### [`v0.0.249`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.249) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.248...v0.0.249) <!-- Release notes generated using configuration in .github/release.yml at 4cfa350112a82fb631909fc555588f3da8ba5750 --> #### What's Changed ##### Bug Fixes - Relax constraints on pep8-naming module validation by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3043](https://github.com/charliermarsh/ruff/pull/3043) - Do not autofix `E731` in class bodies by [@​JoshKarpel](https://github.com/JoshKarpel) in [https://github.com/charliermarsh/ruff/pull/3050](https://github.com/charliermarsh/ruff/pull/3050) - Avoid assert() to assert statement conversion in expressions by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3062](https://github.com/charliermarsh/ruff/pull/3062) #### New Contributors - [@​matthewlloyd](https://github.com/matthewlloyd) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3048](https://github.com/charliermarsh/ruff/pull/3048) - [@​JoshKarpel](https://github.com/JoshKarpel) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3050](https://github.com/charliermarsh/ruff/pull/3050) **Full Changelog**: astral-sh/ruff@v0.0.248...v0.0.249 ### [`v0.0.248`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.248) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.247...v0.0.248) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Rules - \[`numpy`] numpy-legacy-random by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2960](https://github.com/charliermarsh/ruff/pull/2960) - \[`pycodestyle`] autofix useless semicolons by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/3001](https://github.com/charliermarsh/ruff/pull/3001) - \[`pep8-naming`] Implement `flake8-module-naming` by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2855](https://github.com/charliermarsh/ruff/pull/2855) - \[`flake8-self`] Ignore namedtuple methods in flake8-self by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2998](https://github.com/charliermarsh/ruff/pull/2998) - \[`flake8-simplify`] Merge convert-loop-to-any & convert-loop-to-all to reimplemented-builtin by [@​not-my-profile](https://github.com/not-my-profile) in [https://github.com/charliermarsh/ruff/pull/2903](https://github.com/charliermarsh/ruff/pull/2903) - \[`ruff`] Add support for `ensure_future` for RUF006 by [@​Lunarmagpie](https://github.com/Lunarmagpie) in [https://github.com/charliermarsh/ruff/pull/2943](https://github.com/charliermarsh/ruff/pull/2943) - \[`pylint`] error when `__init__` returns a value by [@​r3m0t](https://github.com/r3m0t) in [https://github.com/charliermarsh/ruff/pull/3007](https://github.com/charliermarsh/ruff/pull/3007) - \[`flake8-pytest-style`] autofix for composite-assertion (PT018) by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2732](https://github.com/charliermarsh/ruff/pull/2732) - \[`flake8-tidy-imports`] extend autofix of relative imports by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2990](https://github.com/charliermarsh/ruff/pull/2990) ##### Settings - Add support for file-scoped `noqa` directives by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2978](https://github.com/charliermarsh/ruff/pull/2978) - Add configuration option for C408 to allow dict calls with keyword arguments. by [@​manueljacob](https://github.com/manueljacob) in [https://github.com/charliermarsh/ruff/pull/2977](https://github.com/charliermarsh/ruff/pull/2977) - feat(isort): Implement isort.force_to_top by [@​spaceone](https://github.com/spaceone) in [https://github.com/charliermarsh/ruff/pull/2877](https://github.com/charliermarsh/ruff/pull/2877) ##### Bug Fixes - Fix add-required-import with multi-line offsets by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2946](https://github.com/charliermarsh/ruff/pull/2946) - Support positional messages in assertion rewrites by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3002](https://github.com/charliermarsh/ruff/pull/3002) - Avoid false-positives for break in with by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3032](https://github.com/charliermarsh/ruff/pull/3032) - Avoid trying to fix implicit returns with control flow by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2962](https://github.com/charliermarsh/ruff/pull/2962) - Handle non-from **future** imports by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2974](https://github.com/charliermarsh/ruff/pull/2974) - Enforce D403 on methods by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2992](https://github.com/charliermarsh/ruff/pull/2992) - Avoid zero-indexed column for IOError by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/2995](https://github.com/charliermarsh/ruff/pull/2995) - Fix for F541 unescape f-string by [@​sbrugman](https://github.com/sbrugman) in [https://github.com/charliermarsh/ruff/pull/2971](https://github.com/charliermarsh/ruff/pull/2971) - Avoid raising `B027` violations in `.pyi` files by [@​JonathanPlasse](https://github.com/JonathanPlasse) in [https://github.com/charliermarsh/ruff/pull/3016](https://github.com/charliermarsh/ruff/pull/3016) #### New Contributors - [@​Lunarmagpie](https://github.com/Lunarmagpie) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2943](https://github.com/charliermarsh/ruff/pull/2943) - [@​manueljacob](https://github.com/manueljacob) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2966](https://github.com/charliermarsh/ruff/pull/2966) - [@​mwtoews](https://github.com/mwtoews) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2973](https://github.com/charliermarsh/ruff/pull/2973) - [@​ortem](https://github.com/ortem) made their first contribution in [https://github.com/charliermarsh/ruff/pull/2976](https://github.com/charliermarsh/ruff/pull/2976) - [@​thatlittleboy](https://github.com/thatlittleboy) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3027](https://github.com/charliermarsh/ruff/pull/3027) - [@​r3m0t](https://github.com/r3m0t) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3007](https://github.com/charliermarsh/ruff/pull/3007) **Full Changelog**: astral-sh/ruff@v0.0.247...v0.0.248 </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:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM0LjE1My4yIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
It's my first PR on any rust project 🥳
#970