Repository navigation
chore(codestyle): fix black formatting and unused import - #6394
Merged
rsareddy0329 merged 1 commit intoOct 9, 2026
Merged
Conversation
Apply black (26.3.1, line-length 100) to files that were committed unformatted, and remove an unused import, fixing the failing codestyle-doc-tests (black-check + flake8) on sagemaker-core, sagemaker-mlops, and sagemaker-train. - sagemaker-core: reformat workflow/job_config_document.py, workflow/pipeline_capture.py and three workflow unit tests. - sagemaker-mlops: reformat workflow/steps.py and two workflow tests. - sagemaker-train: reformat test_multi_turn_rl_trainer.py and drop the unused unittest.mock.PropertyMock import (flake8 F401). Formatting-only (black preserves the AST); the sole semantic change is the removal of the unused import.
rsareddy0329
temporarily deployed
to
auto-approve
October 7, 2026 23:30 — with
GitHub Actions
Inactive
rsareddy0329
temporarily deployed
to
auto-approve
October 7, 2026 23:30 — with
GitHub Actions
Inactive
rsareddy0329
temporarily deployed
to
auto-approve
October 7, 2026 23:30 — with
GitHub Actions
Inactive
rsareddy0329
temporarily deployed
to
auto-approve
October 8, 2026 00:19 — with
GitHub Actions
Inactive
There was a problem hiding this comment.
🤖 AI code review
This PR applies black formatting to several previously-unformatted .py files across sagemaker-core, sagemaker-mlops, and sagemaker-train, and removes an unused PropertyMock import to fix a flake8 F401 error. The changes are formatting-only (AST-preserving) plus the single unused-import removal, which I confirmed is unused elsewhere in the file. No issues found.
Reviewed commit 2a3cf98. Automated review; verify before acting.
mohamedzeidan2021
approved these changes
Oct 9, 2026
lucasjia-aws
approved these changes
Oct 9, 2026
This branch was previously deployed
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.
Issue
The
codestyle-doc-testsPR check is failing onmasterfor sagemaker-core, sagemaker-mlops, and sagemaker-train (sagemaker-serve passes). The failures were introduced by earlier commits that landed.pyfiles without running black, plus one unused import.Reproduced on latest
masterwith the CI-pinned tools (black==26.3.1,flake8==7.1.2):black-check: 5 files (workflow/job_config_document.py,workflow/pipeline_capture.py, and 3tests/unit/workflow/tests)black-check: 3 files (workflow/steps.py,tests/integ/workflow/test_job_step_mtrl.py,tests/unit/workflow/test_job_step.py)black-check:tests/unit/train/test_multi_turn_rl_trainer.py, andflake8 F401(unusedunittest.mock.PropertyMock) in the same fileThe CI build log confirms
flake8,pylint,docstyle,twineotherwise succeeded; onlyblack-check(and the train F401) failed.Description of changes
black(line-length 100) on the unformatted files in all three packages.PropertyMockimport intest_multi_turn_rl_trainer.py.Formatting-only (black preserves the AST); the sole semantic change is the unused-import removal.
Testing done
With the CI-pinned tools, in each of the three packages:
black --check ./→ 0 files would be reformattedflake8→ rc 0pydocstyle src/sagemaker→ rc 0Merge Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.