summary refs log tree commit diff
path: root/mypy.ini (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add remaining type hints to `synapse.events`. (#11098)Patrick Cloke2021-11-021-7/+1
|
* Additional type hints for relations database class. (#11205)Patrick Cloke2021-10-281-0/+1
|
* Type hints for the remaining two files in `synapse.http`. (#11164)David Robertson2021-10-281-10/+2
| | | | | | | | | | | | | | | | | | | * 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>
* Add missing type hints to synapse.crypto. (#11146)Patrick Cloke2021-10-211-0/+3
| | | And require type hints for this module.
* Add missing type hints to synapse.api. (#11109)Patrick Cloke2021-10-181-0/+3
| | | | * Convert UserPresenceState to attrs. * Remove args/kwargs from error classes and explicitly pass msg/errorcode.
* Fix-up some type hints in the relations tests. (#11076)Patrick Cloke2021-10-141-0/+1
|
* Add type hints to synapse.events.*. (#11066)Patrick Cloke2021-10-131-0/+6
| | | Except `synapse/events/__init__.py`, which will be done in a follow-up.
* Be more lenient when parsing the version for oEmbed responses. (#11065)Patrick Cloke2021-10-131-0/+1
|
* Add tests for `MediaFilePaths` (#11057)Sean Quah2021-10-121-0/+1
|
* Add type hints to `synapse.storage.databases.main.client_ips` (#10972)Sean Quah2021-10-121-0/+4
|
* disallow-untyped-defs for synapse.push (#11023)David Robertson2021-10-111-0/+3
|
* Annotate synapse.storage.util (#10892)David Robertson2021-10-081-0/+6
| | | | | Also mark `synapse.streams` as having has no untyped defs Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
* Relax `ignore-missing-imports` for modules that have stubs now and update ↵David Robertson2021-10-081-35/+34
| | | | | | | | | | | | mypy (#11006) 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>
* disallow-untyped-defs for synapse.server_notices (#11021)David Robertson2021-10-071-0/+3
|
* `disallow-untyped-defs` for `synapse.state` (#11004)David Robertson2021-10-061-0/+3
| | | | | * `disallow-untyped-defs` for `synapse.state` Much smaller than I was expecting!
* More types for synapse.util, part 1 (#10888)David Robertson2021-10-061-0/+24
| | | | | | | | | | | | | | 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
* Refactor user directory tests (#10935)David Robertson2021-09-301-0/+6
| | | | | | | | | | | | | * 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>
* Improve typing in user_directory files (#10891)David Robertson2021-09-241-0/+2
| | | | | | | | | | | * 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>
* Require type hints in the handlers module. (#10831)Patrick Cloke2021-09-201-0/+3
| | | | | | | 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.
* Add type hints to state database module. (#10823)Patrick Cloke2021-09-151-0/+1
|
* Add missing type hints to non-client REST servlets. (#10817)Patrick Cloke2021-09-151-1/+1
| | | | Including admin, consent, key, synapse, and media. All REST servlets (the synapse.rest module) now require typed method definitions.
* Make StateFilter frozen so we can hash it (#10816)reivilibre2021-09-141-0/+1
| | | Also enables Mypy for related tests.
* Add types to synapse.util. (#10601)reivilibre2021-09-101-11/+64
|
* Pull out encrypted_by_default tests from user_directory tests (#10752)David Robertson2021-09-061-0/+1
|
* Additional type hints for client REST servlets (part 5) (#10736)Patrick Cloke2021-09-031-0/+3
| | | | Additionally this enforce type hints on all function signatures inside of the synapse.rest.client package.
* Merge remote-tracking branch 'origin/release-v1.41' into developRichard van der Hoff2021-08-271-0/+1
|\
| * Fix incompatibility with Twisted < 21. (#10713)Richard van der Hoff2021-08-271-0/+1
| | | | | | | | | | | | | | Turns out that the functionality added in #10546 to skip TLS was incompatible with older Twisted versions, so we need to be a bit more inventive. Also, add a test to (hopefully) not break this in future. Sadly, testing TLS is really hard.
* | Persist room hierarchy pagination sessions to the database. (#10613)Patrick Cloke2021-08-241-0/+1
| |
* | Flatten tests/rest/client/{v1,v2_alpha} too (#10667)David Robertson2021-08-201-2/+2
| |
* | Do not include rooms with an unknown room version in a sync response. (#10644)Patrick Cloke2021-08-191-0/+1
| | | | | | | | A user will still see this room if it is in a local cache, but it will not reappear if clearing the cache and reloading.
* | Additional type hints for the proxy agent and SRV resolver modules. (#10608)Dirk Klimpel2021-08-181-0/+3
|/
* Experimental support for MSC3266 Room Summary API. (#10394)Michael Telatynski2021-08-161-1/+1
|
* Fix type hints in space summary tests. (#10575)Patrick Cloke2021-08-111-0/+1
| | | And ensure that the file is checked via mypy.
* Add type hints and comments to event auth code. (#10393)Patrick Cloke2021-07-141-0/+1
|
* Add support for evicting cache entries based on last access time. (#10205)Erik Johnston2021-07-051-0/+1
|
* Remove support for ACME v1 (#10194)Brendan Abolivier2021-06-171-3/+0
| | | | | Fixes #9778 ACME v1 has been fully decommissioned for existing installs on June 1st 2021(see https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430/27), so we can now safely remove it from Synapse.
* Correct type hints for parse_string(s)_from_args. (#10137)Patrick Cloke2021-06-081-0/+1
|
* Enable Prometheus metrics for the jaeger client library (#10112)Richard van der Hoff2021-06-041-1/+1
|
* Add missing type hints to synapse.util (#9982)Patrick Cloke2021-05-241-0/+9
|
* Use ijson to parse the response to `/send_join`, reducing memory usage. (#9958)Erik Johnston2021-05-201-0/+3
| | | Instead of parsing the full response to `/send_join` into Python objects (which can be huge for large rooms) and *then* parsing that into events, we instead use ijson to stream parse the response directly into `EventBase` objects.
* Optionally track memory usage of each LruCache (#9881)Erik Johnston2021-05-051-0/+3
| | | | | This will double count slightly in the presence of interned strings. It's off by default as it can consume a lot of resources.
* Remove various bits of compatibility code for Python <3.6 (#9879)Andrew Morgan2021-04-271-1/+0
| | | I went through and removed a bunch of cruft that was lying around for compatibility with old Python versions. This PR also will now prevent Synapse from starting unless you're running Python 3.6+.
* Update mypy configuration: `no_implicit_optional = True` (#9742)Jonathan de Jong2021-04-051-0/+1
|
* Make it possible to use dmypy (#9692)Erik Johnston2021-03-261-1/+2
| | | | | | | | | Running `dmypy run` will do a `mypy` check while spinning up a daemon that makes rerunning `dmypy run` a lot faster. `dmypy` doesn't support `follow_imports = silent` and has `local_partial_types` enabled, so this PR enables those options and fixes the issues that were newly raised. Note that `local_partial_types` will be enabled by default in upcoming mypy releases.
* Add type hints to misc. files. (#9676)Patrick Cloke2021-03-241-1/+4
|
* Do not ignore the unpaddedbase64 module when type checking. (#9568)Patrick Cloke2021-03-091-3/+0
|
* Record the SSO Auth Provider in the login token (#9510)Richard van der Hoff2021-03-041-0/+1
| | | This great big stack of commits is a a whole load of hoop-jumping to make it easier to store additional values in login tokens, and then to actually store the SSO Identity Provider in the login token. (Making use of that data will follow in a subsequent PR.)
* Add type hints to groups code. (#9393)Patrick Cloke2021-02-171-0/+1
|
* Add type hints to E2E handler. (#9232)Patrick Cloke2021-01-281-41/+1
| | | This finishes adding type hints to the `synapse.handlers` module.
* Add type hints to various handlers. (#9223)Patrick Cloke2021-01-261-0/+14
| | | | With this change all handlers except the e2e_* ones have type hints enabled.
* Support icons for Identity Providers (#9154)Richard van der Hoff2021-01-201-0/+1
|
* Fix type hints in test_login.pyRichard van der Hoff2021-01-071-0/+1
|
* Add type hints to the receipts and user directory handlers. (#8976)Patrick Cloke2021-01-041-0/+2
|
* Add type hints to the crypto module. (#8999)Patrick Cloke2021-01-041-0/+2
|
* Add additional type hints to the storage module. (#8980)Patrick Cloke2020-12-301-0/+10
|
* Add type hints to admin and room list handlers. (#8973)Patrick Cloke2020-12-291-0/+5
|
* Clean up tox.ini (#8963)Richard van der Hoff2020-12-171-0/+5
| | | ... and disable coverage tracking for mypy and friends.
* Convert internal pusher dicts to attrs classes. (#8940)Patrick Cloke2020-12-161-0/+1
| | | This improves type hinting and should use less memory.
* Add type hints to the push module. (#8901)Patrick Cloke2020-12-111-6/+1
|
* Simplify the flow for SSO UIA (#8881)Richard van der Hoff2020-12-081-0/+1
| | | | | | | | | * SsoHandler: remove inheritance from BaseHandler * Simplify the flow for SSO UIA We don't need to do all the magic for mapping users when we are doing UIA, so let's factor that out.
* Add type hints for HTTP and email pushers. (#8880)Patrick Cloke2020-12-071-0/+3
|
* Add type hints to the push mailer module. (#8882)Patrick Cloke2020-12-071-0/+1
|
* Add some tests for `password_auth_providers` (#8819)Richard van der Hoff2020-12-011-0/+1
| | | | These things seemed to be completely untested, so I added a load of tests for them.
* Add additional type hints to HTTP client. (#8812)Patrick Cloke2020-11-251-1/+2
| | | | This also removes some duplicated code between the simple HTTP client and matrix federation client.
* Add type hints to matrix federation client / agent. (#8806)Patrick Cloke2020-11-251-0/+2
|
* Add a script to sign arbitrary json objects. (#8772)Richard van der Hoff2020-11-241-0/+1
|
* Properly report user-agent/IP during registration of SSO users. (#8784)Patrick Cloke2020-11-231-0/+1
| | | | | This also expands type-hints to the SSO and registration code. Refactors the CAS code to more closely match OIDC/SAML.
* Block clients from sending server ACLs that lock the local server out. (#8708)Erik Johnston2020-11-031-0/+1
| | | Fixes #4042
* Add type hints to application services. (#8655)Patrick Cloke2020-10-281-0/+4
|
* Add type hints for account validity handler (#8620)Patrick Cloke2020-10-261-0/+1
| | | This also fixes a bug by fixing handling of an account which doesn't expire.
* Type hints for RegistrationStore (#8615)Erik Johnston2020-10-221-0/+1
|
* Add type hints to profile and base handlers. (#8609)Patrick Cloke2020-10-211-1/+3
|
* Send some ephemeral events to appservices (#8437)Will Hunt2020-10-151-0/+1
| | | Optionally sends typing, presence, and read receipt information to appservices.
* Enable mypy for synapse.util.caches (#8547)Richard van der Hoff2020-10-151-3/+1
| | | This seemed to entail dragging in a type stub for SortedList.
* Add type hints to response cache. (#8507)Patrick Cloke2020-10-091-0/+1
|
* Add type hints to some handlers (#8505)Patrick Cloke2020-10-091-0/+5
|
* Add typing information to the device handler. (#8407)Patrick Cloke2020-10-071-0/+1
|
* Add unit test for event persister sharding (#8433)Erik Johnston2020-10-021-0/+3
|
* Enable mypy checking for unreachable code and fix instances. (#8432)Patrick Cloke2020-10-011-0/+1
|
* Make `StreamToken.room_key` be a `RoomStreamToken` instance. (#8281)Erik Johnston2020-09-111-0/+2
|
* Add types to async_helpers (#8260)Patrick Cloke2020-09-081-1/+2
|
* Add type hints to more handlers (#8244)Erik Johnston2020-09-031-0/+3
|
* Fix typing for `@cached` wrapped functions (#8240)Erik Johnston2020-09-031-1/+2
| | | This requires adding a mypy plugin to fiddle with the type signatures a bit.
* Add StreamStore to mypy (#8232)Erik Johnston2020-09-021-0/+1
|
* Convert the well known resolver to async (#8214)Patrick Cloke2020-09-011-0/+1
|
* Allow running mypy directly. (#8175)Patrick Cloke2020-08-261-0/+49
|
* Add type hints to handlers.message and events.builder (#8067)Erik Johnston2020-08-121-0/+3
|
* Add support for using rust-python-jaeger-reporter (#7697)Erik Johnston2020-06-171-0/+3
|
* Implement OpenID Connect-based login (#7256)Quentin Gliech2020-05-081-0/+3
|
* Fixup synapse.rest to pass mypy (#6732)Erik Johnston2020-01-201-0/+9
|
* Fixup synapse.api to pass mypy (#6733)Erik Johnston2020-01-201-0/+3
|
* Silence mypy errors for files outside those specifiedErik Johnston2019-12-101-1/+1
|
* Update black to 19.10b0 (#6304)Amber Brown2019-11-011-4/+7
| | | * update version of black and also fix the mypy config being overridden
* Refactor HomeserverConfig so it can be typechecked (#6137)Amber Brown2019-10-101-4/+12
|
* Fix for structured logging tests stomping on logs (#6023)Amber Brown2019-09-131-0/+54