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

Rename pathlib rules to match updated naming convention #3660

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

charliermarsh
Copy link
Member

Instead of PathlibAbspath, we want OsPathAbspath, as in "allow os.path.abspath".

See: #2902.

@charliermarsh charliermarsh changed the title Rename pathlib rules to match updated naming convention Rename pathlib rules to match updated naming convention Mar 22, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 22, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.01     16.8±0.50ms     2.4 MB/sec    1.00     16.7±0.42ms     2.4 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.01      4.4±0.17ms     3.8 MB/sec    1.00      4.3±0.20ms     3.8 MB/sec
linter/all-rules/numpy/globals.py          1.03   611.1±20.17µs     4.8 MB/sec    1.00   595.9±20.83µs     5.0 MB/sec
linter/all-rules/pydantic/types.py         1.00      7.3±0.22ms     3.5 MB/sec    1.00      7.4±0.28ms     3.5 MB/sec
linter/default-rules/large/dataset.py      1.04      9.1±0.39ms     4.5 MB/sec    1.00      8.8±0.29ms     4.6 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.03      2.0±0.09ms     8.3 MB/sec    1.00  1961.2±62.54µs     8.5 MB/sec
linter/default-rules/numpy/globals.py      1.01   240.3±10.93µs    12.3 MB/sec    1.00   238.8±11.01µs    12.4 MB/sec
linter/default-rules/pydantic/types.py     1.01      4.2±0.14ms     6.0 MB/sec    1.00      4.2±0.18ms     6.1 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     12.7±0.03ms     3.2 MB/sec    1.02     13.0±0.05ms     3.1 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      3.3±0.01ms     5.1 MB/sec    1.01      3.3±0.01ms     5.0 MB/sec
linter/all-rules/numpy/globals.py          1.00    369.7±2.24µs     8.0 MB/sec    1.02    375.4±2.44µs     7.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      5.5±0.05ms     4.6 MB/sec    1.01      5.6±0.02ms     4.6 MB/sec
linter/default-rules/large/dataset.py      1.00      7.1±0.01ms     5.7 MB/sec    1.03      7.4±0.05ms     5.5 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1478.6±5.00µs    11.3 MB/sec    1.02   1510.6±6.65µs    11.0 MB/sec
linter/default-rules/numpy/globals.py      1.00    153.4±1.06µs    19.2 MB/sec    1.03    158.3±4.08µs    18.6 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.2±0.01ms     7.9 MB/sec    1.03      3.3±0.04ms     7.7 MB/sec

Rule::PathlibMkdir,
Rule::PathlibMakedirs,
Rule::PathlibRename,
Rule::OsPathAbspath,
Copy link
Member

Choose a reason for hiding this comment

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

The name seems reasonable to me. Should we rename the StringDotFormat rule to StringFormat for consistency or rename these rules to OsDotPathDotAbspath (feels excessive to me)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I think renaming to StringFormat or StringFormatCall is reasonable.

@charliermarsh charliermarsh merged commit 875f61c into main Mar 22, 2023
@charliermarsh charliermarsh deleted the charlie/names branch March 22, 2023 15:35
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.

2 participants