-
Notifications
You must be signed in to change notification settings - Fork 43
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
Working on modernizing - some queries #93
Comments
Thanks for looking at this! I'd welcome some modernisation and appreciate you bringing this up.
I was going to say we still have some downstream users we care about still support Python 2, but now I see that ffsubsync that I was thinking of in particular supports from 3.6+ only. That said, it also doesn't buy us much to move -- there aren't really any Python 3 language constructs that would help a lot here. Cc @smacke
I'm writing a lot less Python than I used to, so while I've seen these around, I'm a bit lacking on context on how it would benefit srt. Could you maybe explain a bit what kind of things it might help with? :-)
I'd like type hinting, the only question is Python 2 backwards compatibility (assuming we still keep it).
Probably not, since these also serve as simple examples and I suspect grouping them would somewhat complicate legibility there. Although maybe I'm overestimating the decrease in legibility?
We currently have no external dependencies for srt. If we already had some I'd not care as much, but going from 0 to 1 is a larger step. Do you think this would help substantially? Thanks for writing this up! |
Type hintsOk till you decide whether Python 2 compatibility should be retained, I can make a separate stub file for annotations. This way type checkers get satisfied and also the codebase remains the same. PEP621It brings forward a new way to declare project metadata. For simple projects like srt_toolsIt should probably as-is right now, but I highly recommend you to look at |
Supporting Python 3.6 is a pain. I'll gladly drop support if there's a good excuse (such as srt no longer supporting it :) ) |
Do you want to:
click
for thesrt_tools
? (all scripts can be grouped into subcommands like howgit
does)attrs
forSubtitle
class instead of hand-coding all dunder methods?The text was updated successfully, but these errors were encountered: