29 Commits

Author SHA1 Message Date
Shantanu
a93fa6120e mypy_test: fix for stub deletions (#4816)
I think this should helps prevent issues like #4815

Co-authored-by: hauntsaninja <>
2020-12-13 23:41:20 -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
wouter bolsterlee
3efb675dba Use ‘exclude list’ instead of ‘blacklist’ (#4297)
This replaces all uses of ‘blacklist’ with ‘exclude list’. Benefits:

- It is racially neutral terminology; see e.g. [1]

- It makes the meaning more clear. In fact, with the popular Python
  autoformatter called ‘black’, also used by this project, files can be
  ‘blackened’ which is something completely different from them being on
  a blacklist.

[1] https://chromium.googlesource.com/chromium/src/+/master/styleguide/inclusive_code.md#racially-neutral
2020-07-01 09:10:37 +02:00
Shantanu
997c73ae79 travis: start testing 3.9 somewhat (#4071)
* travis: run stubtest on py39, allowing failures

* travis: run mypy with python version 3.9

* boto.compat, base64: fix version handling of (en|de)codebytes

* venv: fix #4010

Co-authored-by: hauntsaninja <>
2020-05-24 18:45:16 -07:00
Sebastian Rittau
fdeae5d00e Enable --disallow-subclassing-any (#3591)
Closes: #1446
2020-01-08 11:51:44 -08:00
Sebastian Rittau
66778639a5 Run CI tests against win32 and darwin platform (#3457)
Also use Python 3.8 as default Python version for tests
2019-11-11 07:52:11 -08:00
Sebastian Rittau
c32e1e2280 Enable --disallow-any-generics for stubs (#3288) 2019-10-01 05:31:34 -07:00
Sebastian Rittau
9ccf9356bf Remove Python 3.4 support (#3147)
Closes #3123
2019-07-27 10:58:21 +02:00
Sebastian Rittau
b20e5b6c14 Travis: run mypy with Python 3.8 as well (#3146)
This runs mypy both with Python 3.7 and 3.8. In Python 3.8,
mypy switched from using typed-ast to using Python's built-in ast.
This patch ensures that both are tested.
2019-07-25 07:43:52 -07:00
Sebastian Rittau
09d1055cd3 Remove mypy new analyzer tests (#3128)
Now that the new analyzer is the default, this does exactly the same
as the normal mypy self test.
2019-07-18 17:02:12 +02:00
Ivan Levkivskyi
61eb99664b Add new semantic analyzer to mypy tests (#3037)
This also removes two redundant definitions in curses/__init__.pyi star-imported from _curses.
2019-06-07 16:49:57 +01:00
Jelle Zijlstra
cd9b7158ec fix CI (#2992) 2019-05-15 14:20:08 -07:00
Sebastian Rittau
fa74160e1f Drop support for Python 3.3 (#2258)
Closes #2257.
2018-06-19 15:37:13 -07:00
Jelle Zijlstra
c06a718c5b always run mypy with --no-implicit-optional (#2242)
This was already the configuration in Travis and it's been working fine. It's
confusing that Travis was using a different configuration than the default
when you run tests/mypy_test.py yourself.
2018-06-15 21:34:14 -07:00
Jelle Zijlstra
499f852e37 add --show-traceback to mypy_test.py flags (#2236)
This makes debugging easier.
2018-06-15 16:46:59 -07:00
Jelle Zijlstra
81a6ea43a5 try using --no-site-packages (#2036)
Fixes #2035.
2018-04-09 12:55:18 -07:00
Jelle Zijlstra
ab72267669 also test 3.7 with mypy (#1917) 2018-02-24 09:56:35 -08:00
Guido van Rossum
04fe184dcf Add flags to pass on --warn-unused-ignores and --no-implicit-optional to mypy (#1421)
* Add flags to pass on --warn-unused-ignores and --no-implicit-optional to mypy
* Make implicit Optional explicit in arg types (2and3 part)
* Convert {stdlib,third_party}/2 to explicit Optional
2017-06-20 22:18:49 -07:00
Jelle Zijlstra
3101768f12 drop 3.2 (#1213)
Closes #1145.
2017-04-25 17:15:49 -07:00
David Fisher
2861674784 Remove unnecessary --fast-parser flag to mypy (#977)
It's now on by default, and the flag will eventually be removed.
2017-03-07 15:01:17 -08:00
Lukasz Langa
8c5c788a4d Enable flake8-pyi plugin to automatically include *.pyi files
This simplifies running flake8 tests and reduces the amount of F821 errors
reported (flake8-pyi enables support for forward references in *.pyi files).
The error code is left disabled until I clean up the remaining issues.
2016-12-21 00:56:01 -08:00
Lukasz Langa
ab4ad3fe9d Make tests run with 3.6 --fast-parser, too 2016-11-26 20:17:28 -08:00
Guido van Rossum
a353aabbcd Add commented-out flag to use --fast-parser. 2016-09-15 16:49:56 -07:00
Guido van Rossum
d131efcaa0 Skip "module" whose name starts with ".". 2016-09-15 16:20:28 -07:00
Matthias Kramm
c46993aa8e Add mypy blacklist, same syntax as pytype blacklist. (#508) 2016-08-29 14:23:39 -07:00
Guido van Rossum
39325bf159 Mypy now supports sys.platform and sys.version_info checks (#410) 2016-07-27 13:25:29 -07:00
Guido van Rossum
f47ff0b966 Add --strict-optional flag to mypy (#368) 2016-07-13 17:50:36 +01:00
Alvaro Caceres
67ccb1b450 revert unnecessary change to mypy_test from previous commit 2016-07-12 18:46:09 -05:00
alvarocaceres
63cbe2dc3c Refactor how test are run, add tests to exercise pytype (if installed) (#353) 2016-07-12 15:30:54 -07:00