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

feat: use a slightly more strict type for AnyJson #198

Merged

Conversation

tonyandrewmeyer
Copy link
Collaborator

Adjust AnyJson so that the type of the nested list/dict is also defined.

This should avoid errors like this:

/home/tameyer/code/operator/test/test_testing.py
  /home/tameyer/code/operator/test/test_testing.py:7060:17 - error: Type of "action" is partially unknown
    Type of "action" is "(name: str, params: Mapping[str, str | bool | dict[Unknown, Unknown] | int | float | list[Unknown]] | None = None, id: str | None = None) -> _Event" (reportUnknownMemberType)
1 error, 0 warnings, 0 informations 

@james-garner-canonical
Copy link

Looks good to me

@tonyandrewmeyer tonyandrewmeyer merged commit 12b81bd into canonical:main Sep 19, 2024
2 checks passed
@tonyandrewmeyer tonyandrewmeyer deleted the anyjson-stricter-type branch September 19, 2024 23:54
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.

2 participants