Repository navigation
Conversation
|
This probably has the same problems as outlined in #3902, although the primer run will be interesting. |
|
Diff from mypy_primer, showing the effect of this PR on open source code: freqtrade (https://github.com/freqtrade/freqtrade.git)
+ freqtrade/data/history/jsondatahandler.py:34: error: Item "None" of "Optional[str]" has no attribute "replace"
+ freqtrade/data/history/jsondatahandler.py:34: error: List comprehension has incompatible type List[Tuple[Union[str, Any], Optional[str]]]; expected List[Tuple[str, str]]
+ freqtrade/data/history/jsondatahandler.py:50: error: Item "None" of "Optional[str]" has no attribute "replace"
+ freqtrade/data/history/jsondatahandler.py:135: error: Item "None" of "Optional[str]" has no attribute "replace"
+ freqtrade/data/history/hdf5datahandler.py:33: error: Item "None" of "Optional[str]" has no attribute "replace"
+ freqtrade/data/history/hdf5datahandler.py:33: error: List comprehension has incompatible type List[Tuple[Union[str, Any], Optional[str]]]; expected List[Tuple[str, str]]
+ freqtrade/data/history/hdf5datahandler.py:49: error: Item "None" of "Optional[str]" has no attribute "replace"
+ freqtrade/data/history/hdf5datahandler.py:134: error: Item "None" of "Optional[str]" has no attribute "replace"
paroxython (https://github.com/laowantong/paroxython.git)
+ paroxython/flatten_ast.py:506: error: Item "None" of "Optional[Any]" has no attribute "startswith"
+ paroxython/flatten_ast.py:510: error: Item "None" of "Optional[Any]" has no attribute "startswith"
+ paroxython/flatten_ast.py:542: error: Argument 1 to "int" has incompatible type "Optional[Any]"; expected "Union[str, bytes, SupportsInt, SupportsIndex, _SupportsTrunc]"
|
|
Interesting, the primer output is less bad than I'd expect. |
|
#5528 is similar. I think we should make all the grouping methods (at least |
|
+1 to Akuli's point. To the extent that we trust mypy primer, it'll also let us see the damage in a single PR. I also do seem to recall us having made changes along these lines and having to revert them based on Dropbox's experience. |
|
Superseded by #5557. Thank you for the PR, this was quite useful for figuring out the best way forward. |
Closes #5546.