giampaolo / pyftpdlib

Extremely fast and scalable Python FTP server library
MIT License
1.65k stars 265 forks source link

Integrate ruff linter / fixer (replace flake8) #611

Closed giampaolo closed 9 months ago

giampaolo commented 9 months ago

See: https://blog.jerrycodes.com/ruff-the-python-linter/. Advantages:

1) an order of magnitude faster than flake8 + isort (0.1 secs instead of 2.0 secs):

Before:

$ time make flake8 isort
real    0m2,042s
user    0m7,568s
sys 0m0,380s

Now:

$ time make ruff 
real    0m0,127s
user    0m0,183s
sys 0m0,045s

2) Many more code quality checks than before.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (43e62ef) 69.84% compared to head (6fd00ff) 69.82%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #611 +/- ## ========================================== - Coverage 69.84% 69.82% -0.02% ========================================== Files 9 9 Lines 3621 3609 -12 ========================================== - Hits 2529 2520 -9 + Misses 1092 1089 -3 ``` | [Files](https://app.codecov.io/gh/giampaolo/pyftpdlib/pull/611?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Giampaolo+Rodola) | Coverage Δ | | |---|---|---| | [pyftpdlib/filesystems.py](https://app.codecov.io/gh/giampaolo/pyftpdlib/pull/611?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Giampaolo+Rodola#diff-cHlmdHBkbGliL2ZpbGVzeXN0ZW1zLnB5) | `81.58% <100.00%> (+0.19%)` | :arrow_up: | | [pyftpdlib/ioloop.py](https://app.codecov.io/gh/giampaolo/pyftpdlib/pull/611?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Giampaolo+Rodola#diff-cHlmdHBkbGliL2lvbG9vcC5weQ==) | `89.75% <100.00%> (+0.14%)` | :arrow_up: | | [pyftpdlib/servers.py](https://app.codecov.io/gh/giampaolo/pyftpdlib/pull/611?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Giampaolo+Rodola#diff-cHlmdHBkbGliL3NlcnZlcnMucHk=) | `59.71% <0.00%> (+1.06%)` | :arrow_up: | | [pyftpdlib/authorizers.py](https://app.codecov.io/gh/giampaolo/pyftpdlib/pull/611?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Giampaolo+Rodola#diff-cHlmdHBkbGliL2F1dGhvcml6ZXJzLnB5) | `46.62% <66.66%> (ø)` | | | [pyftpdlib/handlers.py](https://app.codecov.io/gh/giampaolo/pyftpdlib/pull/611?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Giampaolo+Rodola#diff-cHlmdHBkbGliL2hhbmRsZXJzLnB5) | `70.32% <72.72%> (-0.26%)` | :arrow_down: | | [pyftpdlib/log.py](https://app.codecov.io/gh/giampaolo/pyftpdlib/pull/611?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Giampaolo+Rodola#diff-cHlmdHBkbGliL2xvZy5weQ==) | `36.78% <0.00%> (+0.41%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.