Skip to content

Conversation

@asross
Copy link

@asross asross commented May 19, 2022

I was hoping to use this library for a project, but it didn't fully support some of the features I needed (delegation with prefixes and multiple calls). I generalized it to handle these cases, let me know if this is a welcome contribution :)

Copy link
Owner

@dscottboggs dscottboggs left a comment

Choose a reason for hiding this comment

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

I should've thought to enable stacking, smart idea, and thanks for making a PR for it. Just one change requested and a couple questions.


_prefix = named_args.get('prefix', '')

print(_dest, _prefix)
Copy link
Owner

Choose a reason for hiding this comment

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

This print call should be removed

"""Wrap the target class up in something that modifies."""
class Wrapped(cls):

_delegates = [(a, _dest, _prefix) for a in args] + getattr(cls, '_delegates', [])
Copy link
Owner

Choose a reason for hiding this comment

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

clever

Comment on lines -40 to -41
def __init__(self, *wrapped_args, **wrapped_opts):
super().__init__(*wrapped_args, **wrapped_opts)
Copy link
Owner

Choose a reason for hiding this comment

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

Why is this not necessary?

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.

2 participants