Damian Shaw
68529081c2
Enforce f-strings via Ruff ( #12393 )
2023-11-07 09:14:56 +00:00
Stéphane Bidoul
ff05e4224b
Merge pull request #12289 from lgeiger/noqa
...
Remove outdated `noqa` comments
2023-10-01 19:29:09 +02:00
Lukas Geiger
3d6b0be901
Remove outdated noqa comments
2023-09-22 01:28:54 +01:00
Seth Michael Larson
fca773ccde
Allow truststore to not import on Python 3.9 and earlier
2023-09-12 15:56:31 -05:00
Tzu-ping Chung
af43e139b6
Drive by split() limit to improve performance
2023-09-06 15:39:11 +08:00
Christian Clauss
0c0099b23b
Ruff misidentifies config as a dict
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2023-08-29 11:31:42 +02:00
Christian Clauss
0a24a001fb
Fix issues raised in code review
2023-08-28 15:04:54 +02:00
Christian Clauss
69a1e956da
Ruff rules C4,C90,PERF
2023-08-28 14:51:13 +02:00
Shantanu
901db9cf8d
Use a set for TargetPython.get_tags for performance ( #12204 )
2023-08-06 11:08:16 -05:00
Pradyun Gedam
4162f28cad
Deal with dashed names in vendored modules, in `pip debug`
2022-12-28 20:13:57 +00:00
Paul Moore
c70dcc7f1d
Make the debug command safe for use in a zipapp
2022-07-11 16:30:32 +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
1a7037eaf3
Concatenate same-line strings
...
This is suboptimal behaviour in black that'll hopefully get fixed in the
near future.
2021-07-23 17:54:49 +01: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
Tzu-ping Chung
56a8f3d8bd
Typing fixes
2021-03-10 16:40:58 +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
Tzu-ping Chung
2c4fcce265
Replace pkg_resources usage in 'pip debug'
2021-02-04 10:05:15 +08:00
Noah Gorny
c09bc1432b
commands: debug: Use packaging.version.parse to compare
2021-01-16 19:23:02 +02: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
f32adaf09b
Remove __future__ imports
...
Unnecessary since dropping Python 2.
2020-12-24 08:38:09 -08:00
Jon Dufresne
53234e578f
Remove obsolete "# type: ignore" comments
...
Obsolete since dropping Python 2 support.
Add the mypy setting "warn_unused_ignores = True" to catch these
earlier.
2020-12-23 15:42:48 -08:00
Pradyun Gedam
25ab172b55
Update linter: isort
2020-09-23 19:52:28 +05:30
Nguyễn Gia Phong
f8b06a3906
Enable flake8-logging-format
2020-07-17 14:33:19 +07:00
Devesh Kumar Singh
76257e4b65
Use module.__file__
2020-06-10 00:36:03 +05:30
Devesh Kumar Singh
d3f012cb3b
Fix argument type for ca_bundle_info
2020-06-10 00:36:03 +05:30
Devesh Kumar Singh
76a130105c
Fix src/pip with flake8-bugbear
2020-06-10 00:36:03 +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
Pradyun Gedam
7e44950e72
Merge pull request #8051 from deveshks/add-mypy-annotations-comp-dbg
2020-05-15 18:45:42 +05:30
Devesh Kumar Singh
78c0a7192a
Change return type annotation for commands.debug.get_vendor_version_from_module
2020-05-15 16:55:58 +05:30
Devesh Kumar Singh
35ea5a6d5f
Remove Any type from run function
2020-04-20 03:19:43 +05:30
Pradyun Gedam
df9bbb403f
Fix bug in pip debug
2020-04-15 23:26:12 +05:30
Devesh Kumar Singh
ae8391b4b7
Type annotations for completion and debug in commands
2020-04-15 01:17:53 +05:30
Noah Gorny
e131c825d4
commands: debug: Add vendor library versions
2020-04-11 01:54:57 +03:00
Noah Gorny
972ef6f970
commands: debug: Print pip._vendor.DEBUNDLED info
2020-04-10 22:27:47 +03:00
Chris Hunt
80b2c82d0c
Use packaging.tags.Tag in place of Tuple
...
This is the standard type used by packaging.tags. Making this change
throughout the code lets us start switching over to using its
tag-generating functions in get_supported().
We also get rid of a test, since it was superseded by `__str__` in
packaging.tags.Tag.
2020-01-07 01:42:42 -05:00
Chris Hunt
1abf978e88
Move format_tag to pep425tags
...
This is a more appropriate place for the function, since it is more
related to tags than wheels, and will make it easier to refactor Wheel
into its own module.
2019-12-02 11:52:51 +08:00
Neil Botelho
144611ca1e
Show cert config value first
...
Move the cert config show_value statement to before the
REQUESTS_CA_BUNDLE statement. Removed lines used for testing.
2019-10-17 12:31:49 +05:30
Neil Botelho
e2a6fea7fa
Add CA cert info to debug, and corresponding tests
...
Added CA cert information to debug.py
Made the corresponding changes to tests/functional/test_debug.py
2019-10-15 14:54:34 +05:30
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
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
Chris Jerdonek
00665d11bb
Add some encoding return values to pip-debug.
2019-07-19 21:52:54 -04:00
Xavier Fernandez
ab10b8c328
debug: add warnings about its provisional status
2019-07-18 14:39:12 +02:00
Chris Jerdonek
d67acca760
Add "pip debug" command.
2019-06-27 03:18:42 -07:00