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

Add pre-commit, replace isort and black with ruff #127

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

freider
Copy link
Contributor

@freider freider commented Feb 5, 2024

Got tired of forgetting to run ruff, black and isort before committing and then getting ci fails

@freider freider requested a review from mwaskom February 5, 2024 12:59
Copy link
Contributor

@mwaskom mwaskom left a comment

Choose a reason for hiding this comment

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

Nice!

Comment on lines -59 to +62
def __enter__(self) -> CTX: ...
def __enter__(self) -> CTX:
...
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should be able to preserve the previous formatting for these stubs with ruff (based on astral-sh/ruff#6592); do you know why that's not happening here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It appears they only use that formatting for ellipsis blocks in .pyi files and not .py files 😢

@freider freider merged commit a4e1bb0 into main Feb 6, 2024
7 checks passed
@freider freider deleted the freider/ruff-pre-commit branch February 6, 2024 14:24
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.

None yet

2 participants