Add typehints for the following `asyncio.subprocess.Process` attributes:
- `stdin`: `Optional[asyncio.streams.StreamWriter]`
- `stdout`: `Optional[asyncio.streams.StreamReader]`
- `stderr`: `Optional[asyncio.streams.StreamReader]`
- `pid`: `int`
Include stdin, stdout, and stderr also in SSP.
mypy could not recognize the case when we use contextmanager as a
decorator, which has been supported since Python 3.2.
In the following code snippet,
from contextlib import contextmanager
@contextmanager
def foo(arg1):
try:
print(arg1)
print('1')
yield
finally:
print('2')
@foo('0')
def foo2():
print('3')
foo2()
we get mypy error as follows,
error: ContextManager[Any] not callable
The suggested changes can fix this error and properly reflect the
updated contextmanager usage pattern.
- Switch requirements-tests-py3.txt to use mypy GitHub master.
- Exclude .venv{2,3} (suggested in README.md) in .flake8 and .gitignore.
- Update instructions in README.md to be working.
- Remove runtests.sh script and mentions of it -- I can't get it to work
and the three steps are easily run by hand.
* Fix patch.object to return a _patch context manager.
This should fix https://github.com/python/typeshed/issues/914
* Prefer None over ... to be consistent with the rest of the file.
* Add socket enum classes from py3.4+
Adds four IntEnum classes in the socket module that mirror the
AF_, AI_, MSG_, and SOCK_ sets of constants.
* Update socket AddressInfo/MsgFlag to use IntFlag type
* IntFlag, AddressInfo, and MsgFlag are py 3.6+
* Simplify and add missing types for copy module.
Error and error were missing. I also removed the internal arg memo.
* Move copy module into 2and3
* Bring back internal kwargs
The latest mypy complained that the signature didn't match that in the
superclass: Serializer.load_payload() has a serializer argument. I
don't know this project but I think it's best to just add that
argument (rather than adding `# type: ignore`).
* Stubs for boto.kms
* Added types for params
* Added return type and fixed signatures(including review changes)
* Removed make_request from stub(https://github.com/python/mypy/issues/1237). Fixed Dict issue.
* Fixed typo
* Let's be precise about return type
* md5.md5(string)
* switch md5 from str to AnyStr, add missing constants
* add missing import
* digest() and hexdigest() never return unicode
* make md5.md5 an alias of, and fix, hashlib_hash
* remove unnecessary import
* fix duplicate block_size
* md5.md5 and md5.new are aliases for hashlib.md5
* Add buffer types to struct module.
I noticed these were missing and I made the version look alike for an easy rename into 2and3.
* Add array to WriteBuffer, add iter_unpack
* Code review comments
None is the default value for these two arguments to logging.Logger._log (which
most other stuff in logging delegates to).
I was getting errors in my codebase because mypy now distinguishes between Any
and Optional[Any].
* Add missing kwargs for create_server and create_datagram_endpoint
Looks like `create_server` and `create_datagram_endpoint` have supported `reuse_port`, `reuse_address`, and `sock` since 3.4.
https://docs.python.org/3.4/library/asyncio-eventloop.htmlee51327a23/Lib/asyncio/events.py
* Fixes to create_server, create_datagram_endpoing
- Add allow sequence for `hosts` in `create_server`
- Add `allow_broadcast` to `create_datagram_endpoint`
- Reorder `sock` in `create_datagram_endpoint`
* Import Sequence
* Sockets are Optionals