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

Migrate flake8_bugbear rules to unspecified to suggested #4616

Merged
merged 3 commits into from
May 24, 2023

Conversation

sladyn98
Copy link
Contributor

@sladyn98 sladyn98 commented May 24, 2023

Summary

This PR aims to migrate unspecified code to safe or maybe_correct

Refers: #4184

Test Plan

All tests pass

@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     18.5±0.60ms     2.2 MB/sec    1.04     19.3±0.64ms     2.1 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.3±0.10ms     3.9 MB/sec    1.02      4.4±0.19ms     3.8 MB/sec
linter/all-rules/numpy/globals.py          1.01   553.4±26.28µs     5.3 MB/sec    1.00   546.6±35.09µs     5.4 MB/sec
linter/all-rules/pydantic/types.py         1.00      7.6±0.18ms     3.4 MB/sec    1.00      7.6±0.23ms     3.4 MB/sec
linter/default-rules/large/dataset.py      1.00      8.7±0.41ms     4.7 MB/sec    1.01      8.8±0.20ms     4.6 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00  1882.1±69.96µs     8.8 MB/sec    1.01  1894.1±47.03µs     8.8 MB/sec
linter/default-rules/numpy/globals.py      1.00   227.8±12.27µs    13.0 MB/sec    1.01    229.1±8.38µs    12.9 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.9±0.11ms     6.6 MB/sec    1.01      3.9±0.08ms     6.5 MB/sec
parser/large/dataset.py                    1.00      6.6±0.15ms     6.2 MB/sec    1.02      6.7±0.20ms     6.1 MB/sec
parser/numpy/ctypeslib.py                  1.00  1301.5±31.06µs    12.8 MB/sec    1.01  1309.4±42.10µs    12.7 MB/sec
parser/numpy/globals.py                    1.00    129.1±4.05µs    22.9 MB/sec    1.01    130.5±5.69µs    22.6 MB/sec
parser/pydantic/types.py                   1.00      2.8±0.06ms     9.0 MB/sec    1.02      2.9±0.10ms     8.8 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     16.4±0.07ms     2.5 MB/sec    1.00     16.3±0.09ms     2.5 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.2±0.03ms     4.0 MB/sec    1.00      4.2±0.08ms     4.0 MB/sec
linter/all-rules/numpy/globals.py          1.00    496.8±5.20µs     5.9 MB/sec    1.00    496.5±9.50µs     5.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      6.9±0.05ms     3.7 MB/sec    1.00      6.9±0.05ms     3.7 MB/sec
linter/default-rules/large/dataset.py      1.00      8.1±0.06ms     5.0 MB/sec    1.00      8.1±0.06ms     5.0 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00  1740.3±20.14µs     9.6 MB/sec    1.01  1755.3±20.88µs     9.5 MB/sec
linter/default-rules/numpy/globals.py      1.00    203.3±2.38µs    14.5 MB/sec    1.02    208.1±6.44µs    14.2 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.7±0.03ms     7.0 MB/sec    1.02      3.7±0.03ms     6.8 MB/sec
parser/large/dataset.py                    1.00      6.4±0.04ms     6.3 MB/sec    1.01      6.5±0.09ms     6.3 MB/sec
parser/numpy/ctypeslib.py                  1.00  1220.2±16.50µs    13.6 MB/sec    1.00  1222.0±21.92µs    13.6 MB/sec
parser/numpy/globals.py                    1.00    123.9±1.38µs    23.8 MB/sec    1.01    125.0±2.27µs    23.6 MB/sec
parser/pydantic/types.py                   1.00      2.7±0.02ms     9.3 MB/sec    1.00      2.7±0.03ms     9.3 MB/sec

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave this to @charliermarsh to review. Reasoning about python semantics is still hard

@charliermarsh charliermarsh enabled auto-merge (squash) May 24, 2023 15:53
@charliermarsh charliermarsh merged commit 8c92154 into astral-sh:main May 24, 2023
@sladyn98 sladyn98 deleted the migrate-flake8-unspecified branch May 24, 2023 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants