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

Ignore ClassVar annotation for RUF008, RUF009 #4081

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

dhruvmanila
Copy link
Member

fixes: #4077

@github-actions
Copy link
Contributor

github-actions bot commented Apr 24, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.01     20.0±0.74ms     2.0 MB/sec    1.00     19.8±0.77ms     2.1 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.7±0.21ms     3.5 MB/sec    1.01      4.8±0.18ms     3.5 MB/sec
linter/all-rules/numpy/globals.py          1.00   606.4±20.47µs     4.9 MB/sec    1.00   608.8±27.58µs     4.8 MB/sec
linter/all-rules/pydantic/types.py         1.00      8.4±0.29ms     3.1 MB/sec    1.00      8.4±0.23ms     3.0 MB/sec
linter/default-rules/large/dataset.py      1.07      9.8±0.37ms     4.1 MB/sec    1.00      9.2±0.22ms     4.4 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.03      2.1±0.08ms     7.9 MB/sec    1.00      2.0±0.04ms     8.2 MB/sec
linter/default-rules/numpy/globals.py      1.03    252.0±7.41µs    11.7 MB/sec    1.00   244.1±12.81µs    12.1 MB/sec
linter/default-rules/pydantic/types.py     1.02      4.3±0.14ms     5.9 MB/sec    1.00      4.2±0.11ms     6.0 MB/sec
parser/large/dataset.py                    1.00      7.6±0.17ms     5.4 MB/sec    1.03      7.8±0.19ms     5.2 MB/sec
parser/numpy/ctypeslib.py                  1.00  1520.6±48.77µs    11.0 MB/sec    1.04  1576.2±97.17µs    10.6 MB/sec
parser/numpy/globals.py                    1.02   160.0±10.77µs    18.4 MB/sec    1.00    156.6±4.96µs    18.8 MB/sec
parser/pydantic/types.py                   1.00      3.3±0.09ms     7.6 MB/sec    1.00      3.3±0.09ms     7.6 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.01     16.7±0.10ms     2.4 MB/sec    1.00     16.5±0.09ms     2.5 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.4±0.05ms     3.8 MB/sec    1.00      4.3±0.05ms     3.8 MB/sec
linter/all-rules/numpy/globals.py          1.00    539.2±8.28µs     5.5 MB/sec    1.00    537.9±7.09µs     5.5 MB/sec
linter/all-rules/pydantic/types.py         1.01      7.1±0.11ms     3.6 MB/sec    1.00      7.1±0.07ms     3.6 MB/sec
linter/default-rules/large/dataset.py      1.02      8.7±0.05ms     4.7 MB/sec    1.00      8.5±0.04ms     4.8 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.01  1907.9±25.49µs     8.7 MB/sec    1.00  1883.6±31.51µs     8.8 MB/sec
linter/default-rules/numpy/globals.py      1.00    216.8±5.40µs    13.6 MB/sec    1.00    215.9±7.94µs    13.7 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.9±0.03ms     6.5 MB/sec    1.00      3.9±0.05ms     6.5 MB/sec
parser/large/dataset.py                    1.01      6.9±0.04ms     5.9 MB/sec    1.00      6.8±0.05ms     6.0 MB/sec
parser/numpy/ctypeslib.py                  1.01  1302.5±13.26µs    12.8 MB/sec    1.00  1288.6±11.59µs    12.9 MB/sec
parser/numpy/globals.py                    1.02    132.0±1.76µs    22.4 MB/sec    1.00    130.0±1.63µs    22.7 MB/sec
parser/pydantic/types.py                   1.01      2.9±0.02ms     8.7 MB/sec    1.00      2.9±0.02ms     8.7 MB/sec

@JonathanPlasse
Copy link
Contributor

Does typing.Final work correctly?

@charliermarsh charliermarsh enabled auto-merge (squash) April 24, 2023 23:53
@charliermarsh charliermarsh merged commit 37483f3 into astral-sh:main Apr 24, 2023
@dhruvmanila
Copy link
Member Author

