Commit Graph

74 Commits

Author SHA1 Message Date
Alex Waygood
9197ace5ec Bump flake8-pyi to 24.6.0 (#12132) 2024-06-12 11:46:23 +01:00
Eric Traut
17f1c4628a Add precise values for enum members where possible (#11299)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2024-04-22 15:10:59 +01:00
Avasam
12b9e48324 Update Ruff and enable F821 in stubs (#11771) 2024-04-17 09:50:58 -07:00
Sebastian Rittau
7d56cd9a6c Remove remaining bare Incompletes (#11768)
Enable Y065
2024-04-16 06:26:14 -07:00
Alex Waygood
6883b80f52 Bump flake8-pyi to 24.4.0 (#11745) 2024-04-11 13:05:46 +01:00
renovate[bot]
8679e99468 Update most test/lint dependencies (#11683)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-01 01:46:58 +01:00
Avasam
1a942aa36d Replace Flake8 checks with Ruff (except for flake8-pyi) (#11496)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-10 14:35:45 +00:00
Avasam
5cb2fe97a6 Replace flake8-bugbear with Ruff (#11500)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-29 18:20:31 +00:00
Alex Waygood
c49c84f319 A new shade of Black (#11362) 2024-02-04 16:38:55 -08:00
Alex Waygood
a7c5d8bc14 Ignore Y023 in generated *_pb2.pyi files (#11246) 2024-01-05 19:01:54 +01:00
Avasam
e477c67852 Check *_pb2.pyi files again (#10909) 2023-10-23 01:22:55 +01:00
Avasam
35873ec3d8 Doc: Use proper name capitalization of tooling (Ruff, Black, Flake8) (#10913) 2023-10-18 23:46:53 +01:00
Alex Waygood
348f46452f flake8: Enable F822 (#10144) 2023-05-05 10:27:41 -07:00
Alex Waygood
99375e1b4c Bump flake8-pyi to 23.5.0; re-enable F821 (#10143) 2023-05-05 18:06:10 +02:00
Sebastian Rittau
027460f11a Remove unnecessary ellipsis expressions (#9976)
Ignore flake8 F821 warnings in stub files
2023-03-29 13:28:06 +02:00
Alex Waygood
f3fc792620 Bump flake8-pyi test dependency to 23.3.1 (#9906) 2023-03-20 19:19:01 +01:00
Alex Waygood
36515c48a9 flake8: ignore pyflakes codes in *_pb2.pyi files that are ignored in all other .pyi files (#9878)
Several flake8 error codes are currently ignored for all `.pyi` files _except_ those ending with `_pb2.pyi`. This caused a bit of confusion in #9873. This PR makes it so that all codes ignored generally across typeshed are also ignored in `*_pb2.pyi` files
2023-03-13 15:22:16 +00:00
Avasam
50acb57cda Ignore flake8 extensions stubbed by typeshed (#9715) 2023-02-19 12:42:03 +00:00
Alex Waygood
0ef9c3f8e8 Enable flake8-pyi's Y037 (#9686) 2023-02-06 19:01:02 -08:00
Alex Waygood
95dc689b28 Remove unneeded ignore in .flake8 (#9661)
B028 was renamed as B907, and we don't have any of the B9 rules enabled for this repo (they're all off by default)
2023-02-02 13:29:50 +00:00
Alex Waygood
2b9f200e7e Reenable flake8-pyi's Y011 and Y015 (#9551) 2023-01-16 22:52:40 +00:00
Alex Waygood
597e1a0078 Bump various test dependencies (#9549) 2023-01-16 11:04:45 -08:00
Mehdi Drissi
b76e61734f Allow default values in stubs. (#9490)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-01-11 14:31:45 +00:00
Avasam
c45999d905 Re-enable NQA102 (#9426)
re-enable NQA102
2023-01-02 23:49:02 +00:00
Alex Waygood
89f22278ba Bump flake8-pyi and pytype versions used in CI (#9268) 2022-11-24 14:55:26 +00:00
kasium
f9cd5ee859 Improve ast types; revert several "redundant numeric union" changes from #7906 (#9130)
* Adapt number types in ast

Since mypy  0.990 type promotions was limited.
This means that complex is not longer promoted to int/float, therefore
we should adapt the types to list all possible types

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2022-11-14 09:41:23 +00:00
Alex Waygood
d1d1afbe3a Bump flake8-bugbear; ignore flake8-bugbear in stub files (#9069) 2022-11-02 12:18:00 -07:00
Alex Waygood
b417d5796d Run flake8-noqa in CI (#8641) 2022-08-29 21:06:47 +01:00
Alex Waygood
8cf125d80d flake8 config: fix typo (#8626)
Accidentally introduced in #8612
2022-08-26 11:55:47 +01:00
Nipunn Koorapati
7beaebff40 Bump to mypy-protobuf 3.3.0 (#8612)
* Bump to mypy-protobuf 3.3.0

* Remove some ignores for formatting
2022-08-26 07:24:11 +01:00
Alex Waygood
556f6a10f6 Enable flake8-pyi's Y034 check in stdlib/typing.pyi (#8530) 2022-08-11 10:57:31 +02:00
Alex Waygood
78d96cd17e Drop support for Python 2 (#8272) 2022-07-12 09:08:56 +02:00
Alex Waygood
033516d39f flake8 config: Ignore more error codes in .py files (#8065)
black fixes these for us in `pre-commit.ci`.
2022-06-12 12:04:38 -07:00
Alex Waygood
5c6178a821 Import generics from standard modules in all third-party stubs (#7791) 2022-05-07 10:35:50 +02:00
Alex Waygood
7ce4607dee Upgrade flake8-pyi to 22.4.0, enable Y026 in .flake8 config (#7650) 2022-04-17 01:23:35 +01:00
Alex Waygood
536f783a82 Exclude Y037 in .flake8 config, for now (#7600)
Unblocks https://github.com/PyCQA/flake8-pyi/pull/202
2022-04-06 17:24:02 +01:00
Alex Waygood
ae6ff79c0e flake8 config: remove line that exists only for Python-2 checking (#7570) 2022-04-01 08:07:16 +02:00
Alex Waygood
85f060b26d Exclude the Python-2 stdlib from flake8 CI check (#7569)
We should hopefully be getting rid of this entire subdirectory soon anyway (#7367). This will make PRs to flake8-pyi a lot easier.
2022-03-31 23:35:45 +01:00
Alex Waygood
072f1c246e Add Y034 to list of ignored error codes for typing.pyi (#7336)
Unblocks https://github.com/PyCQA/flake8-pyi/pull/186
2022-02-20 17:13:18 -08:00
Alex Waygood
fe6233a8c3 Add Y027 to list of ignored .flake8 error codes (#6962)
Refs https://github.com/PyCQA/flake8-pyi/pull/104
2022-01-19 07:17:30 -08:00
Jelle Zijlstra
30580a3732 disable Y026 in typing.pyi too (#6959) 2022-01-18 20:14:55 -08:00
Jelle Zijlstra
65a8825e2f Disable Y026 from flake8-pyi (#6958)
Dependent on PyCQA/flake8-pyi#101.
2022-01-18 20:07:34 -08:00
Sebastian Rittau
f5059c0c41 Update flake8 config (#6684) 2021-12-26 14:45:15 +02:00
Akuli
b0ef85288d flake8: do not exclude @python2 dirs (#5457) 2021-05-15 12:05:26 +02:00
Nipunn Koorapati
9af49c0b69 Protobuf stubs update using mypy-protobuf (#4785)
* Add script to generate protoc stubs using mypy-protobuf generated stubs

* Use generate_proto_stubs to generate stubs for protobuf 3.14.0

* Skip _pb2.pyi from flake8,black,isort,pytype
2020-11-25 10:48:26 -08:00
Shantanu
48970d31de tests / scripts: blacken and isort (#4704)
I often run black and isort in typeshed root and then have to undo these
changes.

Co-authored-by: hauntsaninja <>
2020-10-25 11:21:03 +01:00
Sebastian Rittau
a913af9523 flake8: Enable F811 (#4158) 2020-06-02 14:08:54 -07:00
Sebastian Rittau
92f52a2615 flake8 updates and cleanups (#3940)
* flake8 updates and cleanups

* Update to flake8 3.7.9.
* Update to flake8-bugbear 20.1.4.
* Only ignore errors in stub files.
* Remove obsolete error counts.
* Sort error codes alphabetically.
* Don't ignore the following errors (unneeded):
    * E704 Multiple statements on one line (def)
    * W504 Line break occurred after a binary operator
    * B303 __metaclass__ used

* Remove obsolete comment

* Ignore F822 undefined name in __all__
2020-04-23 19:38:47 -07:00
Sebastian Rittau
d82d3396e7 Minor flake8 improvements (#3324)
* Update flake8-bugbear
* Remove unnecessary comment
* Add a comment about an upcoming fix
2019-10-08 17:42:36 +02:00
Sebastian Rittau
006a79220f Flake8 fixes (#2549)
* Fix over-indented continuation lines

* Fix under-indented continuation lines

* Fix whitespace around default operator problems

* Limit line lengths

* Fix inconsistent files
2018-10-24 07:20:53 -07:00