Skip to content

with_argparser always provides provider_self even when None #1176

@bambu

Description

@bambu

Seems like regardless of the state of provider_self cmd2 will always supply it. I was expecting it to pass the cmd2_app when the var is None as was done back in the version i am upgrading from (1.1.0).

https://github.com/python-cmd2/cmd2/blob/2.3.1/cmd2/decorators.py#L354

Would expect for the linked line to be either

namespace = ns_provider(provider_self if provider_self is not None else cmd2_app)

or

namespace = ns_provider(provider_self or cmd2_app)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions