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

chore(python): Address Ruff per file ignores #10258

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

zundertj
Copy link
Collaborator

@zundertj zundertj commented Aug 2, 2023

Docstrings for tests is the only (reasonable imo) exception left.

Most exceptions were easy fixes or ignores, the only somewhat useful exception would be to allow statements with no effect for with pytest.raises( ... ) checks (assign to underscore per convention), but I also found a genuine mistake by removing the exception to the rule here.

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars labels Aug 2, 2023
Copy link
Contributor

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

I'd like to keep the B018 exception for tests, otherwise indeed I prefer per-case ignores over blanket file ignores. Linter is still failing though 🤔

py-polars/tests/unit/dataframe/test_df.py Outdated Show resolved Hide resolved
py-polars/polars/utils/show_versions.py Outdated Show resolved Hide resolved
@stinodego
Copy link
Contributor

Thanks for spotting this improvement!

@stinodego stinodego merged commit 64adbec into pola-rs:main Aug 10, 2023
@zundertj
Copy link
Collaborator Author

Sorry, have been busy with other things. Totally fine pushing it in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants