Skip to content

Allow CLI script arguments - #4

Open
valentinstn wants to merge 1 commit into
mainfrom
feat/cli-args
Open

Allow CLI script arguments#4
valentinstn wants to merge 1 commit into
mainfrom
feat/cli-args

Conversation

@valentinstn

Copy link
Copy Markdown
Owner

Summary

  • Changes the argument check from != 2 to < 2 so extra arguments are passed through to the profiled script
  • python -m whyslow script.py arg1 arg2 now works — cProfile already receives and forwards them correctly

Test plan

  • python -m whyslow examples/script.py still works
  • python -m whyslow script.py somearg passes somearg to the script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant