-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add import compat layer to __init__ #24
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24 +/- ##
==========================================
+ Coverage 85.98% 86.56% +0.57%
==========================================
Files 20 21 +1
Lines 678 722 +44
Branches 50 57 +7
==========================================
+ Hits 583 625 +42
- Misses 68 69 +1
- Partials 27 28 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
39c80bd
to
3087ada
Compare
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
for more information, see https://pre-commit.ci
8537ca9
to
166b8b4
Compare
@@ -38,6 +38,6 @@ coverage: | |||
typing: | |||
flags: | |||
- MyPy | |||
target: 70% # 100% | |||
target: 68.5% # 100% |
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.
@bdraco why did you lower this? The currently reported number is 87.50% per https://app.codecov.io/gh/aio-libs/propcache?flags%5B0%5D=MyPy. Honestly, I'd prefer MyPy coverage to be fixed rather than discarded. Looking into https://app.codecov.io/gh/aio-libs/propcache/blob/master/tests%2Ftest_init.py?flags%5B0%5D=MyPy, most of it is not that hard to address.
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 kept getting different results on each run so I under the impression it was an order of delivery problem to Codecov.
Do you have a suggestion on how to type propcache_module
?
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 guess ModuleType
will work here
Line 36 in f7ac8b1
def imported_module(self) -> ModuleType: |
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.
Doors closing, switching to mobile, will do more if wifi works in flight
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.
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.
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.
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.
@bdraco try using the from .api import cached_property as cached_property
syntax in __init__.py
. I've been trying to figure out similar things recently, and the experience needs improving: https://discuss.python.org/t/is-there-any-tool-that-can-report-type-coverage-of-a-project/34962/4.
It might be a rule we disable, but it still influences the coverage precision metric. So it wouldn't show up in the console output, but type coverage would be incomplete. I also saw mentions of when something in the type resolves to Any
, that would make the line imprecise/uncovered. And MyPy does not have a # pragma: no cover
to make it go away.
We do not want to support wildcard imports, make sure they do not work #24 (comment)
What do these changes do?
Add import compat layer to init so the public API can continue to be imported at top level
Are there changes in behavior for the user?
Restores the ability to import from top-level
Related issue number
#18