Skip to content
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

Avoid unused argument rules when functions call locals() #6578

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

charliermarsh
Copy link
Member

Closes #6576.

@charliermarsh charliermarsh added the bug Something isn't working label Aug 14, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 14, 2023

PR Check Results

Ecosystem

ℹ️ ecosystem check detected changes. (+0, -126, 0 error(s))

airflow (+0, -9)

- airflow/cli/cli_config.py:82:9: ARG002 Unused method argument: `help`
- airflow/cli/cli_config.py:83:9: ARG002 Unused method argument: `action`
- airflow/cli/cli_config.py:84:9: ARG002 Unused method argument: `default`
- airflow/cli/cli_config.py:85:9: ARG002 Unused method argument: `nargs`
- airflow/cli/cli_config.py:86:9: ARG002 Unused method argument: `type`
- airflow/cli/cli_config.py:87:9: ARG002 Unused method argument: `choices`
- airflow/cli/cli_config.py:88:9: ARG002 Unused method argument: `required`
- airflow/cli/cli_config.py:89:9: ARG002 Unused method argument: `metavar`
- airflow/cli/cli_config.py:90:9: ARG002 Unused method argument: `dest`

zulip (+0, -117)

- zerver/views/realm.py:101:5: ARG001 Unused function argument: `bot_creation_policy`
- zerver/views/realm.py:104:5: ARG001 Unused function argument: `create_public_stream_policy`
- zerver/views/realm.py:107:5: ARG001 Unused function argument: `create_private_stream_policy`
- zerver/views/realm.py:110:5: ARG001 Unused function argument: `create_web_public_stream_policy`
- zerver/views/realm.py:113:5: ARG001 Unused function argument: `invite_to_stream_policy`
- zerver/views/realm.py:116:5: ARG001 Unused function argument: `move_messages_between_streams_policy`
- zerver/views/realm.py:119:5: ARG001 Unused function argument: `user_group_edit_policy`
- zerver/views/realm.py:122:5: ARG001 Unused function argument: `private_message_policy`
- zerver/views/realm.py:125:5: ARG001 Unused function argument: `wildcard_mention_policy`
- zerver/views/realm.py:130:5: ARG001 Unused function argument: `default_code_block_language`
- zerver/views/realm.py:131:5: ARG001 Unused function argument: `digest_weekday`
- zerver/views/realm.py:140:5: ARG001 Unused function argument: `want_advertise_in_communities_directory`
- zerver/views/realm.py:143:5: ARG001 Unused function argument: `enable_read_receipts`
- zerver/views/realm.py:395:5: ARG001 Unused function argument: `dense_mode`
- zerver/views/realm.py:396:5: ARG001 Unused function argument: `web_mark_read_on_scroll_policy`
- zerver/views/realm.py:400:5: ARG001 Unused function argument: `starred_message_counts`
- zerver/views/realm.py:401:5: ARG001 Unused function argument: `fluid_layout_width`
- zerver/views/realm.py:402:5: ARG001 Unused function argument: `high_contrast_mode`
- zerver/views/realm.py:403:5: ARG001 Unused function argument: `color_scheme`
- zerver/views/realm.py:406:5: ARG001 Unused function argument: `translate_emoticons`
- zerver/views/realm.py:407:5: ARG001 Unused function argument: `display_emoji_reaction_users`
- zerver/views/realm.py:408:5: ARG001 Unused function argument: `default_view`
- zerver/views/realm.py:411:5: ARG001 Unused function argument: `escape_navigates_to_default_view`
- zerver/views/realm.py:412:5: ARG001 Unused function argument: `left_side_userlist`
- zerver/views/realm.py:413:5: ARG001 Unused function argument: `emojiset`
- zerver/views/realm.py:414:5: ARG001 Unused function argument: `demote_inactive_streams`
- zerver/views/realm.py:417:5: ARG001 Unused function argument: `enable_stream_desktop_notifications`
- zerver/views/realm.py:420:5: ARG001 Unused function argument: `enable_stream_email_notifications`
- zerver/views/realm.py:423:5: ARG001 Unused function argument: `enable_stream_push_notifications`
- zerver/views/realm.py:424:5: ARG001 Unused function argument: `enable_stream_audible_notifications`
- zerver/views/realm.py:427:5: ARG001 Unused function argument: `wildcard_mentions_notify`
- zerver/views/realm.py:428:5: ARG001 Unused function argument: `enable_followed_topic_desktop_notifications`
- zerver/views/realm.py:431:5: ARG001 Unused function argument: `enable_followed_topic_email_notifications`
- zerver/views/realm.py:434:5: ARG001 Unused function argument: `enable_followed_topic_push_notifications`
- zerver/views/realm.py:437:5: ARG001 Unused function argument: `enable_followed_topic_audible_notifications`
- zerver/views/realm.py:440:5: ARG001 Unused function argument: `enable_followed_topic_wildcard_mentions_notify`
- zerver/views/realm.py:444:5: ARG001 Unused function argument: `enable_desktop_notifications`
- zerver/views/realm.py:445:5: ARG001 Unused function argument: `enable_sounds`
- zerver/views/realm.py:446:5: ARG001 Unused function argument: `enable_offline_email_notifications`
- zerver/views/realm.py:449:5: ARG001 Unused function argument: `enable_offline_push_notifications`
- zerver/views/realm.py:452:5: ARG001 Unused function argument: `enable_online_push_notifications`
- zerver/views/realm.py:453:5: ARG001 Unused function argument: `enable_digest_emails`
- zerver/views/realm.py:462:5: ARG001 Unused function argument: `message_content_in_email_notifications`
- zerver/views/realm.py:465:5: ARG001 Unused function argument: `pm_content_in_desktop_notifications`
- zerver/views/realm.py:468:5: ARG001 Unused function argument: `desktop_icon_count_display`
- zerver/views/realm.py:471:5: ARG001 Unused function argument: `realm_name_in_email_notifications_policy`
- zerver/views/realm.py:475:5: ARG001 Unused function argument: `presence_enabled`
- zerver/views/realm.py:476:5: ARG001 Unused function argument: `enter_sends`
- zerver/views/realm.py:477:5: ARG001 Unused function argument: `enable_drafts_synchronization`
- zerver/views/realm.py:481:5: ARG001 Unused function argument: `twenty_four_hour_time`
- zerver/views/realm.py:482:5: ARG001 Unused function argument: `send_stream_typing_notifications`
- zerver/views/realm.py:483:5: ARG001 Unused function argument: `send_private_typing_notifications`
- zerver/views/realm.py:486:5: ARG001 Unused function argument: `send_read_receipts`
- zerver/views/realm.py:487:5: ARG001 Unused function argument: `user_list_style`
- zerver/views/realm.py:490:5: ARG001 Unused function argument: `email_address_visibility`
- zerver/views/realm.py:49:5: ARG001 Unused function argument: `name`
- zerver/views/realm.py:52:5: ARG001 Unused function argument: `description`
- zerver/views/realm.py:63:5: ARG001 Unused function argument: `name_changes_disabled`
- zerver/views/realm.py:64:5: ARG001 Unused function argument: `email_changes_disabled`
- zerver/views/realm.py:65:5: ARG001 Unused function argument: `avatar_changes_disabled`
- zerver/views/realm.py:66:5: ARG001 Unused function argument: `inline_image_preview`
- zerver/views/realm.py:67:5: ARG001 Unused function argument: `inline_url_embed_preview`
- zerver/views/realm.py:68:5: ARG001 Unused function argument: `add_custom_emoji_policy`
- zerver/views/realm.py:71:5: ARG001 Unused function argument: `delete_own_message_policy`
- zerver/views/realm.py:77:5: ARG001 Unused function argument: `allow_message_editing`
- zerver/views/realm.py:78:5: ARG001 Unused function argument: `edit_topic_policy`
- zerver/views/realm.py:81:5: ARG001 Unused function argument: `mandatory_topics`
- zerver/views/realm.py:85:5: ARG001 Unused function argument: `allow_edit_history`
- zerver/views/realm.py:96:5: ARG001 Unused function argument: `send_welcome_emails`
- zerver/views/realm.py:97:5: ARG001 Unused function argument: `digest_emails_enabled`
- zerver/views/realm.py:98:5: ARG001 Unused function argument: `message_content_allowed_in_email_notifications`
- zerver/views/streams.py:275:5: ARG001 Unused function argument: `can_remove_subscribers_group_id`
- zerver/views/user_groups.py:52:5: ARG001 Unused function argument: `can_mention_group_id`
- zerver/views/user_settings.py:160:5: ARG001 Unused function argument: `twenty_four_hour_time`
- zerver/views/user_settings.py:161:5: ARG001 Unused function argument: `dense_mode`
- zerver/views/user_settings.py:162:5: ARG001 Unused function argument: `web_mark_read_on_scroll_policy`
- zerver/views/user_settings.py:166:5: ARG001 Unused function argument: `starred_message_counts`
- zerver/views/user_settings.py:167:5: ARG001 Unused function argument: `fluid_layout_width`
- zerver/views/user_settings.py:168:5: ARG001 Unused function argument: `high_contrast_mode`
- zerver/views/user_settings.py:169:5: ARG001 Unused function argument: `color_scheme`
- zerver/views/user_settings.py:172:5: ARG001 Unused function argument: `translate_emoticons`
- zerver/views/user_settings.py:173:5: ARG001 Unused function argument: `display_emoji_reaction_users`
- zerver/views/user_settings.py:175:5: ARG001 Unused function argument: `default_view`
- zerver/views/user_settings.py:178:5: ARG001 Unused function argument: `escape_navigates_to_default_view`
- zerver/views/user_settings.py:179:5: ARG001 Unused function argument: `left_side_userlist`
- zerver/views/user_settings.py:180:5: ARG001 Unused function argument: `emojiset`
- zerver/views/user_settings.py:181:5: ARG001 Unused function argument: `demote_inactive_streams`
- zerver/views/user_settings.py:188:5: ARG001 Unused function argument: `enable_drafts_synchronization`
- zerver/views/user_settings.py:189:5: ARG001 Unused function argument: `enable_stream_desktop_notifications`
- zerver/views/user_settings.py:192:5: ARG001 Unused function argument: `enable_stream_email_notifications`
- zerver/views/user_settings.py:195:5: ARG001 Unused function argument: `enable_stream_push_notifications`
- zerver/views/user_settings.py:196:5: ARG001 Unused function argument: `enable_stream_audible_notifications`
- zerver/views/user_settings.py:199:5: ARG001 Unused function argument: `wildcard_mentions_notify`
- zerver/views/user_settings.py:200:5: ARG001 Unused function argument: `enable_followed_topic_desktop_notifications`
- zerver/views/user_settings.py:203:5: ARG001 Unused function argument: `enable_followed_topic_email_notifications`
- zerver/views/user_settings.py:206:5: ARG001 Unused function argument: `enable_followed_topic_push_notifications`
- zerver/views/user_settings.py:209:5: ARG001 Unused function argument: `enable_followed_topic_audible_notifications`
- zerver/views/user_settings.py:212:5: ARG001 Unused function argument: `enable_followed_topic_wildcard_mentions_notify`
- zerver/views/user_settings.py:216:5: ARG001 Unused function argument: `enable_desktop_notifications`
- zerver/views/user_settings.py:217:5: ARG001 Unused function argument: `enable_sounds`
- zerver/views/user_settings.py:218:5: ARG001 Unused function argument: `enable_offline_email_notifications`
- zerver/views/user_settings.py:221:5: ARG001 Unused function argument: `enable_offline_push_notifications`
- zerver/views/user_settings.py:224:5: ARG001 Unused function argument: `enable_online_push_notifications`
- zerver/views/user_settings.py:225:5: ARG001 Unused function argument: `enable_digest_emails`
- zerver/views/user_settings.py:226:5: ARG001 Unused function argument: `enable_login_emails`
- zerver/views/user_settings.py:227:5: ARG001 Unused function argument: `enable_marketing_emails`
- zerver/views/user_settings.py:228:5: ARG001 Unused function argument: `message_content_in_email_notifications`
- zerver/views/user_settings.py:231:5: ARG001 Unused function argument: `pm_content_in_desktop_notifications`
- zerver/views/user_settings.py:234:5: ARG001 Unused function argument: `desktop_icon_count_display`
- zerver/views/user_settings.py:237:5: ARG001 Unused function argument: `realm_name_in_email_notifications_policy`
- zerver/views/user_settings.py:241:5: ARG001 Unused function argument: `presence_enabled`
- zerver/views/user_settings.py:242:5: ARG001 Unused function argument: `enter_sends`
- zerver/views/user_settings.py:243:5: ARG001 Unused function argument: `send_private_typing_notifications`
- zerver/views/user_settings.py:246:5: ARG001 Unused function argument: `send_stream_typing_notifications`
- zerver/views/user_settings.py:247:5: ARG001 Unused function argument: `send_read_receipts`
- zerver/views/user_settings.py:248:5: ARG001 Unused function argument: `user_list_style`
- zerver/views/user_settings.py:251:5: ARG001 Unused function argument: `email_address_visibility`

