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

Add case (in)senstive option to registry #1147

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

jthielen
Copy link
Contributor

Implements the case sensitive registry option discussed in #1145

@hgrecco
Copy link
Owner

hgrecco commented Aug 17, 2020

This looks good. Just one question. Why you decided to put the

case_sensitive = (
            self.case_sensitive if case_sensitive is None else case_sensitive
        )

in parse_unit_name and not in _parse_unit_name?

@jthielen
Copy link
Contributor Author

Why you decided to put the ... in parse_unit_name and not in _parse_unit_name?

I believe that was because I started with it at the highest level (in each public function with the case_sensitive kwarg), and then realized that they all ended up being routed through parse_unit_name, so that was the only one needed. Indeed, I can move it to _parse_unit_name just as well. Let me know if you'd want me to move it there or not.

@hgrecco
Copy link
Owner

hgrecco commented Aug 17, 2020

I think it makes sense to put it in _parse_unit_name so that any future method that uses internal functions can rely on that and avoid code duplication.

@jthielen jthielen force-pushed the case-sensitive-registry-option branch from 1161c8b to a7b56b9 Compare August 17, 2020 15:42
@jthielen
Copy link
Contributor Author

I think it makes sense to put it in _parse_unit_name so that any future method that uses internal functions can rely on that and avoid code duplication.

Sounds good, the change has been made. Thanks!

@hgrecco
Copy link
Owner

hgrecco commented Aug 17, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 17, 2020

Build succeeded:

@bors bors bot merged commit cd2c841 into hgrecco:master Aug 17, 2020
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.

Add case (in)senstive option to registry and extend to Unit and Quantity parsing
2 participants