summaryrefslogtreecommitdiff
path: root/src/pip/_internal/cli/main_parser.py
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of the --python python/py shortcutsPaul Moore2022-08-011-23/+0
|
* Skip the executable check, as subprocess.run will catch thisPaul Moore2022-07-311-3/+2
|
* Catch errors from running the subprocessPaul Moore2022-07-311-2/+7
|
* Check the argument to --python is executablePaul Moore2022-07-291-9/+12
|
* Make get_runnable_pip publicPaul Moore2022-07-291-2/+2
|
* More flexible handling of the --python argumentPaul Moore2022-07-281-12/+60
|
* Add a --python optionPaul Moore2022-07-281-0/+15
|
* Convert type hint comments into annotationsDiego Ramirez2021-06-071-4/+2
| | | | Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com> Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
* Blacken src/pip/_internal/cli directoryJon Dufresne2021-02-211-9/+8
| | | | | | | | | | 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.
* Merge pull request #9606 from hexagonrecursion/fstrPradyun Gedam2021-02-211-1/+1
|\
| * Convert more str.format() calls to f-stringsAndrey Bienkowski2021-02-131-1/+1
| |
* | Remove typing.TYPE_CHECKING guardsJon Dufresne2021-02-191-5/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* | Replace pip._internal.utils.typing with stdlib typingJon Dufresne2021-02-181-2/+2
| | | | | | | | | | | | | | | | 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.
* | Use keyword-only argumentsJon Dufresne2021-01-291-9/+7
|/ | | | | | | | | | | | | | | | | | | https://www.python.org/dev/peps/pep-3102/ Replaces the pattern: self.name = kwargs.pop('name') Keyword-only arguments offer some advantages: - In the event of a typo or misuse, a more informative error is presented to the programmer. - More self documenting and makes interfaces more explicit. - They more easily allow explicit typing. Adding types to ConfigOptionParser required changing some call sites to pass arguments without using a dict due to mypy bug: https://github.com/python/mypy/issues/9676
* Use f-strings for simple string formattingJon Dufresne2020-12-251-2/+2
| | | | | | | 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.
* Remove obsolete "# type: ignore" commentsJon Dufresne2020-12-231-1/+1
| | | | | | | Obsolete since dropping Python 2 support. Add the mypy setting "warn_unused_ignores = True" to catch these earlier.
* Prepare isort for blackPradyun Gedam2020-09-231-4/+1
|
* Update linter: isortPradyun Gedam2020-09-231-1/+1
|
* Convert the remaining '%' formatters to '.format'. Fixes #6973.Jason R. Coombs2020-03-061-1/+1
|
* string_formattingDeepak Sharma2020-01-301-2/+2
|
* Remove get_summaries().Chris Jerdonek2019-07-271-7/+5
|
* Change isort multi_line_output to 3Pradyun Gedam2019-07-221-2/+5
|
* Refactor out a get_pip_version() function into misc.py.Chris Jerdonek2019-06-231-8/+2
|
* remove #noqa: F401Maxim Kurnikov2019-02-221-1/+1
|
* add type annotations for pip/_internal/cli/Maxim Kurnikov2018-12-031-2/+10
|
* Change the import names as renamedPradyun Gedam2018-08-051-1/+1
|
* Move logic for parsing commands into a main_parserPradyun Gedam2018-08-051-2/+47
|
* Move creation of CLI parser into pip._internal.cliPradyun Gedam2018-08-051-0/+51