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

28 commits

Author SHA1 Message Date
q0w 0c284520c6
Filter available distributions using hash declarations from constraints files (#10962) 2022-03-16 07:43:06 +00:00
Jon Dufresne 44a034a131 Move all remaining type comments to annotations
Use the com2ann tool to convert remaining comments to annotations. Now,
no type comments remain.

https://github.com/ilevkivskyi/com2ann

Some types are not available at runtime (e.g. Literal) or require a
forward reference and so were quoted.
2021-08-27 19:02:57 -07:00
Jon Dufresne 21fd93df0e Remove Python 2 __nonzero__ method definitions 2021-08-02 09:36:50 -07:00
James Curtin 6d636902d7
Fix import error introduced in 21.1 2021-04-24 16:54:52 -04:00
Jon Dufresne a9d4446dc4 Blacken src/pip/_internal/utils directory 2021-02-21 07:24:35 -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
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 817ee23051 Remove redundant Python 2.7 code 2020-12-22 09:06:26 +02:00
Xavier Fernandez 4dc48da9db utils: make Hashes object hashable 2020-10-31 15:54:54 +01: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
Tzu-ping Chung 700eb7734f Hashes from lines should intersect, not union 2020-09-03 17:19:01 +08:00
Tzu-ping Chung 6c6b6a7765 Implement new Provider.find_matches() 2020-05-27 23:10:56 +08:00
Deepak Sharma d31cf696e8 string_formatting 2020-01-30 20:33:00 +05:30
Maxim Kurnikov 3cb30385d8 remove disallow_untyped_defs=False for more modules 2019-12-13 10:22:21 +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
Pradyun Gedam 537b0fca12
Change isort multi_line_output to 3 2019-07-22 10:15:27 +05:30
Chris Jerdonek 3cf192ff1b Add debug logging to filter_unallowed_hashes(). 2019-07-14 10:56:07 -07:00
Chris Jerdonek 3a2ee333a9 Add Hashes.is_hash_allowed(). 2019-07-10 20:13:24 -07:00
Maxim Kurnikov f77b8ca051 remove #noqa: F401 2019-02-22 14:17:07 +03:00
Maxim Kurnikov 5e5904e61c Add type annotations for pip._internal.utils and pip._internal.vcs.__init__ (#6061) 2018-12-08 08:47:24 +05:30
Pradyun Gedam 353a13ddff
isort: Include trailing commas 2017-11-21 13:23:59 +05:30
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Renamed from pip/utils/hashes.py (Browse further)