Revert repo-wide formatter changes outside the article folder - #803
Merged
stephengruppetta merged 1 commit intoAug 11, 2026
Conversation
A repo-wide `ruff format` run reformatted 14 files belonging to 13
unrelated tutorials. Because pyproject.toml sets target-version = "py314",
ruff applied PEP 758 and stripped the parentheses from multi-exception
except clauses in 9 published sample files:
except (ZeroDivisionError, ValueError): -> except ZeroDivisionError, ValueError:
That syntax is valid on Python 3.14 but a SyntaxError on 3.13 and earlier,
so those materials would stop running for most readers - and the CI matrix
is Python 3.14 only, so it stays green either way.
Reverts all 14 files to master. No changes to cursor-vs-copilot-python/.
stephengruppetta
merged commit Aug 11, 2026
9f19502
into
realpython:cursor-vs-copilot-python
1 check passed
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.
Hi @brianMutea — this targets your
cursor-vs-copilot-pythonbranch (PR #802), notmaster. Merging it here cleans up #802 in place; none of your own work is touched.What happened
A repo-wide
ruff formatrun picked up 14 files belonging to 13 unrelated tutorials. Easy to hit — the README does say to run the formatter, it just needs scoping to your own folder.Why it matters
pyproject.tomlsetstarget-version = "py314", so ruff applied PEP 758 and stripped the parentheses from multi-exceptionexceptclauses in 9 published sample files:That's valid on Python 3.14 but a
SyntaxErroron 3.13 and earlier — verified on 3.11, 3.12 and 3.13. Those files are downloadable materials for live tutorials, so they'd stop running for most readers.python-multiple-exceptionsis the sharpest case: its samples would no longer match what the article teaches.The CI matrix is Python 3.14 only, so this stays green either way — worth a separate look by the team.
This PR
Reverts all 14 files to
master. After merging, PR #802 touches exactly 30 files, all undercursor-vs-copilot-python/.Verified: all 9 reverted files parse cleanly on Python 3.11.
🤖 Prepared by RPBot on behalf of @stephengruppetta