-
Notifications
You must be signed in to change notification settings - Fork 53
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
Support for namespace packages #871
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #871 +/- ##
==========================================
+ Coverage 92.79% 93.03% +0.23%
==========================================
Files 47 47
Lines 8468 8610 +142
Branches 1550 1578 +28
==========================================
+ Hits 7858 8010 +152
+ Misses 350 339 -11
- Partials 260 261 +1 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
…ed/pydoctor into 343-support-for-namespace-packages
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…eclare_namespace()
This comment has been minimized.
This comment has been minimized.
…t[str] = ... form as well.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
@@ -278,18 +278,7 @@ def namespace(self, obj: model.Documentable) -> List[Union[Tag, str]]: | |||
ob = ob.parent | |||
parts.reverse() | |||
return parts | |||
@renderer |
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.
This was dead code :/
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
According to pydoctor_primer, this change doesn't affect pydoctor warnings on a corpus of open source code. ✅ |
Supporting namespace packages is more or less useful if we don’t fix #870. But that can come in a second phase. |
tree = parseFile(path) | ||
return tree | ||
except Exception as e: | ||
tree = e |
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.
Caching the exception instance is not a good idea because if cycles with locals.
Instead we should cache the exception type and args and re-raise another instance of it when asked again.
Fixes #343
Related to #824
This includes support for PEP 420 as well as old school declaration of namespace packages.