Commit Graph

280 Commits

Author SHA1 Message Date
Alvaro Caceres
f87dde0d1b Remove webbrowser.pyi from pytype blacklist (#963) 2017-03-01 11:45:05 -08:00
Guido van Rossum
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 Kramm
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 Kramm
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 Kramm
7a7873aa94 adjust pytype blacklist (#529)
Remove argparse, tarfile and logging/handlers.
2016-09-09 12:28:54 -07:00
Matthias Kramm
e70be5fbe2 trim pytype testing blacklist (#527) 2016-09-09 06:30:36 -07:00
Valérian Rousset
1d5b35b2a5 Merge tarfile (#467) 2016-09-03 08:40:45 -07:00
Matthias Kramm
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 Kramm
c46993aa8e Add mypy blacklist, same syntax as pytype blacklist. (#508) 2016-08-29 14:23:39 -07:00
Valérian Rousset
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 Caceres
e60c3de954 Update pytype blacklist. (#430)
Broke travis with recent pytype push
2016-08-02 07:45:46 -07:00
Alvaro Caceres
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 Caceres
f72afd0ad1 Update pytype blacklist (#422) 2016-07-29 15:45:09 -07:00
Alvaro Caceres
b968bfcb1c Update pytype test blacklist (#411) 2016-07-27 15:43:48 -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
alvarocaceres
f7b35bc8be Remove line continuations to help pytype parse (#390) 2016-07-22 10:55:42 -07:00
alvarocaceres
e02332a787 Misc. changes to help pytype parse typeshed (#382) 2016-07-21 13:08:12 -07:00
alvarocaceres
c1b12970f6 Change empty string literals to ellipsis (#377)
For pytype compatibility
2016-07-20 10:57:32 -07:00
alvarocaceres
ac5916c170 Tweak version tests to help pytype parse them (#374) 2016-07-19 07:43:35 -07:00
Matthias Kramm
395265b9fb trim blacklist (#370)
Remove files that now work with pytype from blacklist.
2016-07-15 10:17:47 -07:00
Valérian Rousset
8ef221c162 add zipfile for py2 (#345) 2016-07-15 05:55:20 -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