Skip to content

Commit df98167

Browse files
authored
Complete type annotations in pip/_internal/cli (#10169)
1 parent 282005a commit df98167

File tree

7 files changed

+101
-101
lines changed

7 files changed

+101
-101
lines changed

src/pip/_internal/cli/autocompletion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def autocomplete() -> None:
2929
options = []
3030

3131
# subcommand
32-
subcommand_name = None # type: Optional[str]
32+
subcommand_name: Optional[str] = None
3333
for word in cwords:
3434
if word in subcommands:
3535
subcommand_name = word

src/pip/_internal/cli/base_command.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040

4141

4242
class Command(CommandContextMixIn):
43-
usage = None # type: str
44-
ignore_require_venv = False # type: bool
43+
usage: str = ""
44+
ignore_require_venv: bool = False
4545

4646
def __init__(self, name: str, summary: str, isolated: bool = False) -> None:
4747
super().__init__()
@@ -58,7 +58,7 @@ def __init__(self, name: str, summary: str, isolated: bool = False) -> None:
5858
isolated=isolated,
5959
)
6060

61-
self.tempdir_registry = None # type: Optional[TempDirRegistry]
61+
self.tempdir_registry: Optional[TempDirRegistry] = None
6262

6363
# Commands should add options to this option group
6464
optgroup_name = f"{self.name.capitalize()} Options"

0 commit comments

Comments
 (0)