Suggestion: warn on use of sys.exit
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 52
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
sys.exit is probably wrong in most places in edx code. It's almost always better to just raise an exception. In particular, in management commands, you should raise a CommandError so that callers using the command via call_command don't have the process shut down underneath them.
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 reviewing the repository’s existing pylint checks and tooling entry points to see how a warning for sys.exit would fit. Define how management-command uses should be handled, then verify that the linter flags inappropriate calls without shutting down callers using call_command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100