Does typing.Final work correctly?

I don't think that's relevant here. Can you give me an example related to that?

@dhruvmanila dhruvmanila deleted the fix/ignore-classvar branch April 25, 2023 01:24
@JonathanPlasse
Copy link
Contributor

Yes, you are right.

renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request Apr 25, 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://togithub.com/charliermarsh/ruff) | `^0.0.262` ->
`^0.0.263` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/compatibility-slim/0.0.262)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/confidence-slim/0.0.262)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.263`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.263)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.262...v0.0.263)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Rules

- \[`flake8-bugbear`] Add `pytest.raises(Exception)` support to B017 by
[@&#8203;alanhdu](https://togithub.com/alanhdu) in
[astral-sh/ruff#4052
- \[`flake8-import-conventions`] Implement new rule `ICN003` to ban
`from ... import ...` for selected modules by
[@&#8203;edgarrmondragon](https://togithub.com/edgarrmondragon) in
[astral-sh/ruff#4040
- \[`pylint`] Implement PLE0302 `unexpected-special-method-signature` by
[@&#8203;mccullocht](https://togithub.com/mccullocht) in
[astral-sh/ruff#4075
- \[`pep8-naming`] Ignore `N815` for `TypedDict` fields by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4066

##### Bug Fixes

- Avoid `PYI015` for valid default value without annotation by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4043
- Avoid infinite-propagation of inline comments when force-splitting
imports by [@&#8203;charliermarsh](https://togithub.com/charliermarsh)
in
[astral-sh/ruff#4074
- Fix SIM222 and SIM223 false positives and auto-fix by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4063
- Unify positional and keyword arguments when checking for missing
arguments in docstring by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4067
- Avoid `RUF008` if field annotation is immutable by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4039
- Increment priority should be (branch-local, global) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4070
- Ignore `ClassVar` annotation for `RUF008`, `RUF009` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4081
- Support --fix in watch mode by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4035

#### New Contributors

- [@&#8203;alanhdu](https://togithub.com/alanhdu) made their first
contribution in
[astral-sh/ruff#4052
- [@&#8203;pronoym99](https://togithub.com/pronoym99) made their first
contribution in
[astral-sh/ruff#4055
- [@&#8203;Secrus](https://togithub.com/Secrus) made their first
contribution in
[astral-sh/ruff#4085
- [@&#8203;madkinsz](https://togithub.com/madkinsz) made their first
contribution in
[astral-sh/ruff#4084
- [@&#8203;mccullocht](https://togithub.com/mccullocht) made their first
contribution in
[astral-sh/ruff#4075

**Full Changelog**:
astral-sh/ruff@v0.0.262...v0.0.263

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS41OC4yIiwidXBkYXRlZEluVmVyIjoiMzUuNTguMiJ9-->

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/flux-local that referenced this pull request Apr 27, 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://togithub.com/charliermarsh/ruff) | `==0.0.262` ->
`==0.0.263` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/compatibility-slim/0.0.262)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/confidence-slim/0.0.262)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.263`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.263)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.262...v0.0.263)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Rules

