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

Switch to ruff #2514

Merged
merged 6 commits into from
Jun 19, 2023
Merged

Switch to ruff #2514

merged 6 commits into from
Jun 19, 2023

Conversation

flying-sheep
Copy link
Member

@flying-sheep flying-sheep commented Jun 16, 2023

Fixes #2513

Compare scverse/anndata#891 and scverse/anndata@14e0cd4 (sorry for accidentally pushing to main)

@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #2514 (1ad2dfa) into master (ed8e140) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2514   +/-   ##
=======================================
  Coverage   71.89%   71.89%           
=======================================
  Files          98       98           
  Lines       11518    11518           
=======================================
  Hits         8281     8281           
  Misses       3237     3237           

Comment on lines -165 to -170
line-length = 88
target-version = ["py38"]
skip-string-normalization = true
exclude = """
/build/.*
"""
Copy link
Member Author

Choose a reason for hiding this comment

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

  • line-length = 88 is default
  • target-version is inferred from requires-python
  • exclude is derived from .gitignore

/build/.*
"""

[tool.ruff]
Copy link
Member Author

Choose a reason for hiding this comment

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

  • no exclude, the default contains all we need
  • no line-length, the default is 88
  • don’t mention all the black-incompatible rules
  • remove the “F811 Redefinition of unused name” from per-file ignores, as it wasn’t triggered
  • demote the “E731 Do not assign a lambda expression” to a per-file ignore, as it’s only used there

@flying-sheep
Copy link
Member Author

pre-commit.ci autofix

@flying-sheep flying-sheep requested a review from ivirshup June 16, 2023 13:08
@flying-sheep flying-sheep merged commit fd11280 into master Jun 19, 2023
@flying-sheep flying-sheep deleted the ruff branch June 19, 2023 12:12
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.

Switch to ruff
3 participants