Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_all_codes(cls):
return [
(error.code, error.short_desc)
for group in ErrorRegistry.groups
for error in group.errors
]
def extract_flake8_docstrings() -> Dict[str, str]:
from pydocstyle.violations import ErrorRegistry
codes = dict()
for group in ErrorRegistry.groups:
for error in group.errors:
codes[error.code] = error.short_desc
return codes