Skip to content

Commit f094895

Browse files
committed
fix linter errors
1 parent dd35713 commit f094895

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/pip/_internal/cli/progress_bars.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
from __future__ import division
22

3-
import contextlib
43
import itertools
5-
import logging
64
import sys
7-
import time
85
from signal import SIGINT, default_int_handler, signal
96

107
from pip._vendor import six
@@ -17,7 +14,7 @@
1714
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
1815

1916
if MYPY_CHECK_RUNNING:
20-
from typing import Any, Iterator, IO
17+
from typing import Any
2118

2219
try:
2320
from pip._vendor import colorama
@@ -26,6 +23,7 @@
2623
except Exception:
2724
colorama = None
2825

26+
2927
def _select_progress_class(preferred, fallback):
3028
encoding = getattr(preferred.file, "encoding", None)
3129

src/pip/_internal/cli/spinners.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
logger = logging.getLogger(__name__)
1818

19+
1920
class SpinnerInterface(object):
2021
def spin(self):
2122
# type: () -> None
@@ -104,6 +105,7 @@ def finish(self, final_status):
104105
self._update("finished with status '%s'" % (final_status,))
105106
self._finished = True
106107

108+
107109
class RateLimiter(object):
108110
def __init__(self, min_update_interval_seconds):
109111
# type: (float) -> None
@@ -120,6 +122,7 @@ def reset(self):
120122
# type: () -> None
121123
self._last_update = time.time()
122124

125+
123126
@contextlib.contextmanager
124127
def open_spinner(message):
125128
# type: (str) -> Iterator[SpinnerInterface]
@@ -144,6 +147,7 @@ def open_spinner(message):
144147
else:
145148
spinner.finish("done")
146149

150+
147151
@contextlib.contextmanager
148152
def hidden_cursor(file):
149153
# type: (IO) -> Iterator[None]
@@ -162,4 +166,3 @@ def hidden_cursor(file):
162166
yield
163167
finally:
164168
file.write(SHOW_CURSOR)
165-

0 commit comments

Comments
 (0)