Repository navigation
Pass along # type: ... annotation comments - #19
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19 +/- ##
==========================================
+ Coverage 95.19% 95.32% +0.13%
==========================================
Files 22 22
Lines 1228 1263 +35
==========================================
+ Hits 1169 1204 +35
Misses 59 59 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The handling of files with multi-line statements is a bit complex in this PR. There may be a better level of abstraction to do this at. I figure I'd pass it to your expertise first (@jon-edward) to see if you had suggestions before trying to find a better solution. |
|
There's probably no better way to accomplish this, preprocessing is done to account for what I’ve observed of Cython parser behavior so any workaround is going to be pretty complicated when working around newline and comment transforms. I do like your solution though and appreciate the tests I’m away from my computer for the normal East coast workday, I’ll give this a more thorough look tonight and will probably end up merging |
For
cuda-core, we are running into amypy"bug" when annotating__ior__and__isub__. It's pretty hairy, maybe unlikely to be resolved any time soon, and eventypeshedis currently just adding a# type: ignore[...]annotation to get around it.In any event, these sorts of "escape hatches" to work around type checker shortcomings seems like it will be generally useful. This PR just passes these type annotations in the .pyx along to the .pyi file.