Jon Dufresne
7ffd0ca13e
Complete typing of noxfile.py
...
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.
2021-02-19 05:47:55 -08:00
Stéphane Bidoul
fe3aec0f5e
Better way to run slow linters in CI only
...
Taking advantage of pre-commit's manual stage.
2021-01-24 15:39:51 +01:00
Stéphane Bidoul
e25b183459
Update pre-commit hooks
2021-01-24 15:25:37 +01:00
Pradyun Gedam
1eebb12550
Merge pull request #9335 from hugovk/rm-2
...
Remove redundant Python 2.7 code
2020-12-23 17:49:30 +00:00
Stéphane Bidoul
41e4547542
Merge pull request #9333 from sbidoul/pre-commit-speed-sbi
...
Improve local pre-commit experience
2020-12-23 12:47:20 +01:00
Hugo van Kemenade
817ee23051
Remove redundant Python 2.7 code
2020-12-22 09:06:26 +02:00
Stéphane Bidoul
ccbf085095
Improve local pre-commit experience
2020-12-21 20:10:44 +01:00
Jon Dufresne
c0a7444de6
Update isort URL: timothycrosley/isort → PyCQA/isort
2020-12-19 15:28:02 -08:00
cf6ecab627
Bump mypy to 0.790 for Python 3.9 compat
...
HashError.order is now annotated as an int to allow
HashErrors.errors.sort(key=lambda e: e.order). Alternatively we can
define a function which assert e is not None but I prefer the more
concise version, since we never raise HashError directly anyway.
2020-10-12 17:37:55 +07:00
Pradyun Gedam
c5744d5643
Enforce news/*.{correct-kind}.rst naming
2020-10-03 16:48:51 +05:30
Pradyun Gedam
e5deff909c
Add black to pre-commit, ignoring all files
...
Each of the lines in this "exclude" pattern will get a dedicated PR
to remove it and would blacken that part of the codebase.
2020-09-24 15:36:38 +05:30
Pradyun Gedam
25ab172b55
Update linter: isort
2020-09-23 19:52:28 +05:30
Pradyun Gedam
89dad17b87
Update linter: pygrep-hooks
2020-09-23 19:52:20 +05:30
Pradyun Gedam
e93c0ba6a3
Update linters
...
None of these require any changes to the codebase.
2020-09-23 19:50:53 +05:30
f8b06a3906
Enable flake8-logging-format
2020-07-17 14:33:19 +07:00
Devesh Kumar Singh
9a52dcd62b
Add flake8-bugbear to pre-commit
2020-06-05 02:40:26 +05:30
Devesh Kumar Singh
60f00b837a
Upgrade flake8 to 3.8.1
...
Co-Authored-By: Anthony Sottile <asottile@umich.edu>
2020-05-18 21:58:26 +05:30
Devesh Kumar Singh
feaa76a1d6
Update mypy to v0.770
2020-05-14 10:39:31 +05:30
Pradyun Gedam
cb3f7babed
Bump linters
2020-05-13 01:00:21 +05:30
Pradyun Gedam
e078531da2
Switch to upstream flake8
2020-05-13 01:00:21 +05:30
Pradyun Gedam
608530755f
Make mypy pretty
2020-05-13 01:00:17 +05:30
Maxim Kurnikov
38fd95aa6a
update to mypy==0.750
2019-12-12 11:08:36 +01:00
Pradyun Gedam
1a28d31002
Type Annotations!
2019-11-03 14:48:21 +05:30
Xavier Fernandez
8df9329396
Add release target
2019-10-14 14:23:00 +02:00
Maxim Kurnikov
64dacbf888
update mypy to 0.730
2019-09-28 17:42:27 +03:00
Pradyun Gedam
9798d0fff2
Dedent hooks in .pre-commit-config.yaml
2019-09-25 09:30:23 +05:30
Pradyun Gedam
1d1e67269e
Add invocation of mypy -2, to pre-commit
2019-09-24 22:24:04 +05:30
Pradyun Gedam
f646349e1b
Add pre-commit hook for check-manifest
...
Why: This brings back functionality removed in prior commits
2019-09-24 18:36:17 +05:30
Pradyun Gedam
c47e1b6e5d
Enable rst-backticks for ReST files and NEWS fragments
2019-09-24 18:03:22 +05:30
Pradyun Gedam
ea68afab93
Enable isort in pre-commit
2019-09-24 18:03:22 +05:30
Pradyun Gedam
7224a1155c
Enable trailing-whitespace
2019-09-24 18:03:22 +05:30
Pradyun Gedam
6f8c29aa77
Enable end-of-file-fixer
2019-09-24 18:03:22 +05:30
Pradyun Gedam
40a0f189b9
Enable check-builtin-literals
2019-09-24 18:03:22 +05:30
Pradyun Gedam
096cfb2de0
Add initial pre-commit configuration
...
Why: pip's linting requirements aren't special and there are benefits to
using pre-commit, including a simpler workflow and access to the
ecosystem of tooling around pre-commit.
2019-09-24 16:02:51 +05:30