This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
mypy plugin to check @cached
return types
#14911
Merged
Merged
Changes from 30 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
eb24cdb
WIP mypy plugin to check `@cached` return types
d2cbac3
Whoops, Sequence is immutable
90631ac
WIP
4eb7de9
Merge remote-tracking branch 'origin/develop' into dmr/mypy-check-at-…
clokep ad1c28a
Update comments.
clokep 88323dd
Simplify code due to other knowledge.
clokep 676c858
Treat containers more similarly.
clokep 008ef3f
cachedList wraps Mapping
clokep 8aa4e87
Fix-up errors in tests.
clokep 0f3c036
Ignore a few calls which purposefully (?) return mutable objects.
clokep 9c94574
Data exfilitration is read-only and update admin APIs.
clokep f5fec7f
Update account_data & tags methods to be immutable.
clokep 9a62053
FIx-up push related caching.
clokep cc61862
Update filtering to return immutable objects.
clokep a27a67f
Update relations with immutable.
clokep 8f7f4d7
Update receipts code.
clokep 9fdc5a1
Update e2e keys & devices.
clokep d8cce5b
Update appservice stuff.
clokep ef61f3d
Ensure current hosts is immutable.
clokep 96faa34
Properly check attrs for frozen-ness.
clokep 2f75929
Kick CI
clokep 7849b26
Merge remote-tracking branch 'origin/develop' into dmr/mypy-check-at-…
clokep 8b1b15b
Fix-up return value of get_latest_event_ids_in_room.
clokep 451c9b1
Revert "Kick CI"
clokep d52e30c
Newsfragment
clokep 47b7ba7
FIx-up sync changes.
clokep ee77d82
Merge remote-tracking branch 'origin/develop' into dmr/mypy-check-at-…
clokep 0f02ad1
Merge remote-tracking branch 'origin/develop' into dmr/mypy-check-at-…
clokep 51a1a5f
Merge remote-tracking branch 'origin/develop' into dmr/mypy-check-at-…
clokep 07c4531
Merge branch 'develop' into dmr/mypy-check-at-cached
clokep 745ad61
Correct context
erikjohnston 03b0e40
Remove ignores for call-sites.
clokep 2c07b1f
Merge remote-tracking branch 'origin/develop' into dmr/mypy-check-at-…
clokep 460ed3c
Add ignores at definition sites.
clokep fbecb56
Actually check cachedList.
clokep dba8e72
Fix incorrect generic.
clokep 4f06d85
Lint
clokep 3875662
Abstract shared code.
clokep fb4ff5d
ServerAclEvaluator is immutable.
clokep 06ddf65
Update comments.
clokep 9b7ee03
Lint
clokep e2f599d
Update comments and remove unnecessary argument.
clokep da377cf
Merge remote-tracking branch 'origin/develop' into dmr/mypy-check-at-…
clokep a2956a6
Fix duplicate word.
clokep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve type hints. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ class ProfileInfo: | |
display_name: Optional[str] | ||
|
||
|
||
# TODO This is used as a cached value and is mutable. | ||
@attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True) | ||
class MemberSummary: | ||
Comment on lines
+48
to
50
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. Is it? 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, it is due to |
||
# A truncated list of (user_id, event_id) tuples for users of a given | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Exciting to see!
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.
Terrifying IMO of how we use this.