-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Better support for custom methods for modules #2383
Better support for custom methods for modules #2383
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 I just took a quick look on my phone so feel free to take or leave the comments if they don’t make sense!
- even though the Method isn’t public exactly, I know people are using it as such, so at least for the backport PR, we should make sure we’re not breaking anything. It looked the the signature for Method had changed some
- We should make sure we can still pass mungers=None in at least one test just to guard against it breaking in the future
There might be a more elegant way around this if we want this functionality for Any ideas there? |
e8828e5
to
a3d52f5
Compare
Nope, I think that API makes sense. A v6 only feature sounds good to me! |
* Refactor logic for attaching a `Method` class as a property rather than a method. Instead of implicitly setting `mungers=None`, explicitly set the `is_property` flag on `Method` to `True`. This also facilitates attaching new methods and properties to modules. * Fix up some tests in test_method.py that were falsely passing to actually test correctly. Add tests for new `is_property` flag for the `Method` class. * Create `test_module.py` and add tests for `attach_methods()`
a3d52f5
to
e6f306c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is looking good! I mostly had clarifying comments and nits.
10397ac
to
6dbd26e
Compare
6dbd26e
to
cb6b4a0
Compare
@kclowes suggested changes and some more robust testing / validation added in the latest commit. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚢
What was wrong?
Method
class to allow for extensibility #1755, [WIP] Document Method #1797How was it fixed?
module
a little easier. This should be easier to document as well although the documentation in [WIP] Document Method #1797 is still relevant and would work. Good documentation is still needed for these updates, perhaps in a separate PR.Todo:
Cute Animal Picture