Damian Shaw
68529081c2
Enforce f-strings via Ruff ( #12393 )
2023-11-07 09:14:56 +00:00
Pradyun Gedam
89983e9ad9
Use `shell=True` for opening the editor with `pip config edit`
...
This makes the behavior compatible with git and other tools that invoke
the editor in this manner.
2022-07-29 14:53:23 +01:00
wim glenn
6313d866e5
Improve ``pip config --help`` text ( #11074 )
2022-04-29 10:32:52 +01:00
q0w
332e960ecf
Check if there is no filename in exc
2022-02-03 14:22:10 +03:00
q0w
b33da32f1c
Reraise current exc
2022-01-25 08:26:47 +03:00
q0w
b8cea86364
Add filename for windows FileNotFoundError
2022-01-21 16:41:23 +03:00
Pradyun Gedam
5ab7c124db
Merge pull request #10192 from pradyunsg/blacken/commands
...
Blacken src/pip/_internal/commands/
2021-08-06 10:09:34 +01:00
Peter Gessler
9bd6eedfc7
Update configuration.py
2021-08-03 20:01:07 -05:00
Pradyun Gedam
8e2e1964a4
Blacken src/pip/_internal/commands/
...
Progresses the black formatting of the codebase further.
2021-07-23 17:54:08 +01:00
Harutaka Kawamura
2de3af1747
Complete type annotations in `pip/_internal/commands` ( #10182 )
2021-07-23 18:27:43 +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
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
Pradyun Gedam
58c594c06b
Prepare isort for black
2020-09-23 21:47:47 +05:30
Pradyun Gedam
25ab172b55
Update linter: isort
2020-09-23 19:52:28 +05:30
Pradyun Gedam
6fa4a9a0a7
Clean up code style changes
...
Toward minimizing style changes in the overall PR diff, or toward
consistency with the future use of black (in cases where I wasn't sure
of a good way to minimize the diff).
2020-07-17 14:33:19 +07:00
Nguyễn Gia Phong
f8b06a3906
Enable flake8-logging-format
2020-07-17 14:33:19 +07:00
Nguyễn Gia Phong
cb8d81d135
Nitpick logging calls
2020-07-17 14:33:19 +07:00
Devesh Kumar Singh
fb05730898
Align write_output types with logger.info
2020-07-07 15:23:05 +05:30
Devesh Kumar Singh
e0d625ba93
Add type annotations for pip._internal.commands.configuration
2020-07-07 14:57:42 +05:30
Devesh Kumar Singh
6e62481568
Add unit tests for pip config debug
2020-06-28 16:22:01 +05:30
Devesh Kumar Singh
f0f692e8e9
Add env and env var values
2020-06-28 16:22:00 +05:30
Devesh Kumar Singh
2fcad8ffa7
Rename subcommand from list-files to debug
2020-06-28 16:22:00 +05:30
Devesh Kumar Singh
b9d19a64d7
List values per configuration file
2020-06-28 16:22:00 +05:30
Devesh Kumar Singh
7a8f374c39
Add option to list config files with pip config
2020-06-28 16:22:00 +05:30
Devesh Kumar Singh
b01eb958d0
Fix run type annotation in base_command and configuration
2020-05-30 10:57:40 +05:30
Pradyun Gedam
75b2800dec
Merge pull request #8073 from deveshks/pip-config-docstring-fix
2020-05-23 17:11:46 +05:30
gutsytechster
b82516c9ca
fix(_internal/commands): Define a default add_option to child commands
2020-05-23 14:55:37 +05:30
gutsytechster
72a42197a4
refactor(commands): Add method add_options and remove __init__
...
This removes the __init__ method of child classes and defines
explicit method for adding command options.
2020-05-23 14:50:57 +05:30
Devesh Kumar Singh
18fd161c44
Fix pip config docstring to render correctly in docs
2020-04-18 01:03:19 +05:30
Pradyun Gedam
bbd439898b
Better indentation for `pip config` description
2020-03-14 00:29:41 +05:30
Pradyun Gedam
af3062af41
Remove the deprecated pip config --venv option ( #7163 )
2019-10-09 23:28:00 +02: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
Pradyun Gedam
fcd1448f1d
Ignore "require_virtualenv" in `pip config`
2019-09-07 16:57:51 +05:30
A_Rog
70027b2f50
Address #6876 : Make command output go through a single function ( #6881 )
2019-08-22 17:29:22 -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
Pradyun Gedam
537b0fca12
Change isort multi_line_output to 3
2019-07-22 10:15:27 +05:30
Xavier Fernandez
645809944c
Move config files locations inside a function ( #6736 )
2019-07-20 22:29:24 +02:00
Xavier Fernandez
fc618bf3b1
Move virtualenv detection functions into their own module
2019-07-19 10:03:22 +02:00
Steve Dower
293c91ee8a
Configuration files may now also be stored under `sys.prefix` ( #6268 )
...
* Rename kinds.VENV to kinds.SITE and site_config_files to global_config_files
* Add tests for config file options
* Deprecate --venv in pip config
2019-03-07 11:14:56 +05:30
Pradyun Gedam
1694a5f1bf
Move status_codes to pip._internal.cli
2018-07-30 09:43:53 +05:30
Pradyun Gedam
21d9825efd
Rename basecommand -> base_command
2018-07-30 09:32:47 +05:30
Pradyun Gedam
8d45e0e647
Move basecommand to pip._internal.cli
2018-07-29 18:26:28 +05:30
Pradyun Gedam
7b2be65e8c
Correctly assign summary for pip config
2018-03-20 00:09:19 +05:30
Donald Stufft
95bcf8c5f6
Move all internal APIs to pip._internal
2017-08-31 14:53:00 -04:00