SG-43835 Fix black pre-commit/CI discrepancy by removing exclude#1111
Draft
stevelittlefish wants to merge 3 commits into
Draft
SG-43835 Fix black pre-commit/CI discrepancy by removing exclude#1111stevelittlefish wants to merge 3 commits into
stevelittlefish wants to merge 3 commits into
Conversation
Remove the `exclude: "tests|python/tank"` override from the black hook in `.pre-commit-config.yaml` so that local pre-commit runs black on the same set of files as the CI pipeline. Apply black formatting to the previously-excluded files to bring them into compliance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1111 +/- ##
==========================================
- Coverage 79.45% 79.45% -0.01%
==========================================
Files 206 206
Lines 21007 21013 +6
==========================================
+ Hits 16692 16696 +4
- Misses 4315 4317 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Re-run black at the correct pinned version (26.5.1) to catch files missed by the initial formatting pass which used an older version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Hound runs its own black version which differs from the one pinned in .pre-commit-config.yaml, causing spurious review comments. Black formatting is already enforced by the CI pipeline via pre-commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| # location: | ||
| # name: tk-core | ||
| # type: app_store | ||
| # type: app_store |
| # common.apps.tk-multi-shotgunpanel: | ||
| # location: | ||
| # type: app_store | ||
| # type: app_store |
| # | ||
| # common.engines.tk-maya.location: | ||
| # type: app_store | ||
| # type: app_store |
| "userLogin": "john", | ||
| }, | ||
| } | ||
| self.httpd.router["[PUT]/internal_api/app_session_request/a1b2c3"] = ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exclude: "tests|python/tank"from the black hook in.pre-commit-config.yamlso local pre-commit and CI run black on the same set of filestests/andpython/tank/to bring them into complianceRoot cause
The CI pipeline (via
tk-ci-tools) runs black with no exclusions, while the local pre-commit config excludedtests/andpython/tank/. This caused pre-commit to pass locally on unformatted files in those directories, only for CI to fail.Test plan
pre-commit run --allpasses locally