Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def fetch_checks(cfg):
base = [
checks.CheckValidity(cfg),
checks.CheckTrailingWhitespace(cfg),
checks.CheckIndentationNoTab(cfg),
checks.CheckCarriageReturn(cfg),
checks.CheckMaxLineLength(cfg),
checks.CheckNewlineEndOfFile(cfg),
]
mgr = extension.ExtensionManager(
namespace="doc8.extension.check", invoke_on_load=True, invoke_args=(cfg.copy(),)
)
addons = []
for e in mgr:
addons.append(e.obj)
return base + addons
def __init__(self, cfg):
super(CheckMaxLineLength, self).__init__(cfg)
self._max_line_length = self._cfg["max_line_length"]
self._allow_long_titles = self._cfg["allow_long_titles"]