- Nov 16, 2021
-
-
Patrick Cloke authored
-
- Nov 15, 2021
-
-
David Robertson authored
It already seems to pass mypy. I wonder what changed, given that it was on the exclusion list. So this commit consists of me ensuring `--disallow-untyped-defs` passes and a minor fixup to a function that returned either `True` or `None`.
-
David Robertson authored
-
- Nov 12, 2021
-
-
David Robertson authored
I was sad that I couldn't do better for `_curr_state_delta_stream_cache`. At least it's explicitly called out in a comment with #TODO.
-
Patrick Cloke authored
This was only checking the __init__ files in modules instead of all files in a module, which don't pass yet.
-
David Robertson authored
* Prefer `HTTPStatus` over plain `int` This is an Opinion that no-one has seemed to object to yet. * `--disallow-untyped-defs` for `tests.rest.client.test_directory` * Improve synapse's annotations for deleting aliases * Test case for deleting a room alias * Changelog
-
Patrick Cloke authored
-
David Robertson authored
* Make DataStore inherit from EventForwardExtremitiesStore before CacheInvalidationWorkerStore the former implicitly inherits from the latter, so they should be ordered like this when used.
-
Patrick Cloke authored
-
- Nov 11, 2021
-
-
David Robertson authored
I'm not sure why this was excluded---it seemed to be passing for me. But it's easy enough to fixup.
-
David Robertson authored
-
David Robertson authored
Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com>
-
Patrick Cloke authored
-
- Nov 10, 2021
-
-
Patrick Cloke authored
-
Patrick Cloke authored
-
- Nov 09, 2021
-
-
Patrick Cloke authored
This was due to a conflict between #11282, which changed mypy configuration, and #11228, a normal change.
-
Dan Callahan authored
Signed-off-by:
Dan Callahan <danc@element.io>
-
- Nov 02, 2021
-
-
Patrick Cloke authored
-
- Oct 28, 2021
-
-
Patrick Cloke authored
-
David Robertson authored
* Teach MyPy that the sentinel context is False This means that if `ctx: LoggingContextOrSentinel` then `bool(ctx)` narrows us to `ctx:LoggingContext`, which is a really neat find! * Annotate RequestMetrics - Raise errors for sentry if we use the sentinel context - Ensure we don't raise an error and carry on, but not recording stats - Include stack trace in the error case to lower Sean's blood pressure * Make mypy pass for synapse.http.request_metrics * Make synapse.http.connectproxyclient pass mypy Co-authored-by:
reivilibre <oliverw@matrix.org>
-
- Oct 21, 2021
-
-
Patrick Cloke authored
And require type hints for this module.
-
- Oct 18, 2021
-
-
Patrick Cloke authored
* Convert UserPresenceState to attrs. * Remove args/kwargs from error classes and explicitly pass msg/errorcode.
-
- Oct 14, 2021
-
-
Patrick Cloke authored
-
- Oct 13, 2021
-
-
Patrick Cloke authored
Except `synapse/events/__init__.py`, which will be done in a follow-up.
-
Patrick Cloke authored
-
- Oct 12, 2021
- Oct 11, 2021
-
-
David Robertson authored
-
- Oct 08, 2021
-
-
David Robertson authored
Also mark `synapse.streams` as having has no untyped defs Co-authored-by:
Sean Quah <8349537+squahtx@users.noreply.github.com>
-
David Robertson authored
Updating mypy past version 0.9 means that third-party stubs are no-longer distributed with typeshed. See http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html for details. We therefore pull in stub packages in setup.py Additionally, some modules that we were previously ignoring import failures for now have stubs. So let's use them. The rest of this change consists of fixups to make the newer mypy + stubs pass CI. Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com>
-
- Oct 07, 2021
-
-
David Robertson authored
-
- Oct 06, 2021
-
-
David Robertson authored
* `disallow-untyped-defs` for `synapse.state` Much smaller than I was expecting!
-
David Robertson authored
The following modules now pass `disallow_untyped_defs`: * synapse.util.caches.cached_call * synapse.util.caches.lrucache * synapse.util.caches.response_cache * synapse.util.caches.stream_change_cache * synapse.util.caches.ttlcache pass * synapse.util.daemonize * synapse.util.patch_inline_callbacks pass `no-untyped-defs` * synapse.util.versionstring Additional typing in synapse.util.metrics. Didn't get this to pass `no-untyped-defs`, think I'll need to watch #10847
-
- Sep 30, 2021
-
-
David Robertson authored
* Pull out GetUserDirectoryTables helper * Don't rebuild the dir in tests that don't need it In #10796 I changed registering a user to add directory entries under. This means we don't have to force a directory regbuild in to tests of the user directory search. * Move test_initial to tests/storage * Add type hints to both test_user_directory files Co-authored-by:
Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
-
- Sep 24, 2021
-
-
David Robertson authored
* Improve typing in user_directory files This makes the user_directory.py in storage pass most of mypy's checks (including `no-untyped-defs`). Unfortunately that file is in the tangled web of Store class inheritance so doesn't pass mypy at the moment. The handlers directory has already been mypyed. Co-authored-by:
reivilibre <olivier@librepush.net>
-
- Sep 20, 2021
-
-
Patrick Cloke authored
Adds missing type hints to methods in the synapse.handlers module and requires all methods to have type hints there. This also removes the unused construct_auth_difference method from the FederationHandler.
-
- Sep 15, 2021
-
-
Patrick Cloke authored
-
Patrick Cloke authored
Including admin, consent, key, synapse, and media. All REST servlets (the synapse.rest module) now require typed method definitions.
-
- Sep 14, 2021
-
-
reivilibre authored
Also enables Mypy for related tests.
-
- Sep 10, 2021
-
-
reivilibre authored
-