Ignoring module name violations

This commit is contained in:
Lukas Horst 2024-10-24 20:59:45 +02:00
parent f8422f33fb
commit f5b7931dc9
2 changed files with 8 additions and 2 deletions

View file

@ -215,6 +215,8 @@ def remove_unnecessary_violations(style_check: str):
if line_length <= 99:
skip_count = 2
continue
else:
line = line.replace('79', '99')
# Upper case violations
elif "C0103" in line and "doesn't conform to UPPER_CASE naming style" in line:
continue
@ -226,6 +228,9 @@ def remove_unnecessary_violations(style_check: str):
argument_name = line[start_index:end_index]
if len(argument_name) == 1:
continue
# Allowing all module names
elif "C0103" in line and "Module name" in line:
continue
filtered_lines.append(line)
return "\n".join(filtered_lines)