Skip to content

Auto-reformat with ruff check --select=I --fix#821

Draft
waketzheng wants to merge 1 commit into
ronf:developfrom
waketzheng:ruff-I
Draft

Auto-reformat with ruff check --select=I --fix#821
waketzheng wants to merge 1 commit into
ronf:developfrom
waketzheng:ruff-I

Conversation

@waketzheng

Copy link
Copy Markdown
Contributor

What does this PR do

Add ruff to pre-commit config and run prek run --all-files, which produces the same result as ruff check --select=I --fix.

Why this PR

To improve the contributor experience.

@ronf

ronf commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Sorry, this is too big a diff for me to accept. Also, I don't really agree with a lot of the reformatting that ruff has chosen to do here. If there are specific findings which are not pure formatting, I'd be willing to consider them, but even there it would require some time to validate each change, so it needs to be a more manageable size.

@waketzheng

Copy link
Copy Markdown
Contributor Author

Thanks for the honest feedback. This project is useful and easy to use.

How do you check type hints? I noticed that running mypy asyncssh outputs a lot of errors.

@ronf

ronf commented Jul 11, 2026

Copy link
Copy Markdown
Owner

I'm getting a clean run against mypy right now, with mypy version 1.17.1 using the following command:

env MYPYPATH=stubs mypy --html-report /tmp/cov asyncssh

This version of mypy is about a year old at this point. Every now and then I update to the latest mypy and usually have to make a small number of fixes in the asyncssh code to adjust for the new version.

I do something similar with pylint, but it's been a while since I upgraded that. At the moment, I'm on pylint 2.9.3, which is like 5 years old. I really should refresh that at some point.

@waketzheng waketzheng marked this pull request as draft July 11, 2026 14:03
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