* Improve types for CalledProcessError
This adds union types in the constructor to account for parameters that
might be either byte strings or unicode strings. At the same time, this
*removes* specific types from the user-accessible fields, to avoid the
need for users to at every use site specify which types their particular
instance was instantiated with.
* remove 'moral' comments; add List import; change 'str' to 'Text'
* import Text
* List -> Sequence; reinsert 'moral' comments
* Regularize string types everywhere
This defines _TXT and _CMD aliases, and uses them everywhere applicable.
Also brings the _FILE alias to python3.
* fix typo; possibly fix indentation
* remove trailing comma, which caused problems in python 2 tests
* fix py2 outputs to be bytes; tweak descriptive comments; remove one AnyStr
This declares the method to take the union of Set and FrozenSet
rather than AbstractSet since that is where `difference()`
(used by `assertSetEqual()`) is defined.
* move cgi to 2and3 and add types
This is pretty stable between Python 2 and 3, and not very well documented.
* fix CI failures
* adjust comment
(want to force Travis to re-run)
* give up on overriding values
Also fix signature of IO.seek, IO.truncate, IO.write, and MutableMapping.update
Fixes#1016
Note: I couldn't put typing.pyi in 2and3 because of an import cycle when adding `import sys` to 2/typing.pyi
* add compileall stubs to 3 and add types to the ones in 2
Didn't merge the stubs because all functions have additional parameters since 3.2,
so there would be no shared code between 2 and 3.
* add comment
- Add sys.version_info checks (mypy now supports them)
- Went over Python 3 docs and corrected a few things
- Reexport things that are imported from opcode
CONTRIBUTING.md says to prefer ... Not the most impactful change but fixing
these will allow us to lint for it in the future and get a consistent style.
The stubs for `unittest.TestCase.assertCountEqual()` specify the parameters are Sequences; in fact the method works fine with Iterables, as the first thing the method does is convert them to lists. [1] The docs do say sequences, but it appears there is no reason they cannot be Iterables.
[1]: https://github.com/python/cpython/blob/master/Lib/unittest/case.py#L1156
* Complete the tokenize module type hints
* Add missing import for Optional
* Use a 3.5-style named tuple, untokenize speaks with forked tongue so use Any
* Use explicit types for fields