Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[portage] mark as partial, make stub-only type private
  • Loading branch information
Tatsh committed Mar 18, 2026
commit d5c1f029dc8414c7602d2548908d2e1bf2401e8d
19 changes: 0 additions & 19 deletions stubs/portage/@tests/stubtest_allowlist.txt

This file was deleted.

3 changes: 2 additions & 1 deletion stubs/portage/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version = "3.0.*"
upstream_repository = "https://gitweb.gentoo.org/proj/portage.git"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub mirror, which seems to be up to date and used for active development. Generally github upstream repos play nicer with our automation

Suggested change
upstream_repository = "https://gitweb.gentoo.org/proj/portage.git"
upstream_repository = "https://github.com/gentoo/portage"

partial_stub = true

[tool.stubtest]
ci_platforms = ["linux"]
ignore_missing_stub = true
4 changes: 2 additions & 2 deletions stubs/portage/portage/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ from .dbapi.porttree import portagetree
from .package.ebuild.config import config

@type_check_only
class DBRootDict(TypedDict):
class _DBRootDict(TypedDict):
bintree: Any
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These days we require a comment for each use of Any explaining why it's necessary / what the allowable runtime types are. If you are unsure what the correct types are, you can use Incomplete (from _typeshed) – which is an alias of Any – instead.

porttree: portagetree
virtuals: Any

db: Mapping[str, DBRootDict]
db: Mapping[str, _DBRootDict]
root: str
settings: config
Loading