1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

16 commits

Author SHA1 Message Date
Christian Clauss 69a1e956da Ruff rules C4,C90,PERF 2023-08-28 14:51:13 +02:00
Andy Freeland e752b1a26b
Include files/folders in pip install autocomplete (#10682) 2022-01-25 18:27:09 +00:00
Harutaka Kawamura df98167fe5
Complete type annotations in pip/_internal/cli (#10169) 2021-07-23 11:39:53 +08:00
Tzu-ping Chung d4d2445350 Remove get_installed_distributions usages
The function itself is kept for now because it's currently used to test
the pip.metadata subpackage...
2021-07-22 23:22:12 +08:00
Diego Ramirez 1e016d2994
Convert type hint comments into annotations
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-06-07 21:19:23 +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 bfc4e9c331 Replace for/if/append pattern with list comprehension in autocompletion.py 2021-02-20 07:20:44 -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
Maxim Kurnikov 58e2a99ccf remove disallow_untyped_defs=False for most of pip._internal.cli modules 2019-12-13 09:58:52 +03:00
Maxim Kurnikov 3692097cca add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
Chris Jerdonek 4cd825873b Remove get_summaries(). 2019-07-27 12:29:07 -07:00
Chris Jerdonek 1f09e67f34 Only import a Command class when it is actually needed.
This resulted in an approximate 24% speed-up of a vanilla `pip`
invocation on one system (0.477 secs before, 0.363 secs after).
2019-07-26 23:30:26 -04:00
Laurie Opperman 10911fe881 Fix error when autocompleting after flag
When running autocomplete after any command-line option with unspecified
'metavar' attribute, a traceback for an 'AttributeError' would be
displayed. This is fixed for first checking if 'metavar' was defined.
Fixes #5751
2018-09-17 21:56:46 +10:00
Pradyun Gedam cc47adee9a
Change the import names as renamed 2018-08-05 14:24:18 +05:30
Pradyun Gedam db72d427c5
Move autocompletion logic out to pip._internal.cli.autocompletion 2018-08-05 14:24:07 +05:30