Skip to content
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

dev: enable ruff rule #12749

Merged
merged 3 commits into from
Feb 28, 2025
Merged

dev: enable ruff rule #12749

merged 3 commits into from
Feb 28, 2025

Conversation

anshbansal
Copy link
Collaborator

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Feb 28, 2025
Copy link
Contributor

@sgomezvillamor sgomezvillamor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good

Just concern on:

  • why some fixes have been applied for rules that we are ignoring, as per my understanding
  • default args becoming Optional

@@ -205,8 +205,9 @@ def lookml_model_explore(self, model: str, explore_name: str) -> LookmlModelExpl
def folder_ancestors(
self,
folder_id: str,
fields: Union[str, List[str]] = ["id", "name", "parent_id"],
fields: Optional[Union[str, List[str]]] = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While in practice this is not a breaking change, I prefer to keep the default value in the signature than inside the implementation. Because knowing the default value is relevant for the caller.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mutable args can lead to bugs https://docs.python-guide.org/writing/gotchas/ This is a well documented problem.

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Feb 28, 2025
@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Feb 28, 2025
@anshbansal anshbansal merged commit 9c3bd34 into master Feb 28, 2025
122 of 128 checks passed
@anshbansal anshbansal deleted the ab-2025-feb-28-enable-ruff-rule branch February 28, 2025 12:19
shirshanka pushed a commit to shirshanka/datahub that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata pending-submitter-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants