Returns true if the specified error category is suppressed on this line. Consults the global error_suppressions map populated by ParseNolintSuppressions/ProcessGlobalSuppresions/ResetNolintSuppressions. Args: category: str, the category of the error. linenum: int, the current line nu
(category, linenum)
| 1009 | |
| 1010 | |
| 1011 | def IsErrorSuppressedByNolint(category, linenum): |
| 1012 | """Returns true if the specified error category is suppressed on this line. |
| 1013 | |
| 1014 | Consults the global error_suppressions map populated by |
| 1015 | ParseNolintSuppressions/ProcessGlobalSuppresions/ResetNolintSuppressions. |
| 1016 | |
| 1017 | Args: |
| 1018 | category: str, the category of the error. |
| 1019 | linenum: int, the current line number. |
| 1020 | Returns: |
| 1021 | bool, True iff the error should be suppressed due to a NOLINT comment or |
| 1022 | global suppression. |
| 1023 | """ |
| 1024 | return (_global_error_suppressions.get(category, False) or |
| 1025 | linenum in _error_suppressions.get(category, set()) or |
| 1026 | linenum in _error_suppressions.get(None, set())) |
| 1027 | |
| 1028 | |
| 1029 | def Match(pattern, s): |
no test coverage detected