You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think match is a wider discussion about Python version compatibility. If I have already prevented use of older python versions through other code then I think for sure it makes sense. But I don't want to remove backwards compatibility without good reason.
Yeah, this whole function with lots of if statements, some returning others creating some variables used later on needs a complete re-think. I would separate each branch in a separate function and call the appropriate one with some kind of registry, but even if you don't fancy that (I agree it might obscure the code) I would at least use the match statement as @cheginit suggest.
Python 3.10 is 3 years old and has reached the end of full support, so aiming to support things older than that without exploiting newer capabilities seems just not using Python to its full potential.
In pyproject.toml you specified that the package requires py3.10+, so it won't be installed for older versions anyway (this's the reason for that comment on mine). If that was unintentional, you need to relax that. I think py3.9+ or py3.8+ is sensible since, I think, these two are the min versions that most of the package's dependencies support.
Originally posted by @barneydobson in #104 (comment)
Originally posted by @dalonsoa in #104 (comment)
If using Python 3.10+:
match
The text was updated successfully, but these errors were encountered: