You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Create a mypy plugin for replication class methods #8828
Replication servlet classes, such as ReplicationRemoteJoinRestServlet, ReplicationUserDevicesResyncRestServlet etc. each have _serialize_payload and _handle_request methods. Traditionally we haven't added typing to these methods as it breaks mypy for two reasons:
Their signatures differ from the base methods in ReplicationEndpoint.
If types are added to any instance of _serialize_payload or _handle_request, mypy will complain about this discrepancy, and thus an # type: ignore has typically been put on the method signature in order to avoid this:
A better solution is to write a mypy plugin, much like we already have for cache functions to properly check the types and remove the need to ignore them.
Note that this issue grew out of a discussion here: #8809 (comment)
Activity
Add typing to membership Replication class methods (#8809)