-
Notifications
You must be signed in to change notification settings - Fork 1.3k
More flexible method infer_provider #1945
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
Conversation
@hovi Thanks! The change looks reasonable, but I don't love that we're not using At minimum, I think we need a new test to make sure we don't accidentally refactor this infer + kwarg behavior away. I'm also curious how your custom factory method is going to make sure it's only called with valid combinations. You mention |
Thanks for reply and taking time read my PR! @DouweM The just adding To answer your question. My use-case is running gherkin scenarios using If you agree with adding this new function, I will modify the PR and remove the kwargs bit. I will create another PR or issue if I come up with a nice strongly typed builder that could work well in the library. |
@hovi What do you think about giving |
@DouweM I personally prefer more smaller functions doing one thing rather than adding extra functionality to existing function. |
@hovi I'm OK with |
Okay @DouweM renamed the method and added the test. |
@hovi Thank you! |
I want to make my own factory method where I create providers based on provider name and other parameters (like
base_url
).I found out, that logic that does it in the library is creating providers with default constructor without possibility to pass anything to it.
PR suggests 2 changes. Either change is enough to add the required flexibility:
infer_provider
that are passed to constructor call