-
Notifications
You must be signed in to change notification settings - Fork 126
test: Extend the type checking of the ops-scenario tests #2234
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
base: main
Are you sure you want to change the base?
Changes from all commits
9a4bab3
0f3eb00
14b2923
34adbbd
8350e8d
0a8c1d5
63c039a
58e19b0
d82d82a
eceb259
49893fc
86ff536
eab3f63
5f62371
c43500e
f45fcb8
c070335
b95c0c7
439d996
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,7 +60,7 @@ def trigger( | |
| return state_out | ||
|
|
||
|
|
||
| def jsonpatch_delta(self, other: State): | ||
| def jsonpatch_delta(self: State, other: State) -> list[dict[str, Any]]: | ||
| dict_other = dataclasses.asdict(other) | ||
| dict_self = dataclasses.asdict(self) | ||
| for attr in ( | ||
|
|
@@ -79,5 +79,8 @@ def jsonpatch_delta(self, other: State): | |
| return sort_patch(patch) | ||
|
|
||
|
|
||
| def sort_patch(patch: list[dict], key=lambda obj: obj['path'] + obj['op']): | ||
| def sort_patch( | ||
| patch: list[dict[str, Any]], | ||
| key: Callable[[dict[str, Any]], str] = lambda obj: obj['path'] + obj['op'], | ||
| ) -> list[dict[str, Any]]: | ||
|
Comment on lines
+82
to
+85
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This gets factored out in one of these PRs doesn't it?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. I mentioned it in the commit message but probably should have put it in the description as well. My intention is to merge each of these in turn, dealing with the merge conflicts at the time, rather than try to set them up as a sequence to go into a single merge into main or anything consistent like that. |
||
| return sorted(patch, key=key) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea to make this more incremental?
Also, how does it work when a path is excluded but also matches an included glob?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean by this. Do you mean will there be follow-ups to do the rest? If so, yes, #2230, #2235. Do you mean incremental in this PR? It started as one file per commit, but then after review I have not done any squashing so there is a mixed bag after that.
Include first, exclude second.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess what I'd like to see is that eventually the long hand-crafted list of excludes goes away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It goes away when all three PRs are merged; they each do about a third of the files.