Neil Botelho
1d74549d95
remove erroneous extra lines
2023-11-28 01:06:26 +05:30
Neil Botelho
5ca4fb7768
bugfix: pass progress_disabled to super init in PipParallelProgress
2023-11-28 00:55:19 +05:30
Neil Botelho
c4c2292962
comment spelling correction
2023-11-26 19:26:44 +05:30
Neil Botelho
03769107c0
add completed parameter to super.add_task
2023-11-26 18:35:52 +05:30
Neil Botelho
390fd513cb
Split PipProgress into 2 classes
...
1 for sequential downloads and 1 for parallel downloads.
2023-11-26 14:06:40 +05:30
Neil Botelho
60056e8cef
Correct docstring
2023-11-19 21:58:11 +05:30
Neil Botelho
0290b4d14b
add newline to fix overwriting in parallel progress
2023-11-19 19:45:13 +05:30
Neil Botelho
a55e3962e0
acquire lock before calling Progress.update
...
This prevents race conditions when trying to acquire the lock again to
sort the tasks
2023-11-19 19:44:38 +05:30
Neil Botelho
7d3aa9287c
Avoid logging task, if it is not visible
2023-11-19 18:19:29 +05:30
Neil Botelho
bfd0cafe8f
Avoid completely overriding Progress.update
2023-11-19 18:12:29 +05:30
Neil Botelho
5e2c07ddf7
Use custom renderable object
...
This allows control over where to place newline
2023-11-19 18:10:50 +05:30
Neil Botelho
8574e9af31
Remove completed downloads from tasks
...
This prevents wasted rendering and makes sorting quicker
2023-11-18 16:37:44 +05:30
Neil Botelho
2da5a68a1f
hide progress bar if download is small
2023-11-18 16:35:08 +05:30
Neil Botelho
23530c3382
Add progress bar with parallel download support
2023-11-18 14:13:09 +05:30
q0w
3820b0e52c
Replace Iterator[T] with Generator[T,None, None] ( #11007 )
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2022-04-09 16:11:58 +01:00
Pradyun Gedam
728e4fe7c4
Drop alternative progress bar styles
...
These were deprecated in a previous release, and added complexity
despite being rarely used.
2022-04-07 09:05:00 +01:00
Henrich Hartzer
2cfe36dc9e
Update pre-commit hooks
...
Co-Authored-By: q0w <43147888+q0w@users.noreply.github.com>
2022-04-04 16:02:02 +03:00
Pradyun Gedam
a330ea462f
Use the progress bar from rich by default
...
Utilise rich's progress bar to present download progress. This has a
subjectively nicer presentation style and should degrade gracefully
without additional effort from our end.
2021-11-26 11:50:27 +00:00
Pradyun Gedam
dd59b9e6a0
Add type annotations for progress bar provider
2021-11-26 11:50:27 +00:00
Harutaka Kawamura
df98167fe5
Complete type annotations in `pip/_internal/cli` ( #10169 )
2021-07-23 11:39:53 +08:00
Diego Ramirez
44b3c90bfd
Complete type annotations in pip/_internal/cli
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-06-27 08:36:35 +08:00
Jon Dufresne
83c596ff70
Blacken src/pip/_internal/cli directory
...
In autocompletion.py, the should_list_installed boolean expression was
flipped to workaround upstream black bug:
https://github.com/psf/black/issues/1629
The bug makes black fail to stabilize formatting when the list isn't the
last piece of the expression.
2021-02-21 07:29:15 -08:00
Jon Dufresne
0945809afc
Remove typing.TYPE_CHECKING guards
...
The typing module has been available since Python 3.5. Guarding the
import has been unnecessary since dropping Python 2.
Some guards remain to either:
- Avoid circular imports
- Importing objects that are also guarded by typing.TYPE_CHECKING
- Avoid mypy_extensions dependency
2021-02-19 18:34:21 -08:00
Jon Dufresne
a6392bd62e
Replace pip._internal.utils.typing with stdlib typing
...
The stdlib module has been available since Python 3.5 and the
TYPE_CHECKING constant has been available since 3.5.2.
By using stdlib, this removes the need for pip to maintain its own
Python 2 typing compatibility shim.
2021-02-18 19:09:13 -08:00
Pradyun Gedam
86afa89043
Merge pull request #9361 from jdufresne/f-strings
...
Use f-strings for simple string formatting
2020-12-26 10:24:18 +00:00
Jon Dufresne
cdcf74fb8e
Use f-strings for simple string formatting
...
Use pyupgrade to convert simple string formatting to use f-string
syntax. pyupgrade is intentionally timid and will not create an f-string
if it would make the expression longer or if the substitution parameters
are anything but simple names or dotted names.
2020-12-25 16:21:20 -08:00
Jon Dufresne
09b3d3a50b
Remove object from class definitions
...
Unnecessary since dropping Python 2 support. In Python 3, all classes
are new style classes.
2020-12-25 15:48:11 -08:00
Pradyun Gedam
f91ba6b348
Merge pull request #9354 from jdufresne/super
...
Use short Python3 super() syntax
2020-12-25 19:18:28 +00:00
Jon Dufresne
e28badf979
Remove unnecessary type annotation in BlueEmojiBar
2020-12-25 08:54:58 -08:00
Jon Dufresne
2e38024991
Drop u prefix from str literals
...
Unnecessary since dropping Python 2 support.
This makes one test case from test_str_to_display a duplicate and so has
been removed.
2020-12-25 07:26:06 -08:00
Jon Dufresne
c148bcc1aa
Use short Python3 super() syntax
2020-12-24 15:11:51 -08:00
Jon Dufresne
f32adaf09b
Remove __future__ imports
...
Unnecessary since dropping Python 2.
2020-12-24 08:38:09 -08:00
Hugo van Kemenade
2426744203
"" is clearer than str()
2020-12-22 16:38:25 +02:00
Hugo van Kemenade
817ee23051
Remove redundant Python 2.7 code
2020-12-22 09:06:26 +02:00
Devesh Kumar Singh
76a130105c
Fix src/pip with flake8-bugbear
2020-06-10 00:36:03 +05:30
Devesh Kumar Singh
89f248c7bf
Removing type ignore comments from cli.progress_bars
2020-05-13 15:21:15 +05:30
Xavier Fernandez
a096d4cd76
cli: revert format() related changes
...
Since the progress bar API is % related, it seems simpler to stick with
it.
2020-03-10 13:21:53 +01:00
Jason R. Coombs
047e249767
Update src/pip/_internal/cli/progress_bars.py
...
Co-Authored-By: Xavier Fernandez <xav.fernandez@gmail.com>
2020-03-08 18:36:01 -04:00
Jason R. Coombs
9669c0b312
Update src/pip/_internal/cli/progress_bars.py
...
Co-Authored-By: Xavier Fernandez <xav.fernandez@gmail.com>
2020-03-08 18:35:53 -04:00
Jason R. Coombs
def75dc691
Fix issue where format_map isn't available on Python 2
2020-03-06 12:53:54 -05:00
Jason R. Coombs
6282a307dc
👹 Feed the hobgoblins (delint).
2020-03-06 12:43:10 -05:00
Jason R. Coombs
3511d3d493
Convert the remaining '%' formatters to '.format'. Fixes #6973 .
2020-03-06 12:43:03 -05:00
Nitesh Sharma
ce1e0f470a
Move UI helpers to cli subpackage ( #6727 )
2020-02-21 14:01:13 +05:30