Commit Graph

31 Commits

Author SHA1 Message Date
Joey Ballentine 06f83b51d6 Fixed issues 2022-06-07 17:15:09 -04:00
Joey Ballentine 842f6660b2 Add forced progress bar option 2022-06-07 16:56:46 -04:00
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
Renamed from src/pip/_internal/utils/ui.py (Browse further)