-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update mypy to version 0.981 #6154
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
Is the other mypy warning new as of 0.981? Perhaps the return type should be |
Ah, or should EDIT: I got confused here, this should instead refer to |
Looks like returning I ran pre-commit on all the files and that was the only new warning that popped up. |
6df6083
to
9fb436e
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.
I'm thinking that Compose
should be a generic
pymc/blocking.py
Outdated
@@ -44,7 +44,7 @@ def __init__(self, fa: Callable[[PointType], T], fb: Callable[[RaveledVars], Poi | |||
self.fa = fa | |||
self.fb = fb | |||
|
|||
def __call__(self, x: RaveledVars) -> T: | |||
def __call__(self, x: RaveledVars) -> Any: |
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.
def __call__(self, x: RaveledVars) -> Any: | |
def __call__(self, x: RaveledVars) -> T: |
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 think you should change class Compose:
above to class Compose(Generic[T]):
. This way, the T
variable from __init__
and __call__
will be linked, and the type variable will actually define a relation.
Thanks @maresb! The |
9fb436e
to
c44e0e5
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6154 +/- ##
==========================================
+ Coverage 91.93% 93.00% +1.07%
==========================================
Files 101 91 -10
Lines 20948 20707 -241
==========================================
+ Hits 19258 19259 +1
+ Misses 1690 1448 -242
|
What is this PR about?
Update mypy version to 0.981. According to this, it should fix the failed CI encountered in both #6151 and #6147
Checklist
Major / Breaking Changes
Bugfixes / New features
Docs / Maintenance