Skip to content

Conversation

kmvanbrunt
Copy link
Member

Fixes #983

  • Bug Fixes
    • Fixed RecursionError when printing an argparse.Namespace caused by custom attribute cmd2 was adding
  • Enhancements
    • Added get_statement() function to argparse.Namespace which returns __statement__ attribute

@codecov
Copy link

codecov bot commented Aug 25, 2020

Codecov Report

Merging #984 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #984   +/-   ##
=======================================
  Coverage   97.83%   97.83%           
=======================================
  Files          22       22           
  Lines        4522     4523    +1     
=======================================
+ Hits         4424     4425    +1     
  Misses         98       98           
Impacted Files Coverage Δ
cmd2/cmd2.py 97.21% <100.00%> (+<0.01%) ⬆️
cmd2/constants.py 100.00% <100.00%> (ø)
cmd2/decorators.py 97.19% <100.00%> (-0.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a540cfc...9b5a988. Read the comment docs.

…stom attribute cmd2 was adding

Added get_statement() function to argparse.Namespace which returns __statement__ attribute
Copy link
Contributor

@anselor anselor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish there was more clarity as to why repr was failing here.

@kmvanbrunt kmvanbrunt merged commit ae7e67c into master Aug 25, 2020
@kmvanbrunt kmvanbrunt deleted the recursion_error branch August 25, 2020 15:25
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.

RecursionError when printing argparse Namespace
3 participants