Commit Graph

64 Commits

Author SHA1 Message Date
Tushar Sadhwani
5342d2eeda
Replace the blib2to3 tokenizer with pytokens (#4536) 2025-03-15 17:41:19 -07:00
sobolevn
256f3420b1
Add --local-partial-types and --strict-bytes to mypy (#4583) 2025-02-20 15:27:23 -08:00
pre-commit-ci[bot]
40b73f2fb5
[pre-commit.ci] pre-commit autoupdate (#4547)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.13.0...v1.14.1)

* Fix wrapper's return types to be String or Text IO

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Cooper Ry Lees <me@cooperlees.com>
2025-01-07 11:42:27 -08:00
mosfet80
0db1173bbc
Update libs into .pre-commit-config.yaml (#4521) 2024-12-07 19:53:22 -08:00
Shantanu
f54f34799b
Use released mypy (#4490) 2024-10-19 18:01:05 -07:00
Shantanu
26aeebe9fb
Update mypy/c (#4450) 2024-09-07 17:32:47 -07:00
pre-commit-ci[bot]
978bc505ac
[pre-commit.ci] pre-commit autoupdate (#4392) 2024-07-01 17:18:22 -07:00
Shantanu
7669381420
Pin to old flake8-bugbear (#4319)
See https://github.com/PyCQA/flake8-bugbear/issues/467 or https://github.com/psf/black/pull/4318
2024-04-21 20:19:47 -07:00
pre-commit-ci[bot]
c8f1a5542c
[pre-commit.ci] pre-commit autoupdate (#4297) 2024-04-01 15:51:24 -07:00
Henry Schreiner
2bc5ce8ae1
feat: add schema and validate-pyproject support (#4181)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-01-29 07:56:48 -08:00
pre-commit-ci[bot]
c35924663c
[pre-commit.ci] pre-commit autoupdate (#4139) 2024-01-01 15:12:18 -08:00
Alex Waygood
69d49c5a6f
Bump mypy to 1.7.1 (#4069) 2023-11-24 06:19:54 -08:00
Alex Waygood
d93a942a79
Upgrade mypy to 1.6.1 (#4049) 2023-11-18 11:42:36 -08:00
Charles Patel
6f84f65285
Migrate mypy config to pyproject.toml (#3936)
Co-authored-by: Charles Patel <charles.patel@apkudo.com>
2023-10-16 05:24:16 -07:00
pre-commit-ci[bot]
947bd3825e
[pre-commit.ci] pre-commit autoupdate (#3915)
updates:
- [github.com/pre-commit/mirrors-mypy: v1.5.0 → v1.5.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.0...v1.5.1)
- [github.com/pre-commit/mirrors-prettier: v3.0.1 → v3.0.3](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.1...v3.0.3)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-03 10:19:53 -07:00
pre-commit-ci[bot]
ade371fd1c
[pre-commit.ci] pre-commit autoupdate (#3837) 2023-08-16 00:01:21 -07:00
Shantanu
7c4fe83bd8
Make pre-commit do less (#3838) 2023-08-15 06:51:26 -07:00
pre-commit-ci[bot]
77f19944f6
[pre-commit.ci] pre-commit autoupdate (#3833)
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.0 → v3.0.1](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0...v3.0.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-08 08:41:39 -07:00
pre-commit-ci[bot]
1b028cc9d9
[pre-commit.ci] pre-commit autoupdate (#3825) 2023-08-01 01:48:21 -07:00
mihazagar
13bd4fffae
Fixing pre-commit using pyyaml with broken version (#3804) 2023-07-22 11:12:37 -07:00
Shantanu
c1e30d97fe
Fix most blib2to3 lint (#3794) 2023-07-16 21:33:58 -07:00
Shantanu
0e26ada66d
Continue to avoid Click typing issue (#3791) 2023-07-16 17:35:19 -07:00
pre-commit-ci[bot]
37895f8e50
[pre-commit.ci] pre-commit autoupdate (#3780)
updates:
- [github.com/pycqa/flake8: 4.0.1 → 6.0.0](https://github.com/pycqa/flake8/compare/4.0.1...6.0.0)
- [github.com/pre-commit/mirrors-prettier: v2.7.1 → v3.0.0](https://github.com/pre-commit/mirrors-prettier/compare/v2.7.1...v3.0.0)
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0)
2023-07-11 07:50:52 -07:00
Alex Waygood
f4490acfd7
Remove unneeded mypy dependencies (#3783) 2023-07-11 07:21:36 -07:00
Shantanu
ad3724b7ff
Upgrade to latest mypy (#3775) 2023-07-09 17:04:50 -07:00
Shantanu
4130c65578
Fix CI for Click typing issue (#3770)
https://github.com/pallets/click/issues/2558
2023-07-09 08:14:38 -07:00
Stijn de Gooijer
69ca0a4c7a
Infer target version based on project metadata (#3219)
Co-authored-by: Richard Si <sichard26@gmail.com>
2023-01-31 18:00:17 -08:00
Jelle Zijlstra
f4ebc68320
Upgrade isort (#3534)
See PyCQA/isort#2077.
2023-01-30 18:45:12 -08:00
Richard Si
80de2372e4
Bump mypy[c] from 0.971 to 0.991 (#3380) 2022-12-10 12:56:34 -08:00
Shantanu
2c90480e1a
Use strict mypy checking (#3222)
Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
2022-08-30 20:46:46 -07:00
Richard Si
411ed778d5
Bump pre-commit hooks (#3191) 2022-07-27 22:04:14 -04:00
Richard Si
e0a780a505 Add isort to linting toolchain
Co-authored-by: Shivansh-007 <shivansh-007@outlook.com>
2022-07-27 17:19:28 -04:00
Sagi Shadur
6c1bd08f16
Test run black on self (#3114)
* Add run_self environment in tox

* Add run_self task as part of the lint CI flow

* Remove hard coded sources list

* Remove black from pre-commit

Co-authored-by: Cooper Lees <me@cooperlees.com>
2022-06-14 09:08:36 -07:00
Richard Si
fa5fd262ff
Update test_black.shhh_click test for click 8+ (#2993)
The 8.0.x series renamed its "die on LANG=C" function and the 8.1.x
series straight up deleted it.

Unfortunately this makes this test type check cleanly hard, so we'll
just lint with click 8.1+ (the pre-commit hook configuration was changed
mostly to just evict any now unsupported mypy environments)
2022-04-04 18:23:30 -07:00
Richard Si
9ce3c806e4
Bump mypy, flake8, and pre-commit-hooks in pre-commit (GH-2922) 2022-03-14 19:41:46 -04:00
Richard Si
565f9c92b7
CI: add diff-shades integration (#2725)
Hopefully this makes it much easier to gauge the impacts of future
changes!
2022-01-13 18:50:02 -08:00
Richard Si
72fbacd996
chore: dump docs deps and pre-commit hooks (#2676) 2021-12-14 17:25:47 -08:00
danieleades
a18ee4018f
add more flake8 lints (#2653) 2021-11-28 18:20:52 -08:00
Marco Edward Gorelli
0540591e25
add check for version in the-basics example (#2459) 2021-09-18 20:24:09 -07:00
Marco Edward Gorelli
8b06805334
Document jupyter hook (#2416)
This also introduces a script so we can reference the latest version in
the example pre-commit configuration in the docs without forgetting to
update it when doing a release!

Commit history before merge:

* document jupyter hook
* note minimum version
* add check for pre-commit version
* use git tag
* curl api during ci
* parse version from changes file
* fixup script
* rename variables
* Tweak the docs & magical script
* fix couple of typos
* pin additional dependencies in hook
* Add types-PyYAML to lockfile

Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
2021-08-27 16:21:08 -04:00
Richard Si
b97a4ac449
Add test requirements to Pipfile[.lock] & bump deps (#2436)
While this development environment / requirements situation is a mess,
let's at least make it consistent. We're effectively supporting two
modes of development in this project, 1) tox based dev commands
(e.g. `tox -e fuzz`) that are dead simple to use, and 2) manual dev
commands (e.g. `pytest -n auto`) that give more control and are usually
faster.

Right now the Pipfile.lock based development environment is incomplete
missing the test requirements specified in ./test_requirements.txt.
This is annoying since manual test commands (e.g. `pytest -k fmtonoff`)
fail. Let's fix this by making Pipfile.lock basically a
"everything you need" requirements file (fuzzing not included since
running it locally is not something common).

Oh and let's bump some documentation deps (and bring some requirements
across .pre-commit-config.yaml, Pipfile, and docs/requirement.txt in
alignment again). Don't worry, I tested these changes so they should
be fine (hopefully!).
2021-08-22 20:20:06 -07:00
Taneli Hukkinen
e76adbecb8
Fix type dependencies of mypy invocation (#2411)
Commit history before merge:

* Fix type dependencies of mypy invocation
* Consistent version upper bound
2021-08-06 14:53:24 -04:00
Taneli Hukkinen
be16cfa035
Get click types from main repo (#2344)
Click types have been moved to click repo itself. See pallets/click#1856

I've had some issues with typeshed types being outdated in another project
so might be good to avoid that here.

Commit history before merge:

* Get `click` types from main repo
* Fix mypy errors
* Require click v8 for type annotations
* Update Pipfile
2021-06-22 11:58:49 -04:00
SADIK KUZU
3980b4b176
Update pre-commit config (#2331)
via `pre-commit autoupdate`

```
Updating https://gitlab.com/pycqa/flake8
... updating 3.9.0 -> 3.9.2.
Updating https://github.com/pre-commit/mirrors-mypy
... updating v0.812 -> v0.902.
Updating https://github.com/pre-commit/mirrors-prettier
... updating v2.2.1 -> v2.3.1.
```

Signed-off-by: SADIK KUZU <sadikkuzu@hotmail.com>

* Add necessary typeshed packages to requirements

Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
2021-06-21 18:28:25 -07:00
jack1142
52f402dcfb
Add EOF and trailing whitespace fixer to pre-commit config (#2330) 2021-06-13 10:22:46 -07:00
Ryan McPartlan
05b54b8432
Fix incorrect document referance (#2326) 2021-06-10 17:45:43 -07:00
Felix Hildén
921c24af80
Make Prettier preserve line ending type (#2244)
Why? The default in Prettier 2.0 was
[changed](https://prettier.io/docs/en/options.html#end-of-line) from
`auto` to `LF`. This makes development on Windows awkward, because
every file is marked with changes both by Prettier and then by Git
regardless of repository line ending settings, making committing harder
than it should be.

---

Aside from that: I noticed that runnin pre-commit manually seems to add
line endings to symlink files, but they disappear when actually committing.
Don't know if that's a known.. quirk..(?) or not.

---

Commit history before merge:

* Make Prettier preserve line ending type
* Move options to .prettierrc
2021-05-17 14:38:43 -04:00
Cooper Lees
201b331e55
Run lint in latest python + update precommit (#2081)
- Lets move to latest and greatest of lints
2021-04-01 16:15:50 -07:00
Cooper Lees
125ed5b260
Add a GitHub Action to build + Upload black to PyPI (#1848)
* Add a GitHub Action to build + Upload black to PyPI
- Build a wheel + sdist
- Upload via twine using token stored in GitHub secrets
2021-04-01 18:41:55 +02:00
Richard Si
aebd3c37b2
Update prettier in pre-commit config (#1966)
With older versions of prettier, when the hook failed a bunch of
"[error] No parser could be inferred for file: {PATH}" error lines
showed up because of lack of support of a flag that pre-commit
passes for us by default. It made figuring out why the prettier hook
failed annoying.
2021-02-04 20:10:45 -08:00