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

Format Python code with ruff #2166

Merged
merged 3 commits into from
Jan 17, 2025
Merged

Format Python code with ruff #2166

merged 3 commits into from
Jan 17, 2025

Conversation

pietern
Copy link
Contributor

@pietern pietern commented Jan 16, 2025

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.

.github/workflows/push.yml Outdated Show resolved Hide resolved
@pietern pietern temporarily deployed to test-trigger-is January 16, 2025 15:59 — with GitHub Actions Inactive
@pietern pietern requested a review from denik January 16, 2025 15:59
@@ -0,0 +1,2 @@
[format]
exclude = ["*.ipynb"]
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@pietern pietern added this pull request to the merge queue Jan 17, 2025
Merged via the queue into main with commit 2cd0d88 Jan 17, 2025
9 checks passed
@pietern pietern deleted the ruff branch January 17, 2025 07:43
pietern added a commit to databricks/bundle-examples that referenced this pull request Jan 17, 2025
Same as databricks/cli#2166.

This excludes materialized templates because we cannot control their
formatting in this repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants