summaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
Commit message (Collapse)AuthorAgeFilesLines
* Bump all linters other than mypy (#11901)Pradyun Gedam2023-03-271-7/+7
|
* Merge branch 'main' into keyring-multi-choiceTzu-ping Chung2023-01-301-1/+1
|\
| * Bump pre-commit isort to 5.12.0Tzu-ping Chung2023-01-301-1/+1
| | | | | | | | | | This release contains a critical fix for newer Poetry versions that crashes due to "invalid" pyproject.toml syntax.
* | Make it possible to request a keyring provider: `auto`, `disabled`, `import` ↵Dos Moonen2023-01-301-1/+1
|/ | | | | | | | | | | | | or `subprocess` Refactored `_get_index_url()` to get integration tests for the subprocess backend working. Keyring support via the 'subprocess' provider can only retrieve a password, not a username-password combo. The username therefor MUST come from the URL. If the URL obtained from the index does not contain a username then the username from a matching index is used. `_get_index_url()` does that matching. The problem this refactoring solves is that the URL where a wheel or sdist can be downloaded from does not always start with the index url. Azure DevOps Artifacts Feeds are an example since it replaces the friendly name of the Feed with the GUID of the Feed. Causing `url.startswith(prefix)` to evaluate as `False`. The new behaviour is to return the index which matches the netloc and has the longest common prefix of the `path` property of the value returned by `urllib.parse.urlsplit()`. The behaviour for resolving ties is unspecified.
* Enable managing RTD redirects in-treePradyun Gedam2022-12-301-0/+1
| | | | | | | | | | This is designed as a script and a data file (in YAML format), and meant to manage the RTD redirects with a version controlled file. This makes it possible for pull requests to this repository to update the redirects for this project's documentation (eg: for better error urls) and for this evolution to be tracked as a part of version control history.
* Update flake8 additional_dependencies via 'upadup'Stephen Rosen2022-11-251-2/+2
|
* Move check-manifest to a CI checkPradyun Gedam2022-10-141-6/+0
| | | | | This makes local runs of `nox -s lint` quicker while still providing the relevant protections for checking the MANIFEST file.
* Run `check-manifest` without build isolationPradyun Gedam2022-10-081-0/+1
| | | | This is necessary to work in no-network environments like pre-commit.ci.
* Tweak the pre-commit.ci configurationPradyun Gedam2022-10-071-0/+5
| | | | | This avoids modifying PRs and slows down the frequency of auto-update pull requests.
* Remove pre-commit from GitHub ActionsPradyun Gedam2022-10-071-1/+0
| | | | This is a step in moving linting completely to pre-commit.ci.
* Upgrade pre-commit hooksTzu-ping Chung2022-07-181-3/+3
| | | | Also fix some Mypy errors newly found with upgrade.
* Update the versions of pinned packages in pre-commit environmentsPradyun Gedam2022-04-221-6/+7
|
* Update pre-commit hooksPradyun Gedam2022-04-221-1/+1
| | | | This makes the output easier to parse on failures in this.
* Update pre-commit hooksHenrich Hartzer2022-04-041-7/+7
| | | | Co-Authored-By: q0w <43147888+q0w@users.noreply.github.com>
* Update blackq0w2022-04-041-1/+1
|
* Install pytest in mypy environmentJon Dufresne2021-09-121-0/+1
| | | | | | | | | pytest includes type annotations and is PEP-561 compliant. This helps ensure correct pytest API usage. This caught a misuse of pytest.mark.skipif which did not include a boolean argument. The test is now marked "network" and no longer skipped.
* Run mypy on the tests directoryJon Dufresne2021-08-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests are a large consumer of the pip API (both the internal API and otherwise). By running mypy on tests, we help to: 1. Ensure the internal API is consistent with regards to typing 2. Ensure the tests are representative of real life scenarios as the API are used correctly. 3. Helps to recognize unnecessary tests that simply pass junk data to functions which can be caught by the type checker. 4. Make sure test support code in tests/lib/ is correct and consistent. This is especially important when refactoring such code. For example, if we were to replace tests/lib/path.py with pathlib. As a first start, untyped defs are allowed. All existing typing issues have been resolved. Overtime, we can chip away at untyped defs and eventually remove the configuration option for stricter type checking of tests. The following changes were made to help make mypy pass: Remove unused record_callback argument from make_wheel() in tests. Unused since its introduction in 6d8a58f7e136df92704d2334288e4589d91a082b. Replace toml with tomli_w in tests/functional/test_pep517.py. Unlike the toml package, tomli_w contains inline typing annotations. Remove unnecessary make_no_network_finder(). Unnecessary since bab1e4f8a1a3ba5f5f08207c83a4e0a7a87ea615 where the _get_pages method was removed.
* Cleanup implicit string concatenationPradyun Gedam2021-08-201-0/+1
|
* Reformat the codebase, with blackPradyun Gedam2021-08-201-12/+0
|
* Merge pull request #10293 from jdufresne/noxPradyun Gedam2021-08-131-1/+1
|\ | | | | Upgrade nox to remove mypy ignores
| * Upgrade nox to remove mypy ignoresJon Dufresne2021-08-121-1/+1
| |
* | Blacken src/pip/_internal/vcs directoryJon Dufresne2021-08-121-1/+0
|/
* Bump mypy to 0.910Nipunn Koorapati2021-08-091-3/+8
| | | | | | | | | | | | | | | | | | | This notably gets us on a version of mypy that uses modular typeshed: https://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html which allows us to have finer control over what version of stubs we pull in from typeshed. Also contains other routine improvements to mypy. Required a few minor typing changes. Add flag --show-error-code so errors look like this src/pip/_internal/network/auth.py:70: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment] rather than src/pip/_internal/network/auth.py:70: error: Incompatible types in assignment (expression has type "None", variable has type Module)
* Bump black from 20.8b1 to 21.7b0Nipunn Koorapati2021-08-091-1/+1
|
* Blacken src/pip/_internal/indexPradyun Gedam2021-08-061-1/+0
|
* Merge pull request #10192 from pradyunsg/blacken/commandsPradyun Gedam2021-08-061-1/+0
|\ | | | | Blacken src/pip/_internal/commands/
| * Blacken src/pip/_internal/commands/Pradyun Gedam2021-07-231-1/+0
| | | | | | | | Progresses the black formatting of the codebase further.
* | Blacken src/pip/_internal/reqPradyun Gedam2021-07-241-1/+0
| | | | | | | | Progresses the black formatting of the codebase further.
* | Merge pull request #10191 from pradyunsg/blacken/toolsTzu-ping Chung2021-07-241-1/+0
|\ \ | | | | | | Blacken tools/
| * | Blacken tools/Pradyun Gedam2021-07-231-1/+0
| |/ | | | | | | Progresses the black formatting of the codebase further.
* | Blacken src/pip/_internal/network/Pradyun Gedam2021-07-231-1/+0
|/ | | | Progresses the black formatting of the codebase further.
* Blacken tests/libPradyun Gedam2021-04-021-1/+0
|
* Blacken conftest.pyPradyun Gedam2021-04-021-1/+0
|
* Merge pull request #9755 from pradyunsg/update-setup-py-filePradyun Gedam2021-04-021-2/+0
|\
| * Blacken setup.pyPradyun Gedam2021-04-011-2/+0
| |
* | Blacken __main__.pyPradyun Gedam2021-04-011-1/+0
|/
* Merge pull request #9739 from pradyunsg/tests/drop-YAML-based-resolver-testsPradyun Gedam2021-03-281-2/+0
|\ | | | | Drop YAML tests for the resolver
| * Drop YAML tests for the resolverPradyun Gedam2021-03-211-2/+0
| | | | | | | | | | We've created a fairly capable setup with the new resolver tests, which has now rendered this logic redundant and generally unnecessary.
* | Complete typing of docs directoryJon Dufresne2021-03-061-1/+1
|/
* Enable black on docs/Pradyun Gedam2021-03-061-1/+0
|
* Merge pull request #9641 from jdufresne/black-distPradyun Gedam2021-02-231-1/+0
|\ | | | | Blacken the src/pip/_internal/distributions directory
| * Blacken the src/pip/_internal/distributions directoryJon Dufresne2021-02-211-1/+0
| |
* | Merge pull request #9635 from jdufresne/blacken-cliTzu-ping Chung2021-02-231-1/+0
|\ \ | |/ |/| Blacken src/pip/_internal/cli directory
| * Blacken src/pip/_internal/cli directoryJon Dufresne2021-02-211-1/+0
| | | | | | | | | | | | | | | | | | | | 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 #9633 from jdufresne/blacken-utilsPradyun Gedam2021-02-211-1/+0
|\ \ | | | | | | Blacken src/pip/_internal/utils directory
| * | Blacken src/pip/_internal/utils directoryJon Dufresne2021-02-211-1/+0
| |/
* | Tweak and blacken noxfile.pyPradyun Gedam2021-02-211-1/+0
|/
* Blacken src/pip/_internal/resolution directoryJon Dufresne2021-02-201-1/+0
|
* Complete typing of noxfile.pyJon Dufresne2021-02-191-0/+1
| | | | | | | | | | | | | | | Allows removing a "mypy: disallow-untyped-defs=False" comment. To workaround a mypy bug, map(os.path.basename, distribution_files) was changed to use a generator expression. See: https://github.com/python/mypy/issues/9864 To verify correct usage of the nox API, it is now a dependency during pre-commit mypy runs. The mypy configuration "follow_imports = silent" allowed erroneous code to pass, so it has been removed. Now, all imports must be available during type.
* Better way to run slow linters in CI onlyStéphane Bidoul2021-01-241-0/+6
| | | | Taking advantage of pre-commit's manual stage.