Created
October 1, 2022 06:44
-
-
Save notpushkin/f04466c3010973d8b99f2ce8d148dbaa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wemake_python_styleguide.violations import system, naming, complexity, consistency, best_practices, refactoring, oop | |
REDIR_TEMPLATE = "/{full_code} https://wemake-python-styleguide.readthedocs.io/en/latest/pages/usage/violations/{group_name}.html#{full_group_name}.{name}" | |
violation_groups = { | |
"system": system, | |
"naming": naming, | |
"complexity": complexity, | |
"consistency": consistency, | |
"best_practices": best_practices, | |
"refactoring": refactoring, | |
"oop": oop, | |
} | |
for group_name, group in violation_groups.items(): | |
for name in dir(group): | |
violation = getattr(group, name) | |
if hasattr(violation, "full_code"): | |
print(REDIR_TEMPLATE.format( | |
full_code=violation.full_code, | |
group_name=group_name, | |
full_group_name=group.__name__, | |
name=violation.__name__, | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment