Look at flake8 B028
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 32
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Flake8 flags some code with the B028 check:
B028: Consider replacing f"'{foo}'" with f"{foo!r}" which is both easier to read and will escape quotes inside foo if that would appear. The check tries to filter out any format specs that are invalid together with !r. If you're using other conversion flags then e.g. f"'{foo!a}'" can be replaced with f"{ascii(foo)!r}". Not currently implemented for python<3.8 or str.format() calls.
Code should be rewritten following that advice or we should make the decision to ignore that warning.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running flake8 with B028 enabled and locating every flagged occurrence in the repository. Review the affected f-strings against the warning text; done means the intended B028 findings are rewritten or an explicit ignore is configured and the lint run is clean.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100