Improve suggestion for finding max and min using semver#337
Improve suggestion for finding max and min using semver#337tomschr merged 2 commits intopython-semver:masterfrom mzjp2:fix/doc-max-suggestion
Conversation
|
Thank you very much @mzjp2 and welcome! Much appreciated. 👍 For some reason, there is an (unrelated) issue about the typing module. I'm not sure about the problem. @tlaferriere as you are more experienced than I am regarding typing, could you have a look, please? After the problem is fixed, I'd like to merge it. If you have further ideas, don't hesitate, just submit your suggestions. Thank you! |
|
Thank you for the fix! |
|
@mzjp2 @tlaferriere I've played a bit with the type definitions. For some reason, mypy seems to detect an error. I remember, this was different in the past, so they changed something. To avoid such thing in the future, maybe it would be useful to freeze the version. I've introduced a new type Feel free to suggest a better name or handling. |
|
Sounds good to me - happy for you to merge whenever you want :) |
|
Let's wait some more day, so Thomas has some time to look into it. 🙂 |
|
I'll look into this tomorrow, today I have an exam. |
|
Good luck with the exam! Keep my fingers crossed. 🤞 |
|
Good luck indeed!
… |
Define new type "Decorator" for function "deprecated" to avoid this mypy error: src/semver/_deprecated.py:69: error: Incompatible return value type (got "Callable[[VarArg(Any), KwArg(Any)], Callable[..., F]]", expected "Union[Callable[..., F], partial[Any]]") Co-authored-by: Thomas Laferriere <tlaferriere@users.noreply.github.com>
|
Thanks Thomas and Zain for your contribution, much appreciated! 👍 ❤️ |
|
Thanks all! |
I was reading through the documentation and thought that the suggestion for finding max/min of a list/iterable of strings using
semverunecessarily complicated, with amap, and multiple typecasts. I think using justmaxwithkeyas done in this PR is much cleaner and should be the de-facto suggestion.This is my first contribution to this repository, I hope it's welcome and I've followed the contribution guide well - but feel free to let me know if I can improve anything or close this PR if it's unwanted :)