We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0991bc3 commit ec36fe4Copy full SHA for ec36fe4
docs/source/common_issues.rst
@@ -472,3 +472,25 @@ Here's the above example modified to use ``MYPY``:
472
473
def listify(arg: 'bar.BarClass') -> 'List[bar.BarClass]':
474
return [arg]
475
+
476
477
+Silencing Linters
478
+-----------------
479
480
+In some cases, linters will complain about unused imports or code. In
481
+these cases, you can silence them with a comment after type comments, or on
482
+the same line as the import:
483
484
+.. code-block:: python
485
486
+ # to silence complaints about unused imports
487
+ from typing import List # noqa
488
+ a = None # type: List[int]
489
490
491
+To silence the linter on the same line as a type comment
492
+put the linter comment *after* the type comment:
493
494
495
496
+ a = some_complex_thing() # type: ignore # noqa
0 commit comments