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 non-abstract class attributes when enforcing B024 #11210

Merged
merged 2 commits into from
Apr 30, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

I think the check included here does make sense, but I don't see why we would allow it if a value is provided for the attribute -- since, in that case, isn't it not abstract?

Closes: #11208.

@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Apr 30, 2024
@charliermarsh charliermarsh marked this pull request as ready for review April 30, 2024 03:40
Copy link
Contributor

github-actions bot commented Apr 30, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+1 -0 violations, +0 -0 fixes in 1 projects; 43 projects unchanged)

DisnakeDev/disnake (+1 -0 violations, +0 -0 fixes)

+ disnake/app_commands.py:468:7: B024 `ApplicationCommand` is an abstract base class, but it has no abstract methods

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
B024 1 1 0 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+1 -0 violations, +0 -0 fixes in 1 projects; 43 projects unchanged)

DisnakeDev/disnake (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ disnake/app_commands.py:468:7: B024 `ApplicationCommand` is an abstract base class, but it has no abstract methods

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
B024 1 1 0 0 0

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM! I pushed to your branch to fix a couple of micro-nits I had ;)

@charliermarsh charliermarsh merged commit c5adbf1 into main Apr 30, 2024
19 checks passed
@charliermarsh charliermarsh deleted the charlie/b branch April 30, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

B024 false negative when there's a class var
2 participants