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

QuanityWidget and QuantityField don't share signature #103

Open
mmarras opened this issue Aug 23, 2024 · 2 comments
Open

QuanityWidget and QuantityField don't share signature #103

mmarras opened this issue Aug 23, 2024 · 2 comments

Comments

@mmarras
Copy link
Contributor

mmarras commented Aug 23, 2024

Pseudocode

class QuantityWidget(QuantityFormField)
    def __init__(base_units=, allowed_types=)

whereas:

class QuantityField
    def __init__(base_units=, unit_choices=)

semantically allowed_types and unit_choices are the same thing but are referenced with different names, if I am not mistaken. A streamlined signature would be easier to work with.

@mmarras mmarras changed the title QuanityWidget and QuantityField are don't share signature QuanityWidget and QuantityField don't share signature Aug 23, 2024
@CarliJoy
Copy link
Owner

PR welcome :-)

Probably it would be nice to allow the old parameter and add a deprecation warning.

@mmarras
Copy link
Contributor Author

mmarras commented Aug 26, 2024

Agree on the depreciation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants