-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
dev: enable ruff rule #12749
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
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.
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
metadata-ingestion/src/datahub/ingestion/glossary/classification_mixin.py
Show resolved
Hide resolved
@@ -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, |
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.
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.
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.
mutable args can lead to bugs https://docs.python-guide.org/writing/gotchas/ This is a well documented problem.
Checklist