Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add final type hint to synapse.server. (#15035) | Patrick Cloke | 2023-02-09 | 1 | -3/+0 |
| | |||||
* | Proper types for `tests.module_api` (#15031) | David Robertson | 2023-02-09 | 1 | -1/+0 |
| | | | | | | | | | | | | | * -> None for test methods * A first batch of type fixes * Introduce common parent test case * Fixup that big test method * tests.module_api passes mypy * Changelog | ||||
* | Add more missing type hints to tests. (#15028) | Patrick Cloke | 2023-02-08 | 1 | -18/+0 |
| | |||||
* | Add missing type hints to tests. (#15027) | Patrick Cloke | 2023-02-08 | 1 | -18/+0 |
| | |||||
* | Explicit disabling of disallowed_untyped_defs. (#15026) | Patrick Cloke | 2023-02-08 | 1 | -58/+25 |
| | | | To make it easier to see which files still need to be fixed. | ||||
* | Typecheck tests.rest.media.v1.test_media_storage (#15008) | David Robertson | 2023-02-07 | 1 | -1/+0 |
| | | | | | | | | | | | * Fix MediaStorage type hint * Typecheck tests.rest.media.v1.test_media_storage * Changelog * Remove assert and make the comment succinct * Fix syntax for olddeps | ||||
* | Proper types for tests.test_terms_auth (#15007) | David Robertson | 2023-02-07 | 1 | -1/+3 |
| | | | | | * Proper types for tests.test_terms_auth * Changelog | ||||
* | Properly typecheck types.http (#14988) | David Robertson | 2023-02-07 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Tweak http types in Synapse AFACIS these are correct, and they make mypy happier on tests.http. * Type hints for test_proxyagent * type hints for test_srv_resolver * test_matrix_federation_agent * tests.http.server._base * tests.http.__init__ * tests.http.test_additional_resource * tests.http.test_client * tests.http.test_endpoint * tests.http.test_matrixfederationclient * tests.http.test_servlet * tests.http.test_simple_client * tests.http.test_site * One fixup in tests.server * Untyped defs * Changelog * Fixup syntax for Python 3.7 * Fix olddeps syntax * Use a twisted IPv4 addr for dummy_address * Fix typo, thanks Sean Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> * Remove redundant `Optional` --------- Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> | ||||
* | Add missing types to test_state. (#14985) | Patrick Cloke | 2023-02-06 | 1 | -1/+3 |
| | |||||
* | Type hints for tests.federation (#14991) | David Robertson | 2023-02-06 | 1 | -3/+1 |
| | | | | | | | | | | | | | * Make tests.federation pass mypy * Untyped defs in tests.federation.transport * test methods return None * Remaining type hints in tests.federation * Changelog * Avoid an uncessary type-ignore | ||||
* | Add missing type hints to tests.replication. (#14987) | Patrick Cloke | 2023-02-06 | 1 | -0/+3 |
| | |||||
* | Expect type stubs from canonicaljson (#14992) | David Robertson | 2023-02-06 | 1 | -3/+0 |
| | | | | | | | | | * canonicaljson has stubs now since https://github.com/matrix-org/python-canonicaljson/pull/52 which is included in the lockfile version we use for type checking. * Changelog | ||||
* | Type hints for tests.appservice (#14990) | David Robertson | 2023-02-06 | 1 | -1/+3 |
| | | | | | | | | | | | | | | | | | | | | * Accept a Sequence of events in synapse.appservice This avoids some casts/ignores in the tests I'm about to fixup. It seems that `List[Mock]` is not a subtype of `List[EventBase]`, but `Sequence[Mock]` is a subtype of `Sequence[EventBase]`. So presumably `Mock` is considered a subtype of anything, much like `Any`. * make tests.appservice.test_scheduler pass mypy * Extra hints in tests.appservice.test_scheduler * Extra hints in tests.appservice.test_api * Extra hints in tests.appservice.test_appservice * Disallow untyped defs * Changelog | ||||
* | Properly typecheck tests.api (#14983) | David Robertson | 2023-02-03 | 1 | -1/+3 |
| | |||||
* | Properly typecheck tests.app (#14984 | David Robertson | 2023-02-03 | 1 | -1/+3 |
| | |||||
* | Add missing type hints in tests (#14879) | Patrick Cloke | 2023-01-26 | 1 | -3/+3 |
| | | | | * FIx-up type hints in tests.logging. * Add missing type hints to test_transactions. | ||||
* | Fix type hints in typing edu unit tests (#14886) | Andrew Morgan | 2023-01-26 | 1 | -1/+0 |
| | |||||
* | Add missing type hints for tests.events. (#14904) | Patrick Cloke | 2023-01-25 | 1 | -2/+3 |
| | |||||
* | Fix type hints in knocking tests. (#14887) | Andrew Morgan | 2023-01-25 | 1 | -1/+0 |
| | |||||
* | Fix type hints for Monthly Active Users tests (#14889) | Andrew Morgan | 2023-01-22 | 1 | -1/+0 |
| | |||||
* | Add type hints to `TestRatelimiter` (#14885) | Andrew Morgan | 2023-01-21 | 1 | -1/+0 |
| | |||||
* | Fix-up type hints for tests.push module. (#14816) | Patrick Cloke | 2023-01-11 | 1 | -4/+1 |
| | |||||
* | Add missing type hints to tests. (#14687) | Patrick Cloke | 2022-12-28 | 1 | -2/+4 |
| | | | Adds type hints to tests.metrics and tests.crypto. | ||||
* | Add missing type hints to tests.config. (#14681) | Patrick Cloke | 2022-12-16 | 1 | -3/+1 |
| | |||||
* | Add missing type hints to tests.handlers. (#14680) | Patrick Cloke | 2022-12-16 | 1 | -4/+1 |
| | | | And do not allow untyped defs in tests.handlers. | ||||
* | Allow selecting "prejoin" events by state keys (#14642) | David Robertson | 2022-12-13 | 1 | -3/+9 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Declare new config * Parse new config * Read new config * Don't use trial/our TestCase where it's not needed Before: ``` $ time trial tests/events/test_utils.py > /dev/null real 0m2.277s user 0m2.186s sys 0m0.083s ``` After: ``` $ time trial tests/events/test_utils.py > /dev/null real 0m0.566s user 0m0.508s sys 0m0.056s ``` * Helper to upsert to event fields without exceeding size limits. * Use helper when adding invite/knock state Now that we allow admins to include events in prejoin room state with arbitrary state keys, be a good Matrix citizen and ensure they don't accidentally create an oversized event. * Changelog * Move StateFilter tests should have done this in #14668 * Add extra methods to StateFilter * Use StateFilter * Ensure test file enforces typed defs; alphabetise * Workaround surprising get_current_state_ids * Whoops, fix mypy | ||||
* | Enable `--warn-redundant-casts` option in mypy (#14671) | David Robertson | 2022-12-12 | 1 | -0/+1 |
| | | | | | | | | | | | | | | | | | | | * Enable `--warn-redundant-casts` option in mypy Doesn't do much but helps me sleep better at night. * Changelog * Fix name of the ignore * Fix one more missed cast Not sure why I didn't see this one locally, maybe I needed a poetry update * Remove old comment Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | Require types in tests.storage. (#14646) | Patrick Cloke | 2022-12-09 | 1 | -10/+4 |
| | | | | Adds missing type hints to `tests.storage` package and does not allow untyped definitions. | ||||
* | Add missing types to tests.util. (#14597) | Patrick Cloke | 2022-12-02 | 1 | -10/+3 |
| | | | | Removes files under tests.util from the ignored by list, then fully types all tests/util/*.py files. | ||||
* | Add support for handling avatar with SSO login (#13917) | Ashish Kumar | 2022-11-25 | 1 | -1/+3 |
| | | | | | | | | This commit adds support for handling a provided avatar picture URL when logging in via SSO. Signed-off-by: Ashish Kumar <ashfame@users.noreply.github.com> Fixes #9357. | ||||
* | Add missing type hints to test.util.caches (#14529) | Patrick Cloke | 2022-11-22 | 1 | -5/+6 |
| | |||||
* | Enable 'strict_equality' checking for mypy (#14452) | Andrew Morgan | 2022-11-17 | 1 | -0/+1 |
| | |||||
* | Reintroduce #14376, with bugfix for monoliths (#14468) | David Robertson | 2022-11-16 | 1 | -0/+3 |
| | | | | | | | | | | | | | | | | | | | | | | * Add tests for StreamIdGenerator * Drive-by: annotate all defs * Revert "Revert "Remove slaved id tracker (#14376)" (#14463)" This reverts commit d63814fd736fed5d3d45ff3af5e6d3bfae50c439, which in turn reverted 36097e88c4da51fce6556a58c49bd675f4cf20ab. This restores the latter. * Fix StreamIdGenerator not handling unpersisted IDs Spotted by @erikjohnston. Closes #14456. * Changelog Co-authored-by: Nick Mills-Barrett <nick@fizzadar.com> Co-authored-by: Erik Johnston <erik@matrix.org> | ||||
* | Avoid incrementing bg process utime/stime counters by negative durations ↵ | David Robertson | 2022-10-31 | 1 | -1/+3 |
| | | | | (#14323) | ||||
* | Fix sending events into rooms with non-integer power levels (#14073) | David Robertson | 2022-10-06 | 1 | -0/+3 |
| | |||||
* | Add a stub Rust crate (#12595) | Erik Johnston | 2022-09-06 | 1 | -1/+5 |
| | |||||
* | Use Pydantic to systematically validate a first batch of endpoints in ↵ | David Robertson | 2022-08-15 | 1 | -1/+1 |
| | | | | `synapse.rest.client.account`. (#13188) | ||||
* | Add missing types to opentracing. (#13345) | Patrick Cloke | 2022-07-21 | 1 | -3/+0 |
| | | | After this change `synapse.logging` is fully typed. | ||||
* | Type `tests.utils` (#13028) | David Robertson | 2022-07-05 | 1 | -0/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Cast to postgres types when handling postgres db * Remove unused method * Easy annotations * Annotate create_room * Use `ParamSpec` to annotate looping_call * Annotate `default_config` * Track `now` as a float `time_ms` returns an int like the proper Synapse `Clock` * Introduce a `Timer` dataclass * Introduce a Looper type * Suppress checking of a mock * tests.utils is typed * Changelog * Whoops, import ParamSpec from typing_extensions * ditch the psycopg2 casts | ||||
* | Remove tests/utils.py from mypy's exclude list (#13159) | Andrew Morgan | 2022-07-04 | 1 | -1/+0 |
| | |||||
* | More type hints for `synapse.logging` (#13103) | Patrick Cloke | 2022-06-30 | 1 | -3/+0 |
| | | | | Completes type hints for synapse.logging.scopecontextmanager and (partially) for synapse.logging.opentracing. | ||||
* | Actually typecheck `tests.test_server` (#13135) | David Robertson | 2022-06-30 | 1 | -1/+0 |
| | |||||
* | Extra type annotations in `test_server` (#13124) | David Robertson | 2022-06-28 | 1 | -0/+3 |
| | |||||
* | Type annotations in `synapse.databases.main.devices` (#13025) | David Robertson | 2022-06-15 | 1 | -1/+0 |
| | | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | Type annotations for `test_v2` (#12985) | David Robertson | 2022-06-09 | 1 | -1/+3 |
| | |||||
* | Add some type hints to tests files (#12833) | Dirk Klimpel | 2022-05-23 | 1 | -8/+0 |
| | | | Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | ||||
* | Simplify untyped-defs config in mypy.ini (#12790) | David Robertson | 2022-05-19 | 1 | -156/+17 |
| | |||||
* | Add some type hints to `event_federation` datastore (#12753) | Dirk Klimpel | 2022-05-18 | 1 | -1/+0 |
| | | | Co-authored-by: David Robertson <david.m.robertson1@gmail.com> | ||||
* | Add some type hints to datastore (#12717) | Dirk Klimpel | 2022-05-17 | 1 | -2/+0 |
| | |||||
* | Tidy up and type-hint the database engine modules (#12734) | David Robertson | 2022-05-17 | 1 | -0/+3 |
| | | | Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> | ||||
* | Another batch of type annotations (#12726) | David Robertson | 2022-05-13 | 1 | -0/+21 |
| | |||||
* | Reduce the number of "untyped defs" (#12716) | David Robertson | 2022-05-12 | 1 | -0/+24 |
| | |||||
* | remove constantly lib use and switch to enums. (#12624) | andrew do | 2022-05-04 | 1 | -3/+0 |
| | |||||
* | Prune mypy ignore_missing_imports list (#12608) | David Robertson | 2022-05-03 | 1 | -51/+2 |
| | |||||
* | Make `scripts-dev` pass `mypy --disallow-untyped-defs` (#12356) | David Robertson | 2022-04-27 | 1 | -4/+6 |
| | | | Not enforced in config yet. One day. | ||||
* | Remove unused `# type: ignore`s (#12531) | David Robertson | 2022-04-27 | 1 | -0/+6 |
| | | | | | | | | | | | | | | | | | | | | | | Over time we've begun to use newer versions of mypy, typeshed, stub packages---and of course we've improved our own annotations. This makes some type ignore comments no longer necessary. I have removed them. There was one exception: a module that imports `select.epoll`. The ignore is redundant on Linux, but I've kept it ignored for those of us who work on the source tree using not-Linux. (#11771) I'm more interested in the config line which enforces this. I want unused ignores to be reported, because I think it's useful feedback when annotating to know when you've fixed a problem you had to previously ignore. * Installing extras before typechecking Lacking an easy way to install all extras generically, let's bite the bullet and make install the hand-maintained `all` extra before typechecking. Now that https://github.com/matrix-org/backend-meta/pull/6 is merged to the release/v1 branch. | ||||
* | Remove leftover references to setup.py (#12514) | David Robertson | 2022-04-20 | 1 | -2/+2 |
| | | | | | | | * Remove leftover references to setup.py Missed in #12478. * Changelog | ||||
* | Dump setuptools; correct pyproject version number (#12478) | David Robertson | 2022-04-20 | 1 | -1/+0 |
| | |||||
* | Add missing type hints to config classes. (#12402) | Patrick Cloke | 2022-04-11 | 1 | -1/+1 |
| | |||||
* | Disallow untyped defs in synapse._scripts (#12422) | David Robertson | 2022-04-11 | 1 | -0/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Of note: * No untyped defs in `register_new_matrix_user` This one might be contraversial. `request_registration` has three dependency-injection arguments used for testing. I'm removing the injection of the `requests` module and using `unitest.mock.patch` in the test cases instead. Doing `reveal_type(requests)` and `reveal_type(requests.get)` before the change: ``` synapse/_scripts/register_new_matrix_user.py:45: note: Revealed type is "Any" synapse/_scripts/register_new_matrix_user.py:46: note: Revealed type is "Any" ``` And after: ``` synapse/_scripts/register_new_matrix_user.py:44: note: Revealed type is "types.ModuleType" synapse/_scripts/register_new_matrix_user.py:45: note: Revealed type is "def (url: Union[builtins.str, builtins.bytes], params: Union[Union[_typeshed.SupportsItems[Union[builtins.str, builtins.bytes, builtins.int, builtins.float], Union[builtins.str, builtins.bytes, builtins.int, builtins.float, typing.Iterable[Union[builtins.str, builtins.bytes, builtins.int, builtins.float]], None]], Tuple[Union[builtins.str, builtins.bytes, builtins.int, builtins.float], Union[builtins.str, builtins.bytes, builtins.int, builtins.float, typing.Iterable[Union[builtins.str, builtins.bytes, builtins.int, builtins.float]], None]], typing.Iterable[Tuple[Union[builtins.str, builtins.bytes, builtins.int, builtins.float], Union[builtins.str, builtins.bytes, builtins.int, builtins.float, typing.Iterable[Union[builtins.str, builtins.bytes, builtins.int, builtins.float]], None]]], builtins.str, builtins.bytes], None] =, data: Union[Any, None] =, headers: Union[Any, None] =, cookies: Union[Any, None] =, files: Union[Any, None] =, auth: Union[Any, None] =, timeout: Union[Any, None] =, allow_redirects: builtins.bool =, proxies: Union[Any, None] =, hooks: Union[Any, None] =, stream: Union[Any, None] =, verify: Union[Any, None] =, cert: Union[Any, None] =, json: Union[Any, None] =) -> requests.models.Response" ``` * Drive-by comment in `synapse.storage.types` * No untyped defs in `synapse_port_db` This was by far the most painful. I'm happy to break this up into smaller pieces for review if it's not managable as-is. | ||||
* | Make `synapse._scripts` pass typechecks (#12421) | David Robertson | 2022-04-08 | 1 | -5/+0 |
| | |||||
* | Add missing type definitions for scripts in docker folder (#12280) | Jorge Florian | 2022-04-08 | 1 | -0/+1 |
| | | | | Signed-off-by: Jorge Florian <jafn28@gmail.com> | ||||
* | Add type hints to some tests files (#12371) | Dirk Klimpel | 2022-04-05 | 1 | -1/+0 |
| | |||||
* | Remove more dead/broken dev scripts (#12355) | David Robertson | 2022-04-03 | 1 | -3/+0 |
| | |||||
* | Add type hints for `tests/unittest.py`. (#12347) | Richard van der Hoff | 2022-04-01 | 1 | -1/+0 |
| | | | In particular, add type hints for get_success and friends, which are then helpful in a bunch of places. | ||||
* | Burn `check_signature` dev script. (#12351) | David Robertson | 2022-04-01 | 1 | -1/+0 |
| | |||||
* | Remove `list_url_patterns` dev script (#12349) | David Robertson | 2022-04-01 | 1 | -1/+0 |
| | |||||
* | Add more type hints to the main state store. (#12267) | Patrick Cloke | 2022-03-31 | 1 | -1/+0 |
| | |||||
* | Fix typechecker problems exposed by signedjson 1.1.2 (#12326) | David Robertson | 2022-03-29 | 1 | -0/+3 |
| | |||||
* | Add some type hints to datastore. (#12255) | Dirk Klimpel | 2022-03-28 | 1 | -3/+0 |
| | |||||
* | Add type hints to tests files. (#12256) | Dirk Klimpel | 2022-03-21 | 1 | -2/+0 |
| | |||||
* | Add some type hints to datastore (#12248) | Dirk Klimpel | 2022-03-18 | 1 | -6/+0 |
| | | | | | * inherit `MonthlyActiveUsersStore` from `RegistrationWorkerStore` Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | Add type hints to more tests files. (#12240) | Dirk Klimpel | 2022-03-17 | 1 | -4/+0 |
| | |||||
* | Add type hints to some tests/handlers files. (#12224) | Dirk Klimpel | 2022-03-15 | 1 | -5/+0 |
| | |||||
* | Add type hints to `tests/rest`. (#12208) | Dirk Klimpel | 2022-03-11 | 1 | -1/+0 |
| | | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | Add experimental environment variable to enable asyncio reactor (#12135) | Erik Johnston | 2022-03-08 | 1 | -0/+3 |
| | |||||
* | Add type hints to `tests/rest` (#12146) | Dirk Klimpel | 2022-03-03 | 1 | -6/+1 |
| | | | | | | | * Add type hints to `tests/rest` * newsfile * change import from `SigningKey` | ||||
* | Add suffices to scripts in scripts-dev (#12137) | David Robertson | 2022-03-02 | 1 | -1/+11 |
| | | | | | | | | | * Rename scripts-dev to have suffices * Update references to `scripts-dev` * Changelog * These scripts don't pass mypy | ||||
* | Add type hints to `tests/rest/client` (#12108) | Dirk Klimpel | 2022-03-02 | 1 | -6/+0 |
| | | | | | | | | | | | | | | | | | | | | | | | * Add type hints to `tests/rest/client` * newsfile * fix imports * add `test_account.py` * Remove one type hint in `test_report_event.py` * change `on_create_room` to `async` * update new functions in `test_third_party_rules.py` * Add `test_filter.py` * add `test_rooms.py` * change to `assertEquals` to `assertEqual` * lint | ||||
* | Move scripts directory inside synapse, exposing as setuptools entry_points ↵ | David Robertson | 2022-03-02 | 1 | -0/+4 |
| | | | | | | | | | | | | (#12118) * Two scripts are basically entry_points already * Move and rename scripts/* to synapse/_scripts/*.py * Delete sync_room_to_group.pl * Expose entry points in setup.py * Update linter script and config * Fixup scripts & docs mentioning scripts that moved Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | ||||
* | Add type hints to `tests/rest/client` (#12094) | Dirk Klimpel | 2022-02-28 | 1 | -3/+0 |
| | | | | | | | | | * Add type hints to `tests/rest/client` * update `mypy.ini` * newsfile * add `test_register.py` | ||||
* | Add type hints to `tests/rest/client` (#12084) | Dirk Klimpel | 2022-02-28 | 1 | -2/+1 |
| | |||||
* | Add type hints to `synapse/storage/databases/main` (#11984) | Dirk Klimpel | 2022-02-21 | 1 | -3/+0 |
| | |||||
* | Adds misc missing type hints (#11953) | Patrick Cloke | 2022-02-11 | 1 | -0/+6 |
| | |||||
* | Add missing type hints to synapse.replication. (#11938) | Patrick Cloke | 2022-02-08 | 1 | -0/+3 |
| | |||||
* | Add type hints to `tests/rest/admin` (#11851) | Dirk Klimpel | 2022-01-31 | 1 | -3/+0 |
| | |||||
* | Add type hints to `synapse/storage/databases/main/events_bg_updates.py` (#11654) | Dirk Klimpel | 2021-12-30 | 1 | -1/+3 |
| | |||||
* | Fix a type annotation in `test_account_data.py` and remove it from the Mypy ↵ | reivilibre | 2021-12-29 | 1 | -1/+0 |
| | | | | | exclusion list. (#11657) Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | Add type hints to `synapse/storage/databases/main/stats.py` (#11653) | Dirk Klimpel | 2021-12-29 | 1 | -1/+3 |
| | |||||
* | Add type hints to event_push_actions. (#11594) | Patrick Cloke | 2021-12-21 | 1 | -1/+3 |
| | |||||
* | Add opentracing types (#11603) | Shay | 2021-12-20 | 1 | -3/+0 |
| | |||||
* | Add type hints to `synapse/tests/rest/admin` (#11590) | Dirk Klimpel | 2021-12-16 | 1 | -0/+3 |
| | |||||
* | Add type hints to `synapse/storage/databases/main/transactions.py` (#11589) | Dirk Klimpel | 2021-12-16 | 1 | -1/+3 |
| | |||||
* | Add type hints to `synapse/storage/databases/main/room.py` (#11575) | Sean Quah | 2021-12-15 | 1 | -1/+3 |
| | |||||
* | Add type hints to `synapse/storage/databases/main/e2e_room_keys.py` (#11549) | Sean Quah | 2021-12-14 | 1 | -1/+3 |
| | |||||
* | Add missing type hints to `synapse.logging.context` (#11556) | Sean Quah | 2021-12-14 | 1 | -0/+3 |
| | |||||
* | Add missing type hints to `synapse.appservice` (#11360) | Patrick Cloke | 2021-12-14 | 1 | -0/+3 |
| | |||||
* | Add missing type hints to synapse.http. (#11571) | Patrick Cloke | 2021-12-14 | 1 | -0/+3 |
| | |||||
* | Add type hints to `synapse/storage/databases/main/end_to_end_keys.py` (#11551) | Sean Quah | 2021-12-13 | 1 | -1/+3 |
| | |||||
* | Add type hints to `synapse/storage/databases/main/account_data.py` (#11546) | Sean Quah | 2021-12-13 | 1 | -1/+3 |
| | |||||
* | Add type hints to `synapse/tests/rest/admin` (#11501) | Dirk Klimpel | 2021-12-03 | 1 | -3/+0 |
| | |||||
* | Clean up `tests.test_visibility` to remove legacy code. (#11495) | reivilibre | 2021-12-02 | 1 | -1/+0 |
| | |||||
* | Add most of the missing type hints to `synapse.federation`. (#11483) | Patrick Cloke | 2021-12-02 | 1 | -0/+6 |
| | | | This skips a few methods which are difficult to type. | ||||
* | Add type annotations to `tests.storage.test_appservice`. (#11488) | reivilibre | 2021-12-02 | 1 | -1/+0 |
| | |||||
* | disallow-untyped-defs for the module_api (#11029) | David Robertson | 2021-11-29 | 1 | -0/+3 |
| | |||||
* | Add a test case for the SendJoinParser (#11441) | David Robertson | 2021-11-29 | 1 | -0/+4 |
| | | | This would have caught the bug #11438 introduced in #11217 and fixed in #11439. | ||||
* | Add type hints to `synapse/storage/databases/main/events_worker.py` (#11411) | Sean Quah | 2021-11-26 | 1 | -1/+3 |
| | | | | Also refactor the stream ID trackers/generators a bit and try to document them better. | ||||
* | Add missing type hints to config base classes (#11377) | Patrick Cloke | 2021-11-23 | 1 | -0/+3 |
| | |||||
* | Add type annotations to `synapse.metrics` (#10847) | Sean Quah | 2021-11-17 | 1 | -0/+3 |
| | |||||
* | Add most missing type hints to synapse.util (#11328) | Patrick Cloke | 2021-11-16 | 1 | -84/+3 |
| | |||||
* | Database storage profile passes mypy (#11342) | David Robertson | 2021-11-15 | 1 | -1/+6 |
| | | | | | | 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`. | ||||
* | Get directory db file to pass mypy (#11339) | David Robertson | 2021-11-15 | 1 | -1/+3 |
| | |||||
* | Annotations for state_deltas.py (#11316) | David Robertson | 2021-11-12 | 1 | -1/+3 |
| | | | | | 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. | ||||
* | Rollback #11322 due to wrong syntax in mypy.ini. (#11332) | Patrick Cloke | 2021-11-12 | 1 | -2/+14 |
| | | | | This was only checking the __init__ files in modules instead of all files in a module, which don't pass yet. | ||||
* | Test room alias deletion (#11327) | David Robertson | 2021-11-12 | 1 | -0/+3 |
| | | | | | | | | | | * 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 | ||||
* | Add type hints to media repository storage module (#11311) | Patrick Cloke | 2021-11-12 | 1 | -1/+0 |
| | |||||
* | Attempt to annotate events_forward_extremities (#11314) | David Robertson | 2021-11-12 | 1 | -1/+0 |
| | | | | | | * Make DataStore inherit from EventForwardExtremitiesStore before CacheInvalidationWorkerStore the former implicitly inherits from the latter, so they should be ordered like this when used. | ||||
* | Generalize the disallowed_untyped_defs in mypy.ini (#11322) | Patrick Cloke | 2021-11-12 | 1 | -14/+2 |
| | |||||
* | Annotations for user_erasure_store (#11313) | David Robertson | 2021-11-11 | 1 | -1/+3 |
| | | | | I'm not sure why this was excluded---it seemed to be passing for me. But it's easy enough to fixup. | ||||
* | Get db signatures file to pass mypy (#11312) | David Robertson | 2021-11-11 | 1 | -1/+0 |
| | |||||
* | Correct type hint for room_batch.py (#11310) | David Robertson | 2021-11-11 | 1 | -1/+3 |
| | | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | Add type hints to some storage classes (#11307) | Patrick Cloke | 2021-11-11 | 1 | -7/+0 |
| | |||||
* | Add missing type hints to `synapse.app`. (#11287) | Patrick Cloke | 2021-11-10 | 1 | -16/+3 |
| | |||||
* | Add type hints to synapse._scripts (#11297) | Patrick Cloke | 2021-11-10 | 1 | -2/+0 |
| | |||||
* | Ignore missing imports for parameterized. (#11285) | Patrick Cloke | 2021-11-09 | 1 | -0/+3 |
| | | | | This was due to a conflict between #11282, which changed mypy configuration, and #11228, a normal change. | ||||
* | Require mypy for synapse/ & tests/ unless excluded (#11282) | Dan Callahan | 2021-11-09 | 1 | -74/+165 |
| | | | Signed-off-by: Dan Callahan <danc@element.io> | ||||
* | Add remaining type hints to `synapse.events`. (#11098) | Patrick Cloke | 2021-11-02 | 1 | -7/+1 |
| | |||||
* | Additional type hints for relations database class. (#11205) | Patrick Cloke | 2021-10-28 | 1 | -0/+1 |
| | |||||
* | Type hints for the remaining two files in `synapse.http`. (#11164) | David Robertson | 2021-10-28 | 1 | -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 Cloke | 2021-10-21 | 1 | -0/+3 |
| | | | And require type hints for this module. | ||||
* | Add missing type hints to synapse.api. (#11109) | Patrick Cloke | 2021-10-18 | 1 | -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 Cloke | 2021-10-14 | 1 | -0/+1 |
| | |||||
* | Add type hints to synapse.events.*. (#11066) | Patrick Cloke | 2021-10-13 | 1 | -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 Cloke | 2021-10-13 | 1 | -0/+1 |
| | |||||
* | Add tests for `MediaFilePaths` (#11057) | Sean Quah | 2021-10-12 | 1 | -0/+1 |
| | |||||
* | Add type hints to `synapse.storage.databases.main.client_ips` (#10972) | Sean Quah | 2021-10-12 | 1 | -0/+4 |
| | |||||
* | disallow-untyped-defs for synapse.push (#11023) | David Robertson | 2021-10-11 | 1 | -0/+3 |
| | |||||
* | Annotate synapse.storage.util (#10892) | David Robertson | 2021-10-08 | 1 | -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 Robertson | 2021-10-08 | 1 | -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 Robertson | 2021-10-07 | 1 | -0/+3 |
| | |||||
* | `disallow-untyped-defs` for `synapse.state` (#11004) | David Robertson | 2021-10-06 | 1 | -0/+3 |
| | | | | | * `disallow-untyped-defs` for `synapse.state` Much smaller than I was expecting! | ||||
* | More types for synapse.util, part 1 (#10888) | David Robertson | 2021-10-06 | 1 | -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 Robertson | 2021-09-30 | 1 | -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 Robertson | 2021-09-24 | 1 | -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 Cloke | 2021-09-20 | 1 | -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 Cloke | 2021-09-15 | 1 | -0/+1 |
| | |||||
* | Add missing type hints to non-client REST servlets. (#10817) | Patrick Cloke | 2021-09-15 | 1 | -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) | reivilibre | 2021-09-14 | 1 | -0/+1 |
| | | | Also enables Mypy for related tests. | ||||
* | Add types to synapse.util. (#10601) | reivilibre | 2021-09-10 | 1 | -11/+64 |
| | |||||
* | Pull out encrypted_by_default tests from user_directory tests (#10752) | David Robertson | 2021-09-06 | 1 | -0/+1 |
| | |||||
* | Additional type hints for client REST servlets (part 5) (#10736) | Patrick Cloke | 2021-09-03 | 1 | -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 develop | Richard van der Hoff | 2021-08-27 | 1 | -0/+1 |
|\ | |||||
| * | Fix incompatibility with Twisted < 21. (#10713) | Richard van der Hoff | 2021-08-27 | 1 | -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 Cloke | 2021-08-24 | 1 | -0/+1 |
| | | |||||
* | | Flatten tests/rest/client/{v1,v2_alpha} too (#10667) | David Robertson | 2021-08-20 | 1 | -2/+2 |
| | | |||||
* | | Do not include rooms with an unknown room version in a sync response. (#10644) | Patrick Cloke | 2021-08-19 | 1 | -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 Klimpel | 2021-08-18 | 1 | -0/+3 |
|/ | |||||
* | Experimental support for MSC3266 Room Summary API. (#10394) | Michael Telatynski | 2021-08-16 | 1 | -1/+1 |
| | |||||
* | Fix type hints in space summary tests. (#10575) | Patrick Cloke | 2021-08-11 | 1 | -0/+1 |
| | | | And ensure that the file is checked via mypy. | ||||
* | Add type hints and comments to event auth code. (#10393) | Patrick Cloke | 2021-07-14 | 1 | -0/+1 |
| | |||||
* | Add support for evicting cache entries based on last access time. (#10205) | Erik Johnston | 2021-07-05 | 1 | -0/+1 |
| | |||||
* | Remove support for ACME v1 (#10194) | Brendan Abolivier | 2021-06-17 | 1 | -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 Cloke | 2021-06-08 | 1 | -0/+1 |
| | |||||
* | Enable Prometheus metrics for the jaeger client library (#10112) | Richard van der Hoff | 2021-06-04 | 1 | -1/+1 |
| | |||||
* | Add missing type hints to synapse.util (#9982) | Patrick Cloke | 2021-05-24 | 1 | -0/+9 |
| | |||||
* | Use ijson to parse the response to `/send_join`, reducing memory usage. (#9958) | Erik Johnston | 2021-05-20 | 1 | -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 Johnston | 2021-05-05 | 1 | -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 Morgan | 2021-04-27 | 1 | -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 Jong | 2021-04-05 | 1 | -0/+1 |
| | |||||
* | Make it possible to use dmypy (#9692) | Erik Johnston | 2021-03-26 | 1 | -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 Cloke | 2021-03-24 | 1 | -1/+4 |
| | |||||
* | Do not ignore the unpaddedbase64 module when type checking. (#9568) | Patrick Cloke | 2021-03-09 | 1 | -3/+0 |
| | |||||
* | Record the SSO Auth Provider in the login token (#9510) | Richard van der Hoff | 2021-03-04 | 1 | -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 Cloke | 2021-02-17 | 1 | -0/+1 |
| | |||||
* | Add type hints to E2E handler. (#9232) | Patrick Cloke | 2021-01-28 | 1 | -41/+1 |
| | | | This finishes adding type hints to the `synapse.handlers` module. | ||||
* | Add type hints to various handlers. (#9223) | Patrick Cloke | 2021-01-26 | 1 | -0/+14 |
| | | | | With this change all handlers except the e2e_* ones have type hints enabled. | ||||
* | Support icons for Identity Providers (#9154) | Richard van der Hoff | 2021-01-20 | 1 | -0/+1 |
| | |||||
* | Fix type hints in test_login.py | Richard van der Hoff | 2021-01-07 | 1 | -0/+1 |
| | |||||
* | Add type hints to the receipts and user directory handlers. (#8976) | Patrick Cloke | 2021-01-04 | 1 | -0/+2 |
| | |||||
* | Add type hints to the crypto module. (#8999) | Patrick Cloke | 2021-01-04 | 1 | -0/+2 |
| | |||||
* | Add additional type hints to the storage module. (#8980) | Patrick Cloke | 2020-12-30 | 1 | -0/+10 |
| | |||||
* | Add type hints to admin and room list handlers. (#8973) | Patrick Cloke | 2020-12-29 | 1 | -0/+5 |
| | |||||
* | Clean up tox.ini (#8963) | Richard van der Hoff | 2020-12-17 | 1 | -0/+5 |
| | | | ... and disable coverage tracking for mypy and friends. | ||||
* | Convert internal pusher dicts to attrs classes. (#8940) | Patrick Cloke | 2020-12-16 | 1 | -0/+1 |
| | | | This improves type hinting and should use less memory. | ||||
* | Add type hints to the push module. (#8901) | Patrick Cloke | 2020-12-11 | 1 | -6/+1 |
| | |||||
* | Simplify the flow for SSO UIA (#8881) | Richard van der Hoff | 2020-12-08 | 1 | -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 Cloke | 2020-12-07 | 1 | -0/+3 |
| | |||||
* | Add type hints to the push mailer module. (#8882) | Patrick Cloke | 2020-12-07 | 1 | -0/+1 |
| | |||||
* | Add some tests for `password_auth_providers` (#8819) | Richard van der Hoff | 2020-12-01 | 1 | -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 Cloke | 2020-11-25 | 1 | -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 Cloke | 2020-11-25 | 1 | -0/+2 |
| | |||||
* | Add a script to sign arbitrary json objects. (#8772) | Richard van der Hoff | 2020-11-24 | 1 | -0/+1 |
| | |||||
* | Properly report user-agent/IP during registration of SSO users. (#8784) | Patrick Cloke | 2020-11-23 | 1 | -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 Johnston | 2020-11-03 | 1 | -0/+1 |
| | | | Fixes #4042 | ||||
* | Add type hints to application services. (#8655) | Patrick Cloke | 2020-10-28 | 1 | -0/+4 |
| | |||||
* | Add type hints for account validity handler (#8620) | Patrick Cloke | 2020-10-26 | 1 | -0/+1 |
| | | | This also fixes a bug by fixing handling of an account which doesn't expire. | ||||
* | Type hints for RegistrationStore (#8615) | Erik Johnston | 2020-10-22 | 1 | -0/+1 |
| | |||||
* | Add type hints to profile and base handlers. (#8609) | Patrick Cloke | 2020-10-21 | 1 | -1/+3 |
| | |||||
* | Send some ephemeral events to appservices (#8437) | Will Hunt | 2020-10-15 | 1 | -0/+1 |
| | | | Optionally sends typing, presence, and read receipt information to appservices. | ||||
* | Enable mypy for synapse.util.caches (#8547) | Richard van der Hoff | 2020-10-15 | 1 | -3/+1 |
| | | | This seemed to entail dragging in a type stub for SortedList. | ||||
* | Add type hints to response cache. (#8507) | Patrick Cloke | 2020-10-09 | 1 | -0/+1 |
| | |||||
* | Add type hints to some handlers (#8505) | Patrick Cloke | 2020-10-09 | 1 | -0/+5 |
| | |||||
* | Add typing information to the device handler. (#8407) | Patrick Cloke | 2020-10-07 | 1 | -0/+1 |
| | |||||
* | Add unit test for event persister sharding (#8433) | Erik Johnston | 2020-10-02 | 1 | -0/+3 |
| | |||||
* | Enable mypy checking for unreachable code and fix instances. (#8432) | Patrick Cloke | 2020-10-01 | 1 | -0/+1 |
| | |||||
* | Make `StreamToken.room_key` be a `RoomStreamToken` instance. (#8281) | Erik Johnston | 2020-09-11 | 1 | -0/+2 |
| | |||||
* | Add types to async_helpers (#8260) | Patrick Cloke | 2020-09-08 | 1 | -1/+2 |
| | |||||
* | Add type hints to more handlers (#8244) | Erik Johnston | 2020-09-03 | 1 | -0/+3 |
| | |||||
* | Fix typing for `@cached` wrapped functions (#8240) | Erik Johnston | 2020-09-03 | 1 | -1/+2 |
| | | | This requires adding a mypy plugin to fiddle with the type signatures a bit. | ||||
* | Add StreamStore to mypy (#8232) | Erik Johnston | 2020-09-02 | 1 | -0/+1 |
| | |||||
* | Convert the well known resolver to async (#8214) | Patrick Cloke | 2020-09-01 | 1 | -0/+1 |
| | |||||
* | Allow running mypy directly. (#8175) | Patrick Cloke | 2020-08-26 | 1 | -0/+49 |
| | |||||
* | Add type hints to handlers.message and events.builder (#8067) | Erik Johnston | 2020-08-12 | 1 | -0/+3 |
| | |||||
* | Add support for using rust-python-jaeger-reporter (#7697) | Erik Johnston | 2020-06-17 | 1 | -0/+3 |
| | |||||
* | Implement OpenID Connect-based login (#7256) | Quentin Gliech | 2020-05-08 | 1 | -0/+3 |
| | |||||
* | Fixup synapse.rest to pass mypy (#6732) | Erik Johnston | 2020-01-20 | 1 | -0/+9 |
| | |||||
* | Fixup synapse.api to pass mypy (#6733) | Erik Johnston | 2020-01-20 | 1 | -0/+3 |
| | |||||
* | Silence mypy errors for files outside those specified | Erik Johnston | 2019-12-10 | 1 | -1/+1 |
| | |||||
* | Update black to 19.10b0 (#6304) | Amber Brown | 2019-11-01 | 1 | -4/+7 |
| | | | * update version of black and also fix the mypy config being overridden | ||||
* | Refactor HomeserverConfig so it can be typechecked (#6137) | Amber Brown | 2019-10-10 | 1 | -4/+12 |
| | |||||
* | Fix for structured logging tests stomping on logs (#6023) | Amber Brown | 2019-09-13 | 1 | -0/+54 |