Rules changed: 2
Rule Changes Additions Removals
ARG001 117 0 117
ARG002 9 0 9

Benchmark

Linux

group                                      main                                    pr
-----                                      ----                                    --
formatter/large/dataset.py                 1.06      4.2±0.24ms     9.8 MB/sec     1.00      3.9±0.37ms    10.4 MB/sec
formatter/numpy/ctypeslib.py               1.06   848.9±51.50µs    19.6 MB/sec     1.00   801.6±70.12µs    20.8 MB/sec
formatter/numpy/globals.py                 1.06     81.7±6.90µs    36.1 MB/sec     1.00     77.1±7.13µs    38.3 MB/sec
formatter/pydantic/types.py                1.03  1679.7±103.93µs    15.2 MB/sec    1.00  1627.1±200.96µs    15.7 MB/sec
linter/all-rules/large/dataset.py          1.09     12.7±0.71ms     3.2 MB/sec     1.00     11.6±0.58ms     3.5 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.09      3.4±0.19ms     4.9 MB/sec     1.00      3.1±0.20ms     5.4 MB/sec
linter/all-rules/numpy/globals.py          1.03   458.3±35.34µs     6.4 MB/sec     1.00   445.6±38.74µs     6.6 MB/sec
linter/all-rules/pydantic/types.py         1.03      6.3±0.45ms     4.0 MB/sec     1.00      6.2±0.34ms     4.1 MB/sec
linter/default-rules/large/dataset.py      1.11      6.8±0.29ms     6.0 MB/sec     1.00      6.1±0.32ms     6.7 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.12  1508.1±93.67µs    11.0 MB/sec     1.00  1348.9±87.02µs    12.3 MB/sec
linter/default-rules/numpy/globals.py      1.02   179.5±13.47µs    16.4 MB/sec     1.00   175.1±21.26µs    16.8 MB/sec
linter/default-rules/pydantic/types.py     1.09      3.1±0.14ms     8.3 MB/sec     1.00      2.8±0.16ms     9.1 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.00      4.2±0.07ms     9.7 MB/sec    1.00      4.2±0.06ms     9.7 MB/sec
formatter/numpy/ctypeslib.py               1.00   823.3±12.36µs    20.2 MB/sec    1.00   826.7±24.62µs    20.1 MB/sec
formatter/numpy/globals.py                 1.00     84.2±1.72µs    35.1 MB/sec    1.02     85.8±3.61µs    34.4 MB/sec
formatter/pydantic/types.py                1.00  1673.8±27.58µs    15.2 MB/sec    1.01  1689.4±35.02µs    15.1 MB/sec
linter/all-rules/large/dataset.py          1.00     12.6±0.11ms     3.2 MB/sec    1.03     13.0±0.22ms     3.1 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      3.5±0.06ms     4.8 MB/sec    1.02      3.5±0.05ms     4.7 MB/sec
linter/all-rules/numpy/globals.py          1.00    440.1±9.41µs     6.7 MB/sec    1.01    442.6±6.44µs     6.7 MB/sec
linter/all-rules/pydantic/types.py         1.00      6.6±0.08ms     3.9 MB/sec    1.04      6.8±0.20ms     3.7 MB/sec
linter/default-rules/large/dataset.py      1.00      7.0±0.06ms     5.8 MB/sec    1.00      7.0±0.08ms     5.8 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00  1498.8±16.81µs    11.1 MB/sec    1.01  1506.4±20.87µs    11.1 MB/sec
linter/default-rules/numpy/globals.py      1.00    176.0±2.57µs    16.8 MB/sec    1.00    176.7±3.32µs    16.7 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.1±0.03ms     8.1 MB/sec    1.01      3.2±0.04ms     8.0 MB/sec

