Commit 6e45252
committed
[WIP] Also match .pyi files when looking for .py files
This will make sure that Python-related hints for contributors and
pre-commit hooks even if repos only contain stub files [1]. The main
motivation behind creating this commit is to prepare for a future commit
that will add Python stub files to this repo.
That future commit will add wcwidth [2] as a dependency. Unfortunately,
wcwidth doesn’t have any type hints yet [3], and there doesn’t seem to
be a PEP 561 [4] stub package for wcwidth. When a module isn’t typed and
there’s no stub package for that module, mypy’s recommendation is to
write your own stub files [5]. As a result, that future commit is going
to add .pyi files to this repo.
Since that future commit is going to add a new type of file to this
repo, I thought that it would make sense to preemptively add support for
that file type to repo-style-checker.
[1]: <https://mypy.readthedocs.io/en/stable/stubs.html>
[2]: <https://pypi.org/project/wcwidth/>
[3]: <jquast/wcwidth#71>
[4]: <https://peps.python.org/pep-0561/>
[5]: <https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-library-stubs-or-py-typed-marker>
TODO:
• Add the future wcwidth-related commit.1 parent 02a4fef commit 6e45252
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
208 | | - | |
209 | | - | |
| 209 | + | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
0 commit comments