Skip to content

Commit 6808495

Browse files
committed
make pytype happy by resolving relative import
1 parent 4f1181f commit 6808495

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

stdlib/2and3/distutils/cmd.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import Callable, List, Tuple, Union
44
from abc import abstractmethod
5-
from .dist import Distribution
5+
from distutils.dist import Distribution
66

77
class Command:
88
sub_commands = ... # type: List[Tuple[str, Union[Callable[[], bool], str, None]]]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Stubs for distutils.command.bdist_msi
22

3-
from ..cmd import Command
3+
from distutils.cmd import Command
44

55
class bdist_msi(Command): ...

stdlib/2and3/distutils/command/build_py.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Stubs for distutils.command.bdist_msi
22

3-
from ..cmd import Command
3+
from distutils.cmd import Command
44
import sys
55

66
if sys.version_info >= (3,):

stdlib/2and3/distutils/fancy_getopt.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ from typing import (
66
)
77

88
_Option = Tuple[str, str, str]
9+
_GR = Tuple[List[str], OptionDummy]
910

1011
def fancy_getopt(options: List[_Option],
1112
negative_opt: Mapping[_Option, _Option],
12-
object: Any, args: Optional[List[str]]) \
13-
-> Union[List[str], Tuple[List[str], OptionDummy]]: ...
13+
object: Any,
14+
args: Optional[List[str]]) -> Union[List[str], _GR]: ...
1415
def wrap_text(text: str, width: int) -> List[str]: ...
1516

1617
class FancyGetopt:
1718
def __init__(self, option_table: Optional[List[_Option]] = ...) -> None: ...
1819
# TODO kinda wrong, `getopt(object=object())` is invalid
1920
@overload
20-
def getopt(self, args: Optional[List[str]] = ...) -> Tuple[List[str], OptionDummy]: ...
21+
def getopt(self, args: Optional[List[str]] = ...) -> _GR: ...
2122
@overload
2223
def getopt(self, args: Optional[List[str]], object: Any) -> List[str]: ...
2324
def get_option_order(self) -> List[Tuple[str, str]]: ...

stdlib/2and3/distutils/sysconfig.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Stubs for distutils.sysconfig
22

33
from typing import Mapping, Optional, Union
4-
from .ccompiler import CCompiler
4+
from distutils.ccompiler import CCompiler
55

66
PREFIX = ... # type: str
77
EXEC_PREFIX = ... # type: str

0 commit comments

Comments
 (0)