-
Notifications
You must be signed in to change notification settings - Fork 23
fix: Fix type checking #25
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
Conversation
e971820
to
262931a
Compare
73cc649
to
593896c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid improvements to the typing and good catch on the type
vs flag_type
reference 👌
Signed-off-by: Manuel Schönlaub <[email protected]>
Signed-off-by: Manuel Schönlaub <[email protected]>
Signed-off-by: Manuel Schönlaub <[email protected]>
Signed-off-by: Manuel Schönlaub <[email protected]>
Signed-off-by: Manuel Schönlaub <[email protected]>
9b085a5
to
e5cebb6
Compare
Signed-off-by: Manuel Schönlaub <[email protected]>
e5cebb6
to
7102813
Compare
Codecov Report
@@ Coverage Diff @@
## main #25 +/- ##
==========================================
+ Coverage 92.83% 92.92% +0.08%
==========================================
Files 18 18
Lines 321 325 +4
==========================================
+ Hits 298 302 +4
Misses 23 23
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I reworked the whole thing as plenty of conflicts had come up in the meantime. In particular I unified now that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have much Python experience, but all the type hints here look correct to me. Thanks a lot for this contribution. Much appreciated.
@mschoenlaub I've invited you to the python maintainers group. Feel free to accept or not. Soon we will be formalizing the responsibility of that role (you can leave it anytime you want, of course) but it will allow you to merge for now if you'd like. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same request as @toddbaert, in regards to making the provider required and defaulting to a no-op provider initially.
We could also instead just merge this as typing enhancements and resolve the optional provider issue separately. In the name of progress 🚀 |
Signed-off-by: Manuel Schönlaub [email protected]
This PR
This PR fixes typing errors in the client code:
The Liskov Substitution Principle should also apply to providers. This relates to the signature of the methods to retrieve flags.
Incorrect usage of
type
instead offlagType
. Most probably a typo.Ensure that the callables in
create_provider_evaluation
are annotated in amypy
-friendly way.Fix type annotations for
FlagEvaluationDetails
Fix type annotations around optional parameters all over the place
Related Issues
Fixes #17