Skip to content

Commit ed709c1

Browse files
committed
Removing type ignore comments from cli.progress_bars
1 parent 720c77a commit ed709c1

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove "type: ignore" comments from cli subpackage

src/pip/_internal/cli/progress_bars.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def __init__(self, *args, **kwargs):
7878
"""
7979
Save the original SIGINT handler for later.
8080
"""
81+
# https://github.com/python/mypy/issues/5887
8182
super(InterruptibleMixin, self).__init__( # type: ignore
8283
*args,
8384
**kwargs
@@ -134,6 +135,7 @@ class DownloadProgressMixin(object):
134135

135136
def __init__(self, *args, **kwargs):
136137
# type: (List[Any], Dict[Any, Any]) -> None
138+
# https://github.com/python/mypy/issues/5887
137139
super(DownloadProgressMixin, self).__init__( # type: ignore
138140
*args,
139141
**kwargs
@@ -183,6 +185,7 @@ def __init__(self, *args, **kwargs):
183185
if WINDOWS and self.hide_cursor: # type: ignore
184186
self.hide_cursor = False
185187

188+
# https://github.com/python/mypy/issues/5887
186189
super(WindowsMixin, self).__init__(*args, **kwargs) # type: ignore
187190

188191
# Check if we are running on Windows and we have the colorama module,
@@ -206,30 +209,27 @@ class BaseDownloadProgressBar(WindowsMixin, InterruptibleMixin,
206209
message = "%(percent)d%%"
207210
suffix = "%(downloaded)s %(download_speed)s %(pretty_eta)s"
208211

209-
# NOTE: The "type: ignore" comments on the following classes are there to
210-
# work around https://github.com/python/typing/issues/241
211-
212212

213213
class DefaultDownloadProgressBar(BaseDownloadProgressBar,
214214
_BaseBar):
215215
pass
216216

217217

218-
class DownloadSilentBar(BaseDownloadProgressBar, SilentBar): # type: ignore
218+
class DownloadSilentBar(BaseDownloadProgressBar, SilentBar):
219219
pass
220220

221221

222-
class DownloadBar(BaseDownloadProgressBar, # type: ignore
222+
class DownloadBar(BaseDownloadProgressBar,
223223
Bar):
224224
pass
225225

226226

227-
class DownloadFillingCirclesBar(BaseDownloadProgressBar, # type: ignore
227+
class DownloadFillingCirclesBar(BaseDownloadProgressBar,
228228
FillingCirclesBar):
229229
pass
230230

231231

232-
class DownloadBlueEmojiProgressBar(BaseDownloadProgressBar, # type: ignore
232+
class DownloadBlueEmojiProgressBar(BaseDownloadProgressBar,
233233
BlueEmojiBar):
234234
pass
235235

@@ -240,7 +240,8 @@ class DownloadProgressSpinner(WindowsMixin, InterruptibleMixin,
240240
file = sys.stdout
241241
suffix = "%(downloaded)s %(download_speed)s"
242242

243-
def next_phase(self): # type: ignore
243+
def next_phase(self):
244+
# type: () -> str
244245
if not hasattr(self, "_phaser"):
245246
self._phaser = itertools.cycle(self.phases)
246247
return next(self._phaser)

0 commit comments

Comments
 (0)