Use staticmethod for PasswordStrength methods#4461
Use staticmethod for PasswordStrength methods#4461svartkanin merged 1 commit intoarchlinux:masterfrom
Conversation
The methods don't need access to the class, so they don't need to be classmethods. This change reduces the number of 'bad return' warnings seen when running Pyright, Pyrefly, and ty.
|
@correctmost, I submitted now merged pull requests to use |
There's disagreement across type checkers about whether
You will definitely encounter some false positives :). Pyright is the most mature, but it's seeing less development these days. Pyrefly and ty are under active development and still have gaps in their implementations of the typing spec: https://github.com/python/typing/blob/main/conformance/results/results.html. I have also spent some time getting archinstall false positives fixed in zuban: https://github.com/zubanls/zuban/issues?q=is%3Aissue%20state%3Aclosed%20archinstall
I am using the default settings for I would ultimately like to make it easier to use non-mypy type checkers with archinstall because they have decent IDE integrations. I planned on chipping away at the warnings, like I did with this PR, and getting some configurations committed to |
PR Description:
The methods don't need access to the class, so they don't need to be classmethods. This change reduces the number of 'bad return' warnings seen when running Pyright, Pyrefly, and ty.
Example warnings fixed:
Tests and Checks