pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python-gitlab/python-gitlab/commit/84ad3fd19cfbc236e962ac77c910571b0888c000

fix(types): add explicit submodule import for pyright compatibility · python-gitlab/python-gitlab@84ad3fd · GitHub
Skip to content

Commit 84ad3fd

Browse files
janfrederikclaude
authored andcommitted
fix(types): add explicit submodule import for pyright compatibility
Add `import gitlab.base` inside the TYPE_CHECKING block in repositories.py so that pyright can resolve `gitlab.base.RESTObject`. Without the explicit import, pyright cannot resolve the submodule access via the parent package (implicit submodule access is a runtime loader side effect that type checkers don't model). This caused `_RestObjectBase` to be `Unknown`, propagating through `RepositoryMixin` into `Project` and other classes. Fixes #3342 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4e01d33 commit 84ad3fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gitlab/v4/objects/repositories.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
if TYPE_CHECKING:
1919
# When running mypy we use these as the base classes
20+
import gitlab.base
21+
2022
_RestObjectBase = gitlab.base.RESTObject
2123
else:
2224
_RestObjectBase = object

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy