openedx / openedx/edx-lint

Suggestion: warn on use of sys.exit

Open
#86 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.