-
Notifications
You must be signed in to change notification settings - Fork 98
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
RFC/WIP: adopt ruff and its code upgrade/format methods #437
base: master
Are you sure you want to change the base?
RFC/WIP: adopt ruff and its code upgrade/format methods #437
Conversation
I haven't looked through all of it, but I give it thumbs up. I should probably modernize my python skills myself one of those days :-) |
lovely, i'll gradually work trough the rest then as i want to use the library for modification of caldav calendars and want to give back |
... but I should add, I find backward compatibility very important, as well as support for old python versions. I even believe it's a nice thing to support python versions that are already officially "EOL", as those python versions often are still included in distros that are not EOL. Though, python2 is officially not supported anymore, and there was a pull request removing python 3.6 from the test matrix slipping through some weeks ago :-) |
While personally I prefer to shed dead snakes as dropping support code and adopting new features tends to clean up and Speed up code, I'm absolutely on board with keeping them for projects that consider them important In those cases I strongly appreciate a definition of the intended support range in order to avoid endless support for dead snakes (I love the win some of the newer versions enable) |
Here are my thoughts:
|
So this will go into a 2.0-release, which will officially break with 3.7 (and possibly 3.8 as well). I cannot give any ETA on a 2.0-release currently, but possibly in some few months. |
Now that 1.4.0 has been released, we may consider shedding support for python 3.7 and python 3.8 and work towards a 2.0-release. There are references to python 3.7 in Post-edit: there is also |
this starts with the isort and pyugprade rules some issues/warnings are resolved
this deters unused import removal
1652ece
to
47110ed
Compare
i started picking this up again - there are still dozens of warnings, some dead code and more |
im particularly confused around the numbered variables in tests, of which some are unused. some are missed all together |
The functional tests are more or less a complete mess, developed organically over time. I've considered doing something with it, but ... it's not a high priority. An idea could be to rename it into test_legacy_ftest.py or something, and then make new test code from scratch (and deleting the legacy tests once the new tests are well enough done). One of the problems with the tests is that many of them are not really testing the library code per se, but rather the servers. I started today writing up some new code in the test directory, |
this starts with the isort and pyugprade rules + flake8 based rules
some warnings are resolved - about 141 more to go
i stumbled across a number of leftovers from historic python2 support
i'd like to get some input on whether adding type annotations would be appreciated or frowned upon
i'd like to get input on whether this type of project modernization would be appreciated or not before digging into the leftover linter warnings