-
Notifications
You must be signed in to change notification settings - Fork 71
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
Format Python code with ruff #2166
Conversation
@@ -0,0 +1,2 @@ | |||
[format] | |||
exclude = ["*.ipynb"] |
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.
Let's not do this? .ipynb
files are a part of the built-in templates and should be formatted.
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.
This exclude is scoped to the testdata folder. The testdata includes malformed files and ruff fails on those.
Same as databricks/cli#2166. This excludes materialized templates because we cannot control their formatting in this repo.
Changes
The materialized templates included in #2146 include Python code that we require to be formatted. Instead of running ruff as part of the testcase, we can enforce that all Python code in the repository is formatted. It won't be possible to have a passing acceptance test for template initialization with unformatted code.