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

Fix ruff rules FAST002,FLY002,N805,RSE102,RUF019,RUF022 #2038

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Nov 26, 2024

% ruff check --select=FAST002,FLY002,N805,RSE102,RUF019,RUF022 --statistics

4	N805   	[*] invalid-first-argument-name-for-method
3	RSE102 	[*] unnecessary-paren-on-raise-exception
2	FLY002 	[*] static-join-to-f-string
1	FAST002	[*] fast-api-non-annotated-dependency
1	RUF019 	[*] unnecessary-key-check
1	RUF022 	[*] unsorted-dunder-all
[*] fixable with `ruff check --fix`

Add ruff configuration to run more lint rules and to set upper limits on code complexity with McCabe and Pylint.

@TheTechromancer
Copy link
Collaborator

Thanks for your work on this @cclauss. But this PR goes beyond what we want for linting.

@liquidsec do you agree?

@@ -12,7 +12,7 @@ async def setup_before_prep(self, module_test):
self.neo4j_used = False

class MockResult:
async def data(s):
async def data(s): # noqa: N805
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why does changing s to self cause this test to fail?

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