Skip to content

BF: don't sys.exit if argparse finds unknown args#6118

Merged
peircej merged 1 commit intopsychopy:devfrom
peircej:bf-no-crash-if-unexpected-script-args
Dec 20, 2023
Merged

BF: don't sys.exit if argparse finds unknown args#6118
peircej merged 1 commit intopsychopy:devfrom
peircej:bf-no-crash-if-unexpected-script-args

Conversation

@peircej
Copy link
Member

@peircej peircej commented Dec 20, 2023

argparse.parse_args() does a sys_exit if it finds unknown args, even if exit_on_error=False which is too agressive for our needs

Instead, use parse_known_args and then select the known args set

argparse.parse_args() does a sys_exit if it finds unknown args, even if
`exit_on_error=False` which is too agressive for our needs

Instead, use parse_known_args and then select the known args set
@codecov
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Merging #6118 (8b9481a) into dev (e4b5242) will increase coverage by 1.58%.
Report is 58 commits behind head on dev.
The diff coverage is 67.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6118      +/-   ##
==========================================
+ Coverage   50.59%   52.18%   +1.58%     
==========================================
  Files         333      334       +1     
  Lines       61289    61460     +171     
==========================================
+ Hits        31009    32072    +1063     
+ Misses      30280    29388     -892     
Components Coverage Δ
app ∅ <ø> (∅)
boilerplate ∅ <ø> (∅)
library ∅ <ø> (∅)
vm-safe library ∅ <ø> (∅)

@peircej peircej merged commit 3dc7908 into psychopy:dev Dec 20, 2023
@peircej peircej deleted the bf-no-crash-if-unexpected-script-args branch April 29, 2024 10:21
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