@charliermarsh charliermarsh merged commit 17e7eae into main Aug 14, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/arg branch August 14, 2023 23:48
renovate bot referenced this pull request in allenporter/pyrainbird Aug 19, 2023
[![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://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.284`
-> `==0.0.285` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.285?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.285?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.284/0.0.285?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.284/0.0.285?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.285`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.285)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.284...v0.0.285)

#### What's Changed

##### New rules

- \[`flake8-pytest-style`] Implement `pytest-unittest-raises-assertion`
(`PT027`) by [@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/6554](https://togithub.com/astral-sh/ruff/pull/6554)
- \[`flake8-pytest-style`] Implement
`pytest-duplicate-parametrize-test-cases` (`PT014`) by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/6598](https://togithub.com/astral-sh/ruff/pull/6598)
- \[`flake8-tidy-imports`] Implement `banned-module-level-imports`
(`TID253`) by [@&#8203;durumu](https://togithub.com/durumu) in
[https://github.com/astral-sh/ruff/pull/6378](https://togithub.com/astral-sh/ruff/pull/6378)
- \[`pylint`] Implement `bad-dunder-name` (`W3201`) (in the Ruff
nursery) by [@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[https://github.com/astral-sh/ruff/pull/6486](https://togithub.com/astral-sh/ruff/pull/6486)
- \[`pylint`] Implement `subprocess-run-check` (`W1510`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/6487](https://togithub.com/astral-sh/ruff/pull/6487)
- \[`ruff`] Implement `quadratic-list-summation` (`RUF017`) by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[https://github.com/astral-sh/ruff/pull/6489](https://togithub.com/astral-sh/ruff/pull/6489)

##### Rule changes

- \[`flake8-bugbear`] Add autofix for `B006` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[https://github.com/astral-sh/ruff/pull/6131](https://togithub.com/astral-sh/ruff/pull/6131)
- \[`flake8-pyi`] Avoid applying `PYI055` to runtime-evaluated
annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6457](https://togithub.com/astral-sh/ruff/pull/6457)
- \[`flake8-self`] Allow `os._exit` accesses in `SLF001` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6490](https://togithub.com/astral-sh/ruff/pull/6490)
- \[`perflint`] Ignore `PERF203` if `try` contains loop control flow
statements by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[https://github.com/astral-sh/ruff/pull/6536](https://togithub.com/astral-sh/ruff/pull/6536)
- \[`pylint`] Check for invalid format type specifiers in nested
replacements for `PLE1300` by
[@&#8203;zanieb](https://togithub.com/zanieb) in
[https://github.com/astral-sh/ruff/pull/6616](https://togithub.com/astral-sh/ruff/pull/6616)
- \[`tryceratops`] Omit `NotImplementedError` from `TRY003` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6568](https://togithub.com/astral-sh/ruff/pull/6568)

##### Settings

- Respect `.ipynb` and `.pyi` sources when linting from stdin by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6628](https://togithub.com/astral-sh/ruff/pull/6628)
- Support glob patterns for `raises_require_match_for` and
`raises_require_match_for` by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/6635](https://togithub.com/astral-sh/ruff/pull/6635)

##### Bug Fixes

- Make `lambda-assignment` fix always-manual in class bodies by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6626](https://togithub.com/astral-sh/ruff/pull/6626)
- Fix counting of message arguments when msg is provided as a keyword by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6456](https://togithub.com/astral-sh/ruff/pull/6456)
- Add container types to `E721` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6469](https://togithub.com/astral-sh/ruff/pull/6469)
- Respect scoping rules when identifying builtins by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6468](https://togithub.com/astral-sh/ruff/pull/6468)
- Respect tab width in line-length heuristic by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6491](https://togithub.com/astral-sh/ruff/pull/6491)
- Respect dummy-variable-rgx for unused bound exceptions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6492](https://togithub.com/astral-sh/ruff/pull/6492)
- Fix detection of top-level imports with newlines in `E402` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6526](https://togithub.com/astral-sh/ruff/pull/6526)
- Allow if-expression with dual string arms in `invalid-envvar-value` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6538](https://togithub.com/astral-sh/ruff/pull/6538)
- Add deprecated unittest assertions to PT009 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6572](https://togithub.com/astral-sh/ruff/pull/6572)
- Avoid unused argument rules when functions call `locals()` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6578](https://togithub.com/astral-sh/ruff/pull/6578)
- Allow top-level `await` in Jupyter notebooks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6607](https://togithub.com/astral-sh/ruff/pull/6607)
- Don't detect `pandas#values` for stores, deletes, or class accesses by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6631](https://togithub.com/astral-sh/ruff/pull/6631)
- Avoid removing parentheses in `E712` fix by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6575](https://togithub.com/astral-sh/ruff/pull/6575)
- Skip whitespace between comments at start of file e.g. for `I002` by
[@&#8203;durumu](https://togithub.com/durumu) in
[https://github.com/astral-sh/ruff/pull/6523](https://togithub.com/astral-sh/ruff/pull/6523)
- Add support for nested replacements inside format specifications e.g.
for `PLE1300` by [@&#8203;zanieb](https://togithub.com/zanieb) in
[https://github.com/astral-sh/ruff/pull/6616](https://togithub.com/astral-sh/ruff/pull/6616)

##### Playground

- Shared playground links now use short URLs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6383](https://togithub.com/astral-sh/ruff/pull/6383)
- Fix possible JSON parse error on playground load by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6519](https://togithub.com/astral-sh/ruff/pull/6519)
- Fix unreachable panic in playground by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[https://github.com/astral-sh/ruff/pull/6623](https://togithub.com/astral-sh/ruff/pull/6623)

##### Performance

- Improve tokenizer performance for ASCII only identifiers by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[https://github.com/astral-sh/ruff/pull/6609](https://togithub.com/astral-sh/ruff/pull/6609)

#### New Contributors

- [@&#8203;magic-akari](https://togithub.com/magic-akari) made their
first contribution in
[https://github.com/astral-sh/ruff/pull/6472](https://togithub.com/astral-sh/ruff/pull/6472)
- [@&#8203;durumu](https://togithub.com/durumu) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6378](https://togithub.com/astral-sh/ruff/pull/6378)
- [@&#8203;jamesbraza](https://togithub.com/jamesbraza) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6520](https://togithub.com/astral-sh/ruff/pull/6520)
- [@&#8203;takumaw](https://togithub.com/takumaw) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6533](https://togithub.com/astral-sh/ruff/pull/6533)
- [@&#8203;noklam](https://togithub.com/noklam) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6573](https://togithub.com/astral-sh/ruff/pull/6573)
- [@&#8203;Teraskull](https://togithub.com/Teraskull) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6605](https://togithub.com/astral-sh/ruff/pull/6605)

**Full Changelog**:
astral-sh/ruff@v0.0.284...v0.0.285

</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:eyJjcmVhdGVkSW5WZXIiOiIzNi40My4yIiwidXBkYXRlZEluVmVyIjoiMzYuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in allenporter/flux-local Aug 20, 2023
[![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://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.284`
-> `==0.0.285` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.285?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.285?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.284/0.0.285?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.284/0.0.285?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.285`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.285)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.284...v0.0.285)

#### What's Changed

##### New rules

- \[`flake8-pytest-style`] Implement `pytest-unittest-raises-assertion`
(`PT027`) by [@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/6554](https://togithub.com/astral-sh/ruff/pull/6554)
- \[`flake8-pytest-style`] Implement
`pytest-duplicate-parametrize-test-cases` (`PT014`) by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/6598](https://togithub.com/astral-sh/ruff/pull/6598)
- \[`flake8-tidy-imports`] Implement `banned-module-level-imports`
(`TID253`) by [@&#8203;durumu](https://togithub.com/durumu) in
[https://github.com/astral-sh/ruff/pull/6378](https://togithub.com/astral-sh/ruff/pull/6378)
- \[`pylint`] Implement `bad-dunder-name` (`W3201`) (in the Ruff
nursery) by [@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[https://github.com/astral-sh/ruff/pull/6486](https://togithub.com/astral-sh/ruff/pull/6486)
- \[`pylint`] Implement `subprocess-run-check` (`W1510`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/6487](https://togithub.com/astral-sh/ruff/pull/6487)
- \[`ruff`] Implement `quadratic-list-summation` (`RUF017`) by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[https://github.com/astral-sh/ruff/pull/6489](https://togithub.com/astral-sh/ruff/pull/6489)

##### Rule changes

- \[`flake8-bugbear`] Add autofix for `B006` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[https://github.com/astral-sh/ruff/pull/6131](https://togithub.com/astral-sh/ruff/pull/6131)
- \[`flake8-pyi`] Avoid applying `PYI055` to runtime-evaluated
annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6457](https://togithub.com/astral-sh/ruff/pull/6457)
- \[`flake8-self`] Allow `os._exit` accesses in `SLF001` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6490](https://togithub.com/astral-sh/ruff/pull/6490)
- \[`perflint`] Ignore `PERF203` if `try` contains loop control flow
statements by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[https://github.com/astral-sh/ruff/pull/6536](https://togithub.com/astral-sh/ruff/pull/6536)
- \[`pylint`] Check for invalid format type specifiers in nested
replacements for `PLE1300` by
[@&#8203;zanieb](https://togithub.com/zanieb) in
[https://github.com/astral-sh/ruff/pull/6616](https://togithub.com/astral-sh/ruff/pull/6616)
- \[`tryceratops`] Omit `NotImplementedError` from `TRY003` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6568](https://togithub.com/astral-sh/ruff/pull/6568)

##### Settings

- Respect `.ipynb` and `.pyi` sources when linting from stdin by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6628](https://togithub.com/astral-sh/ruff/pull/6628)
- Support glob patterns for `raises_require_match_for` and
`raises_require_match_for` by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/6635](https://togithub.com/astral-sh/ruff/pull/6635)

##### Bug Fixes

- Make `lambda-assignment` fix always-manual in class bodies by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6626](https://togithub.com/astral-sh/ruff/pull/6626)
- Fix counting of message arguments when msg is provided as a keyword by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6456](https://togithub.com/astral-sh/ruff/pull/6456)
- Add container types to `E721` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6469](https://togithub.com/astral-sh/ruff/pull/6469)
- Respect scoping rules when identifying builtins by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6468](https://togithub.com/astral-sh/ruff/pull/6468)
- Respect tab width in line-length heuristic by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6491](https://togithub.com/astral-sh/ruff/pull/6491)
- Respect dummy-variable-rgx for unused bound exceptions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6492](https://togithub.com/astral-sh/ruff/pull/6492)
- Fix detection of top-level imports with newlines in `E402` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6526](https://togithub.com/astral-sh/ruff/pull/6526)
- Allow if-expression with dual string arms in `invalid-envvar-value` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6538](https://togithub.com/astral-sh/ruff/pull/6538)
- Add deprecated unittest assertions to PT009 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6572](https://togithub.com/astral-sh/ruff/pull/6572)
- Avoid unused argument rules when functions call `locals()` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6578](https://togithub.com/astral-sh/ruff/pull/6578)
- Allow top-level `await` in Jupyter notebooks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6607](https://togithub.com/astral-sh/ruff/pull/6607)
- Don't detect `pandas#values` for stores, deletes, or class accesses by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6631](https://togithub.com/astral-sh/ruff/pull/6631)
- Avoid removing parentheses in `E712` fix by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6575](https://togithub.com/astral-sh/ruff/pull/6575)
- Skip whitespace between comments at start of file e.g. for `I002` by
[@&#8203;durumu](https://togithub.com/durumu) in
[https://github.com/astral-sh/ruff/pull/6523](https://togithub.com/astral-sh/ruff/pull/6523)
- Add support for nested replacements inside format specifications e.g.
for `PLE1300` by [@&#8203;zanieb](https://togithub.com/zanieb) in
[https://github.com/astral-sh/ruff/pull/6616](https://togithub.com/astral-sh/ruff/pull/6616)

##### Playground

- Shared playground links now use short URLs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6383](https://togithub.com/astral-sh/ruff/pull/6383)
- Fix possible JSON parse error on playground load by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/6519](https://togithub.com/astral-sh/ruff/pull/6519)
- Fix unreachable panic in playground by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[https://github.com/astral-sh/ruff/pull/6623](https://togithub.com/astral-sh/ruff/pull/6623)

##### Performance

- Improve tokenizer performance for ASCII only identifiers by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[https://github.com/astral-sh/ruff/pull/6609](https://togithub.com/astral-sh/ruff/pull/6609)

#### New Contributors

- [@&#8203;magic-akari](https://togithub.com/magic-akari) made their
first contribution in
[https://github.com/astral-sh/ruff/pull/6472](https://togithub.com/astral-sh/ruff/pull/6472)
- [@&#8203;durumu](https://togithub.com/durumu) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6378](https://togithub.com/astral-sh/ruff/pull/6378)
- [@&#8203;jamesbraza](https://togithub.com/jamesbraza) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6520](https://togithub.com/astral-sh/ruff/pull/6520)
- [@&#8203;takumaw](https://togithub.com/takumaw) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6533](https://togithub.com/astral-sh/ruff/pull/6533)
- [@&#8203;noklam](https://togithub.com/noklam) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6573](https://togithub.com/astral-sh/ruff/pull/6573)
- [@&#8203;Teraskull](https://togithub.com/Teraskull) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/6605](https://togithub.com/astral-sh/ruff/pull/6605)

**Full Changelog**:
astral-sh/ruff@v0.0.284...v0.0.285

</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:eyJjcmVhdGVkSW5WZXIiOiIzNi40My4yIiwidXBkYXRlZEluVmVyIjoiMzYuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ARG002: false negative case with locals()
1 participant