Commit Graph

65 Commits

Author SHA1 Message Date
Jon Dufresne d282fb94a3 Use unified OSError and its subclasses
Since Python 3.3, the following classes have merged into OSError. They
remain as aliases for backward compatibility.

- EnvironmentError
- IOError
- WindowsError

https://docs.python.org/3/library/exceptions.html#OSError

Python 3 also has subclasses of OSError to help identify more specific
errors. For example, FileNotFoundError. This allows simplifying some
except blocks.
2020-12-26 12:16:09 -08:00
Pradyun Gedam f2d2d10e4f
Merge pull request #9339 from jdufresne/setup-cfg-universal
Remove "universal" from "bdist_wheel" configuration
2020-12-26 10:22:27 +00: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
Jon Dufresne 1f3b0300df Remove "universal" from "bdist_wheel" configuration
Since dropping Python 2 support, the wheel is no longer universal. See
the wheel docs:
https://wheel.readthedocs.io/en/stable/user_guide.html#building-wheels

> If your project … is expected to work on both Python 2 and 3, you will
> want to tell wheel to produce universal wheels by adding this to your
> setup.cfg file:
2020-12-23 08:41:48 -08:00
Tzu-ping Chung 145be2eaf2 Skip pip search tests unless explicitly requested 2020-12-15 17:23:20 +08:00
Pradyun Gedam 07ec3013f0
Drop custom logic for new_resolver tests 2020-10-30 07:16:19 +05:30
Pradyun Gedam 061dbe8ed5
Merge pull request #8907 from hugovk/isort-5-config-updates 2020-09-24 21:40:57 +05:30
Hugo van Kemenade 212ba79390
Merge branch 'master' into isort-5-config-updates 2020-09-24 14:57:33 +03:00
Hugo van Kemenade 8fc985eccb Flake8: use extend-ignore to avoid needing to redefine defaults 2020-09-24 14:35:53 +03:00
Hugo van Kemenade f8fe3531b9 Remove unnecessary config for isort 5 2020-09-23 22:00:32 +03:00
Pradyun Gedam 58c594c06b
Prepare isort for black 2020-09-23 21:47:47 +05:30
Pradyun Gedam a00f85d22b
Prepare flake8 for black 2020-09-23 21:47:46 +05:30
Nguyễn Gia Phong f8b06a3906 Enable flake8-logging-format 2020-07-17 14:33:19 +07:00
Chris Hunt cb540f30e3 Add basic test coverage configuration
This handles:

* Sub-processes within unit tests (thanks pytest-cov)
* Our pytest-fixture-based virtual environments and subprocesses
  therein
* Running with xdist (e.g. `-n auto`)
* Combining results from all of the above using paths rooted with
  `src/pip/*`

This doesn't handle:

* Platform-specific branches
* Python 2
* CI integration
2020-07-07 21:58:55 -04:00
Devesh Kumar Singh 0dbd3938af Add B014 ignore 2020-06-10 00:36:03 +05:30
Devesh Kumar Singh 06654ef329 Remove explicit select and ignore src/pip for flake8-bugbear for now 2020-06-05 23:10:01 +05:30
Devesh Kumar Singh 6716a2bec5 Add flake8-bugbear rules to setup.cfg 2020-06-05 02:40:49 +05:30
Paul Moore 8346c44f1c Register the new marker 2020-05-21 15:58:43 +01:00
cjc7373 ac5702c9b3 move marker registering to setup.cfg 2020-05-21 11:57:46 +08:00
Maxim Kurnikov d1452ffabd add global disallow_any_generics=True 2019-11-12 21:08:48 +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 fe147309ea
Appropriately ignore the .nox folder 2019-09-05 12:40:24 +05:30
Pradyun Gedam 6e3eae5e2a
Ignore 'build' directory in linting tools 2019-08-27 14:06:17 +05:30
Pradyun Gedam f377148f6d
Use mypy's inline configuration syntax for opt-outs 2019-07-30 12:39:51 +05:30
Pradyun Gedam 537b0fca12
Change isort multi_line_output to 3 2019-07-22 10:15:27 +05:30
Chris Jerdonek 190ea6a3d4 Remove strict_optional=False for models/link.py. 2019-07-14 23:08:55 -07:00
Chris Jerdonek 2b58bcde31 Remove strict_optional=False for download.py. 2019-07-14 23:07:48 -07:00
Chris Jerdonek 252986e5c1 Remove strict_optional=False for utils/logging.py. 2019-07-14 23:07:48 -07:00
Chris Jerdonek 1a7f76fe1c Remove strict_optional=False for vcs/subversion.py. 2019-07-14 23:07:48 -07:00
Chris Jerdonek 957756ac36 Remove strict_optional=False for models/target_python.py. 2019-07-14 23:07:45 -07:00
Chris Jerdonek 250efe5fac Make the mypy strict_optional exemptions explicit. 2019-07-14 23:07:15 -07:00
Maxim Kurnikov 2d3cd4de86 merge latest master 2019-02-23 16:58:54 +03:00
Maxim Kurnikov 630961c892 ignore W504 2019-02-22 14:07:35 +03:00
Maxim Kurnikov 932fb539ef finish types for pip._internal.req, disallow untyped defs 2018-12-19 19:39:35 +03:00
Pradyun Gedam 4ddc705d20
Simplify linter configuration to be consistent 2018-06-25 17:03:42 +05:30
Pradyun Gedam 45f0456f93
flake8: Ignore files in .scratch 2018-06-14 23:44:01 +05:30
Pradyun Gedam 51327e9567
mypy does not check unused imports 2018-06-13 13:17:30 +05:30
Daniel Shaulov ff578b8d23 disable strict_optional mypy option (#5371) 2018-05-05 15:28:33 +05:30
Pradyun Gedam 353a13ddff
isort: Include trailing commas 2017-11-21 13:23:59 +05:30
Jon Dufresne 37f236de70 Include license file in the generated wheel package (#4790) 2017-10-20 13:40:34 +05:30
Benoit Pierre efe67da84a pytest: enable report (#4775)
easier to read, show xpassed tests and rerun failures.
2017-10-07 08:37:06 +05:30
Pradyun S. Gedam 11451c54ec Merge branch 'master' into mypy/infrastructure 2017-09-02 16:06:48 +05:30
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam ed9208efaf Improve mypy configuration 2017-07-17 22:34:33 +05:30
Pradyun S. Gedam 8087a27942 Move flake8 configuration into setup.cfg (#4594)
For consistency; All of this will move into pyproject.toml one day soon, hopefully.
2017-07-05 13:37:24 -04:00
Pradyun S. Gedam 44be0b072a isort: Have better configuration
Add pip._vendor as a third party package
Use the indentation style that the project uses
Add pip and tests as a known first party packages
Change default section to THIRDPARTY
2017-06-13 17:59:33 +05:30
Pradyun S. Gedam d4f91fdb5a isort: Ignore using setup.cfg 2017-06-13 17:59:33 +05:30
Alex Gaynor 3e527f2fbf Fixed some pytest warnings in the tests 2017-03-20 11:45:29 -04:00
Thomas Grainger a4d63a60d4 Use the new wheel config section 2015-10-02 01:26:59 +01:00
Donald Stufft 814514e1bd Rename pip.vendor.* to pip._vendor.* to ensure it's obviously private 2013-10-22 21:32:25 -04:00