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

Args kwargs #9

Merged
merged 5 commits into from
Nov 7, 2024
Merged

Args kwargs #9

merged 5 commits into from
Nov 7, 2024

Conversation

mustafaquraish
Copy link
Collaborator

No description provided.

Instead of always checking if the actual output is _exactly_ the
same as the expected output, this change allows you to now specify
certain _types_ of things you are looking for. For instance, if
you expect a dictionary with a specific key-value foo:bar, but don't
care about any of the other elements in the dictionary, you can do:

expected: {"foo":"bar"}

which will ignore the existence of any other keys.
This now behaves a little similar to Python. All initial arguments
(unlabelled / where the label matches the param in order) are considered
positional argument. If all positional arguments are specified in order,
the default arguments can now be specified out-of-order.

Importantly, this makes it so that if you have multiple default
arguments, you can now specify only the value for later ones instead of
always having to specify all previous ones.
@mustafaquraish mustafaquraish merged commit 5936746 into master Nov 7, 2024
3 checks passed
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.

1 participant