python-trio / python-trio/flake8-async
helpful error message if parser crashes (e.g. due to syntax changes from future python version)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 26
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Trying to run the linter on py<3.11 on code using except* crashes noisily with a SyntaxError. While fairly easy to figure out what went wrong we could wrap ast.parse in a try: except SyntaxError and print a somewhat more helpful message, and continue analyzing the other files.
And ofc if a file straight up has syntax errors.
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
Locate the linter's ast.parse call and read how file-processing errors are handled. Make syntax errors produce a helpful message and allow analysis to continue for other files, then verify the behavior with code using except* and with a file containing ordinary syntax errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100