Repository navigation
Add type stub file for @wrapt.decorator - #2442
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2442 +/- ##
=======================================
Coverage 96.92% 96.92%
=======================================
Files 104 104
Lines 9133 9153 +20
=======================================
+ Hits 8852 8872 +20
Misses 281 281 ☔ View full report in Codecov by Sentry. |
@wrapt.decorator
| exclude = (?x)( | ||
| docs| | ||
| \.run| | ||
| \.tox | ||
| /docs/ | ||
| | /\.run/ | ||
| | /\.tox/ | ||
| ) |
There was a problem hiding this comment.
This corrects the paths to exclude when doing static type checking with mypy.
There was a problem hiding this comment.
Independent of the new stub file, correct?
There was a problem hiding this comment.
Correct, this is an independent change.
| @@ -68,9 +66,6 @@ ignore_errors = true | |||
| # gradually make PlasmaPy consistent with mypy's strict mode, we can | |||
| # remove the disabled error codes file-by-file. | |||
|
|
|||
There was a problem hiding this comment.
All of the changes in this file made below this line were done automatically, as described in #2424.
This PR is removing a lot of the mypy errors that we had been ignoring, while also uncovering some new errors for code that wasn't type checked because it depended on @wrapt.decorator in some way.
pheuer
left a comment
There was a problem hiding this comment.
Sounds good - are there any other dependencies with the same problem/solution?
|
Thank you for the review!
Yes. Several. The most pressing and most difficult will be |
Description
This PR adds a type stub file for
wrapt.Motivation and context
A few of our widely used decorators like
@particle_inputmake use of@wrapt.decorator. Becausewraptis untyped, we were running into issues with mypy not type checking some of our code because@wrapt.decoratoris untyped. Adding a type stub file lets us get past that. This also serves as a prototype type stub file.Related issues
This came up in #2429.