PEP 484 specifies towards the end of the section on type comments the following:
In some cases, linting tools or other comments may be needed on the same line as a type comment. In these cases, the type comment should be before other comments and linting markers:
# type: ignore # ~comment or other marker~
So, as Ryan Tam suggested,
# type: ignore # noqa is the correct way to ignore both.
- Pylint, PyChecker or PyFlakes? [closed]
- How can I specify the function type in my type hints?
- How can mypy ignore a single line in a source file?
- How do I get Pyflakes to ignore a statement?
- How to annotate function that takes a tuple of variable length? (variadic tuple type annotation)
- What is the difference between TypeVar and NewType?
- mypy, type hint: Union[float, int] -> is there a Number type?
- Python type hints and context managers
- Type annotation for classmethod returning instance
- Proper type annotation of Python functions with yield
- Specify length of Sequence or List with Python typing module
- Python equivalent of Typescript interface
- How to use reveal_type in mypy
- Specifying a type to be a List of numbers (ints and/or floats)?
- How to use type hints in python 3.6?
- Python >=3.5: Checking type annotation at runtime
- How to ignore Pyflakes errors ‘imported but unused’ in ‘__init__.py’ files?
- How do I correctly add type-hints to Mixin classes?
- How do I specify OrderedDict K,V types for Mypy type annotation?
- Why does mypy think library imports are missing?
- How can I get stub files for `matplotlib`, `numpy`, `scipy`, `pandas`, etc.?
- error: Skipping analyzing ‘flask_mysqldb’: found module but no type hints or library stubs
- What are the main differences of NamedTuple and TypedDict in Python / mypy
- Python typing what does TypeVar(A, B, covariant=True) mean?
- Python 3.10+: Optional[Type] or Type | None
- Can I omit Optional if I set default to None?
- Using the class’s own type inside class definition [duplicate]
- What’s the difference between reshape and view in pytorch?
- Windows Scipy Install: No Lapack/Blas Resources Found
- How do I set browser width and height in Selenium WebDriver?
- NLTK python error: “TypeError: ‘dict_keys’ object is not subscriptable”
- Python spacing and aligning strings
- Display Python datetime without time
- ResourceWarning unclosed socket in Python 3 Unit Test
- How to convert Year and Day of Year to Date?
- Why can’t I join this tuple in Python?
- psycopg: Python.h: No such file or directory
- Convert pyQt UI to python
- Plot CDF + cumulative histogram using Seaborn
- How to hide Firefox window (Selenium WebDriver)?
- How do I import variable packages in Python like using variable variables ($$) in PHP?
- Print command line arguments with argparse?
- Python re.sub(): how to substitute all ‘u’ or ‘U’s with ‘you’
- crop center portion of a numpy image
- Import class from module dynamically
- Split text lines in scanned document
- Time complexity of string slice
- How can I get tweets older than a week (using tweepy or other python libraries)
- install filter on logging level in python using dictConfig
- Best practices for persistent database connections in Python when using Flask