Fix starboard embed SyntaxError and tighten flake8 linting#23
Open
youngcoder45 wants to merge 2 commits intomainfrom
Open
Fix starboard embed SyntaxError and tighten flake8 linting#23youngcoder45 wants to merge 2 commits intomainfrom
youngcoder45 wants to merge 2 commits intomainfrom
Conversation
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.
This PR fixes a flake8-blocking
SyntaxErrorin the Starboard embed formatter and adds a repository-level flake8 configuration so linting focuses on project code (and doesn’t scan the local virtualenv).What Changed
E999 SyntaxError: f-string expression part cannot include a backslashby moving the newline replacement out of the f-string expression.F824by removing an incorrectglobal _question_pooldeclaration (the pool is mutated but never reassigned)..flake8to exclude.venv,__pycache__, and build artifacts.F541) and unused locals (F841) without changing behavior (e.g., unused timers, unused exception variables).Why
content.replace('\n', ...)directly inside the f-string expression, andglobaldeclaration inutils/codingquestions.py..venvand report third-party lint issues.Testing
python -m flake8 . --select=E999,F824,F541,F841(passes)python -m flake8 .will still report existing style warnings (mostlyE501/whitespace) incogs/starboard.pythat are out of scope for this PR.Notes for Reviewers
.flake8only changes what gets linted; it doesn’t change runtime behavior.