Commit Graph
40 Commits
Author SHA1 Message Date
Guido van RossumandJelle Zijlstra 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
Ethan SmithandJelle Zijlstra be80c36816 fix mypy_selftest (#1369)
Related to python/mypy#3337.
2017-05-28 23:30:54 -07:00
Matthias KrammandJelle Zijlstra ac0b809bf5 tweak files to fix pytype parsing errors (#1325)
* Don't use "\" to join lines
2017-05-26 08:45:52 -07:00
Jelle ZijlstraandGuido van Rossum 728b977729 Replace a number of default argument values with "..." (#1280)
pytype apparently doesn't like default values that aren't ints or
None/True/False.
2017-05-21 14:31:22 -07:00
Mahmoud AfanehandJelle Zijlstra 3896298027 Add multiprocessing.context stubs (#1260) 2017-05-20 23:13:18 -07:00
Matthias KrammandJelle Zijlstra d7d27647a9 also run pytype tests for Python 3 modules (#1278) 2017-05-20 09:10:14 -07:00
Jelle ZijlstraandGuido van Rossum 3101768f12 drop 3.2 (#1213)
Closes #1145.
2017-04-25 17:15:49 -07:00
Jelle ZijlstraandŁukasz Langa e50fcaf658 add mypy_selftest.py (#1102)
* add mypy_selftest.py
* add selftest to Travis
2017-04-17 11:17:27 -07:00
rchen152andMatthias Kramm 2c54640dce Remove types.pyi from the pytype blacklist. (#1162)
* Fix a few return types in stdlib/2/inspect.pyi.

* Rename _FrameRecord to _FrameInfo

* Correct some return types in itertools.pyi from Iterable to Iterator.

* Change types.pyi syntax that pytype can't parse.

* Remove types.pyi from the pytype blacklist.
2017-04-14 15:14:20 -07:00
David FisherandGuido van Rossum 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
Alvaro CaceresandGuido van Rossum f87dde0d1b Remove webbrowser.pyi from pytype blacklist (#963) 2017-03-01 11:45:05 -08:00
Guido van RossumandŁukasz Langa 231f00d7da Fix boto stubs.
Replace two `FIXME` comments with `type: ignore`.
See https://github.com/python/mypy/issues/1237.
2016-12-24 09:06:38 -08:00
Lukasz Langa 4084296f3f Exclude boto from tests due to broken Liskov Substitution Principle
Starting with python/mypy#2521 mypy is performing stricter function signature
checks.

This makes the stubs diverge from the actual implementation but makes the stubs
internally consistent.  Since this is an actual typing issue in the base
implementation, we need to defer to the original authors to fix it.

Sadly, in this case the breakage is rather fundamental and unlikely to get
fixed by upstream. Consider:

```
  class AWSAuthConnection(object):
    def make_request(self, method, path, headers=None, data='', host=None,
      auth_path=None, sender=None, override_num_retries=None,
      params=None, retry_handler=None): ...

  class AWSQueryConnection(AWSAuthConnection):
    def make_request(self, action, params=None, path='/', verb='GET'): ...
```

Hence, until we have a workaround for the error produced by Mypy, we're
excluding those stubs from being tested against.
2016-12-22 15:54:20 -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 79d8757f1f Enable flake8 tests
Ran both by Travis and locally. There's some setup required, README updated.
A few important Flake8 checks are still disabled, we're going to enable them as
soon as the stubs are fixed and we can reliably run Flake8 locally with Python
3.6.
2016-12-20 04:07:44 -08:00
Matthias KrammandGitHub a2559eeaeb make pytype aware that 2.7/ has been renamed to 2/ (#729) 2016-12-02 06:10:14 -08:00
Lukasz Langa ab4ad3fe9d Make tests run with 3.6 --fast-parser, too 2016-11-26 20:17:28 -08:00
Matthias KrammandGuido van Rossum 94d3ddb60a change the way 'os' imports 'os.path' (#601)
* use 'from . import path' instead, in both PY2 and PY3
* update blacklist to include os/__init__.pyi
2016-10-17 17:49:12 -07: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 KrammandGitHub 7a7873aa94 adjust pytype blacklist (#529)
Remove argparse, tarfile and logging/handlers.
2016-09-09 12:28:54 -07:00
Matthias KrammandGitHub e70be5fbe2 trim pytype testing blacklist (#527) 2016-09-09 06:30:36 -07:00
Valérian RoussetandGuido van Rossum 1d5b35b2a5 Merge tarfile (#467) 2016-09-03 08:40:45 -07:00
Matthias KrammandGitHub 044d11f9ee clean up unittest.py (#509)
* clean up unittest.py

Remove duplicates, adjust wrapping.

* also remove unittest from pytype blacklist
2016-08-31 07:27:53 -07:00
Matthias KrammandGitHub c46993aa8e Add mypy blacklist, same syntax as pytype blacklist. (#508) 2016-08-29 14:23:39 -07:00
Valérian RoussetandMatthias Kramm 2c21f27310 Add plistlib (#433)
* py3 done

* py2 done

* fix by matthiaskramm

* remove plistlib from pytype checking

* add unicode for path in py2

* add readPlistFromString (and write) in py2
2016-08-02 14:52:26 -07:00
Alvaro CaceresandMatthias Kramm e60c3de954 Update pytype blacklist. (#430)
Broke travis with recent pytype push
2016-08-02 07:45:46 -07:00
Alvaro CaceresandMatthias Kramm 4c20cd6711 2and3/mmap.pyi : remove "type: ignore" (#425)
First was for mypy compatibility, but is no longer needed.

Second is removed by going inheriting (Iterable[bytes],
Container[bytes], Sized, Reversible[bytes]) instead of
Sequence[bytes]. Should presumably catch more errors when using __getattr__
2016-08-01 14:20:37 -07:00
Alvaro CaceresandMatthias Kramm f72afd0ad1 Update pytype blacklist (#422) 2016-07-29 15:45:09 -07:00
Alvaro CaceresandMatthias Kramm b968bfcb1c Update pytype test blacklist (#411) 2016-07-27 15:43:48 -07:00
Guido van RossumandGitHub 39325bf159 Mypy now supports sys.platform and sys.version_info checks (#410) 2016-07-27 13:25:29 -07:00
alvarocaceresandMatthias Kramm f7b35bc8be Remove line continuations to help pytype parse (#390) 2016-07-22 10:55:42 -07:00
alvarocaceresandMatthias Kramm e02332a787 Misc. changes to help pytype parse typeshed (#382) 2016-07-21 13:08:12 -07:00
alvarocaceresandMatthias Kramm c1b12970f6 Change empty string literals to ellipsis (#377)
For pytype compatibility
2016-07-20 10:57:32 -07:00
alvarocaceresandMatthias Kramm ac5916c170 Tweak version tests to help pytype parse them (#374) 2016-07-19 07:43:35 -07:00
Matthias KrammandGitHub 395265b9fb trim blacklist (#370)
Remove files that now work with pytype from blacklist.
2016-07-15 10:17:47 -07:00
Valérian RoussetandMatthias Kramm 8ef221c162 add zipfile for py2 (#345) 2016-07-15 05:55:20 -07:00
Guido van RossumandJukka Lehtosalo 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
alvarocaceresandGuido van Rossum 63cbe2dc3c Refactor how test are run, add tests to exercise pytype (if installed) (#353) 2016-07-12 15:30:54 -07:00