- \[`flake8-bugbear`] Add `pytest.raises(Exception)` support to B017 by
[@&#8203;alanhdu](https://togithub.com/alanhdu) in
[astral-sh/ruff#4052
- \[`flake8-import-conventions`] Implement new rule `ICN003` to ban
`from ... import ...` for selected modules by
[@&#8203;edgarrmondragon](https://togithub.com/edgarrmondragon) in
[astral-sh/ruff#4040
- \[`pylint`] Implement PLE0302 `unexpected-special-method-signature` by
[@&#8203;mccullocht](https://togithub.com/mccullocht) in
[astral-sh/ruff#4075
- \[`pep8-naming`] Ignore `N815` for `TypedDict` fields by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4066

##### Bug Fixes

- Avoid `PYI015` for valid default value without annotation by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4043
- Avoid infinite-propagation of inline comments when force-splitting
imports by [@&#8203;charliermarsh](https://togithub.com/charliermarsh)
in
[astral-sh/ruff#4074
- Fix SIM222 and SIM223 false positives and auto-fix by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4063
- Unify positional and keyword arguments when checking for missing
arguments in docstring by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4067
- Avoid `RUF008` if field annotation is immutable by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4039
- Increment priority should be (branch-local, global) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4070
- Ignore `ClassVar` annotation for `RUF008`, `RUF009` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4081
- Support --fix in watch mode by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4035

#### New Contributors

- [@&#8203;alanhdu](https://togithub.com/alanhdu) made their first
contribution in
[astral-sh/ruff#4052
- [@&#8203;pronoym99](https://togithub.com/pronoym99) made their first
contribution in
[astral-sh/ruff#4055
- [@&#8203;Secrus](https://togithub.com/Secrus) made their first
contribution in
[astral-sh/ruff#4085
- [@&#8203;madkinsz](https://togithub.com/madkinsz) made their first
contribution in
[astral-sh/ruff#4084
- [@&#8203;mccullocht](https://togithub.com/mccullocht) made their first
contribution in
[astral-sh/ruff#4075

**Full Changelog**:
astral-sh/ruff@v0.0.262...v0.0.263

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS41OC4yIiwidXBkYXRlZEluVmVyIjoiMzUuNTguMiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/pyrainbird that referenced this pull request Apr 27, 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://togithub.com/charliermarsh/ruff) | `==0.0.262` ->
`==0.0.263` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/compatibility-slim/0.0.262)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.263/confidence-slim/0.0.262)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.263`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.263)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.262...v0.0.263)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

##### What's Changed

##### Rules

- \[`flake8-bugbear`] Add `pytest.raises(Exception)` support to B017 by
[@&#8203;alanhdu](https://togithub.com/alanhdu) in
[astral-sh/ruff#4052
- \[`flake8-import-conventions`] Implement new rule `ICN003` to ban
`from ... import ...` for selected modules by
[@&#8203;edgarrmondragon](https://togithub.com/edgarrmondragon) in
[astral-sh/ruff#4040
- \[`pylint`] Implement PLE0302 `unexpected-special-method-signature` by
[@&#8203;mccullocht](https://togithub.com/mccullocht) in
[astral-sh/ruff#4075
- \[`pep8-naming`] Ignore `N815` for `TypedDict` fields by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4066

##### Bug Fixes

- Avoid `PYI015` for valid default value without annotation by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4043
- Avoid infinite-propagation of inline comments when force-splitting
imports by [@&#8203;charliermarsh](https://togithub.com/charliermarsh)
in
[astral-sh/ruff#4074
- Fix SIM222 and SIM223 false positives and auto-fix by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4063
- Unify positional and keyword arguments when checking for missing
arguments in docstring by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4067
- Avoid `RUF008` if field annotation is immutable by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4039
- Increment priority should be (branch-local, global) by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4070
- Ignore `ClassVar` annotation for `RUF008`, `RUF009` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#4081
- Support --fix in watch mode by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#4035

##### New Contributors

- [@&#8203;alanhdu](https://togithub.com/alanhdu) made their first
contribution in
[astral-sh/ruff#4052
- [@&#8203;pronoym99](https://togithub.com/pronoym99) made their first
contribution in
[astral-sh/ruff#4055
- [@&#8203;Secrus](https://togithub.com/Secrus) made their first
contribution in
[astral-sh/ruff#4085
- [@&#8203;madkinsz](https://togithub.com/madkinsz) made their first
contribution in
[astral-sh/ruff#4084
- [@&#8203;mccullocht](https://togithub.com/mccullocht) made their first
contribution in
[astral-sh/ruff#4075

**Full Changelog**:
astral-sh/ruff@v0.0.262...v0.0.263

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS41OC4yIiwidXBkYXRlZEluVmVyIjoiMzUuNTguMiJ9-->

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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RUF008/RUF009 False positive on ClassVar
3 participants