Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate subparser #471

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

mferrera
Copy link
Contributor

@mferrera mferrera commented Dec 4, 2023

In Python 3.11 adding the same subparser twice will raise an exception.

Traceback (most recent call last):
  File "/../res2df/bin/res2csv", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/../res2df/res2df/res2csv.py", line 311, in main
    parser = get_parser()
             ^^^^^^^^^^^^
  File "/../res2df/res2df/res2csv.py", line 179, in get_parser
    subparsers_dict["fipreports"] = subparsers.add_parser(
                                    ^^^^^^^^^^^^^^^^^^^^^^
  File "/../lib/python3.11/argparse.py", line 1192, in add_parser
    raise ArgumentError(self, _('conflicting subparser: %s') % name)
argparse.ArgumentError: argument subcommand: conflicting subparser: fipreports

@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bb7a6db) 95.18% compared to head (05092f2) 95.17%.

❗ Current head 05092f2 differs from pull request most recent head 467d316. Consider uploading reports for the commit 467d316 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #471      +/-   ##
==========================================
- Coverage   95.18%   95.17%   -0.01%     
==========================================
  Files          33       33              
  Lines        4461     4460       -1     
==========================================
- Hits         4246     4245       -1     
  Misses        215      215              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

In Python 3.11 adding the same subparser twice will raise an exception.
@mferrera mferrera merged commit 9b4a4c2 into equinor:master Jan 17, 2024
7 checks passed
@mferrera mferrera deleted the fix-subparser branch January 17, 2024 13:34
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.

3 participants