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)
| 1024 | |
| 1025 | |
| 1026 | def IsErrorSuppressedByNolint(category, linenum): |
| 1027 | """Returns true if the specified error category is suppressed on this line. |
| 1028 | |
| 1029 | Consults the global error_suppressions map populated by |
| 1030 | ParseNolintSuppressions/ProcessGlobalSuppresions/ResetNolintSuppressions. |
| 1031 | |
| 1032 | Args: |
| 1033 | category: str, the category of the error. |
| 1034 | linenum: int, the current line number. |
| 1035 | Returns: |
| 1036 | bool, True iff the error should be suppressed due to a NOLINT comment or |
| 1037 | global suppression. |
| 1038 | """ |
| 1039 | return (_global_error_suppressions.get(category, False) or |
| 1040 | linenum in _error_suppressions.get(category, set()) or |
| 1041 | linenum in _error_suppressions.get(None, set())) |
| 1042 | |
| 1043 | |
| 1044 | def Match(pattern, s): |
no test coverage detected