MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / IsErrorSuppressedByNolint

Function IsErrorSuppressedByNolint

rtpose_wrapper/scripts/cpp_lint.py:500–513  ·  view source on GitHub ↗

Returns true if the specified error category is suppressed on this line. Consults the global error_suppressions map populated by ParseNolintSuppressions/ResetNolintSuppressions. Args: category: str, the category of the error. linenum: int, the current line number. Returns: bool

(category, linenum)

Source from the content-addressed store, hash-verified

498
499
500def IsErrorSuppressedByNolint(category, linenum):
501 """Returns true if the specified error category is suppressed on this line.
502
503 Consults the global error_suppressions map populated by
504 ParseNolintSuppressions/ResetNolintSuppressions.
505
506 Args:
507 category: str, the category of the error.
508 linenum: int, the current line number.
509 Returns:
510 bool, True iff the error should be suppressed due to a NOLINT comment.
511 """
512 return (linenum in _error_suppressions.get(category, set()) or
513 linenum in _error_suppressions.get(None, set()))
514
515def Match(pattern, s):
516 """Matches the string with the pattern, caching the compiled regexp."""

Callers 1

_ShouldPrintErrorFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected