Specifications
- Client Version: 1.35
- python version 3.10.8
- mypy version 0.991
Code sample to reproduce problem
Code example from README.rst
class BatchingCallback(object):
def success(self, conf: (str, str, str), data: str):
print(f"Written batch: {conf}, data: {data}")
Expected behavior
Code from Readme can be copy-pasted into source file and not generate syntax errors from either python nor mypy.
Actual behavior
Running mypy gives error:
example.py: note: In member "success" of class "BatchingCallback":
example.py:75:27: error: Syntax error in type annotation [syntax]
example.py:75:27: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn)
Additional info
Using the suggestion from mypy error message should be sufficent.
(Would be great if tuple alias could be used instead of typing.Tuple to save on import verbosity, but that requires 3.9+, this library is currently targeting 3.7+.)
Specifications
Code sample to reproduce problem
Code example from README.rst
Expected behavior
Code from Readme can be copy-pasted into source file and not generate syntax errors from either python nor mypy.
Actual behavior
Running mypy gives error:
Additional info
Using the suggestion from mypy error message should be sufficent.
(Would be great if
tuplealias could be used instead oftyping.Tupleto save on import verbosity, but that requires 3.9+, this library is currently targeting 3.7+.)