Skip to content

Commit decd284

Browse files
committed
[portage] changes for strict Pyright
1 parent 938cce8 commit decd284

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

stubs/portage/portage/package/ebuild/config.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from collections.abc import Mapping
2-
from typing import Literal, TypeVar
2+
from typing import Any, Literal, TypeVar
33

44
class config:
55
def __init__(
@@ -21,17 +21,17 @@ class config:
2121
def __setitem__(self, key: str, value: str) -> None: ...
2222
def __delitem__(self, key: str) -> None: ...
2323
def __iter__(self) -> str: ...
24-
def get(self, k: str, x=...): ...
24+
def get(self, k: str, x: Any = ...) -> Any: ...
2525

2626
_K = TypeVar("_K")
2727
_V = TypeVar("_V")
2828

2929
def best_from_dict(
3030
key: _K,
3131
top_dict: Mapping[_K, _V],
32-
key_order,
32+
key_order: Any,
3333
EmptyOnError: Literal[0, 1] = 1,
3434
FullCopy: Literal[0, 1] = 1,
3535
AllowEmpty: Literal[0, 1] = 1,
3636
) -> Literal[""] | dict[_K, _V]: ...
37-
def autouse(myvartree, use_cache: Literal[0, 1] = 1, mysettings: config | None = None) -> Literal[""]: ...
37+
def autouse(myvartree: Any, use_cache: Literal[0, 1] = 1, mysettings: config | None = None) -> Literal[""]: ...

stubs/portage/portage/package/ebuild/doebuild.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import Literal
2+
from typing import Any, Literal
33

44
from portage.dbapi.porttree import portdbapi
55

@@ -47,7 +47,7 @@ def doebuild(
4747
fetchall: Literal[0, 1] = 0,
4848
tree: Literal["vartree", "porttree", "bintree"] | None = None,
4949
mydbapi: portdbapi | None = None,
50-
vartree=None,
50+
vartree: Any = None,
5151
prev_mtimes: dict[str, Incomplete] | None = None,
5252
fd_pipes: dict[str, str] | None = None,
5353
returnproc: int | bool = False,

stubs/portage/portage/versions.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from _typeshed import Incomplete
2-
from typing import Literal
2+
from typing import Any, Literal
33
from typing_extensions import Self
44

55
from .package.ebuild.config import config
@@ -21,7 +21,7 @@ class _pkg_str(str):
2121
build_id: str | None = None,
2222
file_size: int | None = None,
2323
mtime: int | None = None,
24-
db=...,
24+
db: Any = ...,
2525
repoconfig=...,
2626
) -> Self: ...
2727
def __init__(
@@ -36,8 +36,8 @@ class _pkg_str(str):
3636
build_id: str | None = None,
3737
file_size: int | None = None,
3838
mtime: int | None = None,
39-
db=...,
40-
repoconfig=...,
39+
db: Any = ...,
40+
repoconfig: Any = ...,
4141
) -> None: ...
4242
@staticmethod
4343
def _long(var, default: int) -> int: ...

0 commit comments

Comments
 (0)