mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[lint] upgrade mypy to latest version
Fixes https://github.com/pytorch/pytorch/issues/75927. Had to fix some bugs and add some ignores. To check if clean: ``` lintrunner --paths-cmd='git grep -Il .' --take MYPY,MYPYSTRICT ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/76753 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
8473173c36
commit
fb0f285638
6
.github/scripts/lint_native_functions.py
vendored
6
.github/scripts/lint_native_functions.py
vendored
@ -27,9 +27,9 @@ with open(Path(__file__).parent.parent.parent / fn('.'), "r") as f:
|
||||
contents = f.read()
|
||||
|
||||
yaml = ruamel.yaml.YAML() # type: ignore[attr-defined]
|
||||
yaml.preserve_quotes = True
|
||||
yaml.width = 1000
|
||||
yaml.boolean_representation = ['False', 'True']
|
||||
yaml.preserve_quotes = True # type: ignore[assignment]
|
||||
yaml.width = 1000 # type: ignore[assignment]
|
||||
yaml.boolean_representation = ['False', 'True'] # type: ignore[attr-defined]
|
||||
r = yaml.load(contents)
|
||||
|
||||
# Cuz ruamel's author intentionally didn't include conversion to string
|
||||
|
Reference in New Issue
Block a user