-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Refactor: Improve detection of duplicates and list sorting #33675
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
Conversation
| with DAG( | ||
| dag_id=Path(__file__).stem, | ||
| description=__doc__[0 : __doc__.find(".")], | ||
| description=__doc__.partition(".")[0], |
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.
Not totally related but gosh I’m not sure we should encourage this pattern.
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.
It does have an appeal, especially if you consider the D400 rule of pydoc style.
| count_integrations = Counter(r.get("integration-name", "") for r in resource_data) | ||
| for integration, count in count_integrations.items(): | ||
| if count > 1: | ||
| errors.append( | ||
| f"Duplicated content of '{resource_type}/integration-name/{integration}' " | ||
| f"in file: {yaml_file_path}" | ||
| ) |
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.
I wonder if this should just use ["integration-name"] instead of .get(). This would emit a nonsensical message when the key is missing anyway…
uranusjr
left a comment
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.
Logic-related changes mentioned above will be proposed in a separate PR for discussion.
|
Flaky test only - merging. |
(cherry picked from commit 2dbb963)
No description provided.