Add --warn-redundant-casts to mypy checks (#24304)

* add mypy checks for redundant-casts and unused-ignores

* revert unnecessary changes

* ignore

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
pull/24287/head
Dylan Herman 3 years ago committed by GitHub
parent e834b4d9be
commit ee0021b86c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .pre-commit-config.yaml
  2. 2
      selfdrive/hardware/tici/agnos.py

@ -23,6 +23,7 @@ repos:
additional_dependencies: ['git+https://github.com/numpy/numpy-stubs', 'types-requests', 'types-atomicwrites',
'types-pycurl']
args:
- --warn-redundant-casts
- --warn-unreachable
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1

@ -16,7 +16,7 @@ class StreamingDecompressor:
def __init__(self, url: str) -> None:
self.buf = b""
self.req = requests.get(url, stream=True, headers={'Accept-Encoding': None})
self.req = requests.get(url, stream=True, headers={'Accept-Encoding': None}) # type: ignore
self.it = self.req.iter_content(chunk_size=1024 * 1024)
self.decompressor = lzma.LZMADecompressor(format=lzma.FORMAT_AUTO)
self.eof = False

Loading…
Cancel
Save