-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: Move to ruff for CI #109
base: devel
Are you sure you want to change the base?
Conversation
gmuloc
commented
Oct 1, 2024
- drop Python 3.8 support
- Move to ruff to lint
- Refactor functions to use pathlib.Path in several places
lint_warnings | ||
a dictionary containing pairs of type {filename: list of warnings} | ||
verbose | ||
When True, output a string when no error nor warning was passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When True, output a string when no error nor warning was passed. | |
When True, output a string if neither an error nor a warning was passed. |
Returns | ||
------- | ||
tuple[int, int] | ||
A two tuple containing the total number of errors and the total number of warnings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A two tuple containing the total number of errors and the total number of warnings. | |
A tuple containing the total number of errors and the total number of warnings. |
CONSOLE.rule(f"[bold red]JINJA2 LINT {issue_type}") | ||
for key, issues in lint_issues.items(): | ||
if not issues: | ||
continue | ||
tree = Tree(f"{key}") | ||
|
||
for j2_issue in issues: | ||
tree.add(j2_issue.to_rich(verbose)) | ||
tree.add(j2_issue.to_rich(verbose=verbose)) | ||
CONSOLE.print(tree) | ||
|
||
total_lint_errors = sum(len(issues) for _, issues in lint_errors.items()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
total_lint_errors = sum(len(issues) for _, issues in lint_errors.items()) | |
total_lint_errors = sum(len(issues) for issues in lint_errors.values()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for warnings, not able to add comment on the line below
Quality Gate passedIssues Measures |