summary refs log tree commit diff
path: root/scripts-dev/mypy_synapse_plugin.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+1
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Update license headersPatrick Cloke2023-11-211-10/+16
|
* mypy plugin to check `@cached` return types (#14911)David Robertson2023-10-021-38/+251
| | | | | | | | Co-authored-by: David Robertson <davidr@element.io> Co-authored-by: Patrick Cloke <patrickc@matrix.org> Co-authored-by: Erik Johnston <erik@matrix.org> Assert that the return type of callables wrapped in @cached and @cachedList are cachable (aka immutable).
* Update ruff config (#16283)Patrick Cloke2023-09-081-3/+4
| | | Enable additional checks & clean-up unneeded configuration.
* Improve type hints for cached decorator. (#15658)Patrick Cloke2023-05-241-1/+33
| | | | | The cached decorators always return a Deferred, which was not properly propagated. It was close enough when wrapping coroutines, but failed if a bare function was wrapped.
* Add cache invalidation across workers to module API (#13667)Mathieu Velten2022-09-211-2/+2
| | | Signed-off-by: Mathieu Velten <mathieuv@matrix.org>
* allow `on_invalidate=None` in `@cached` methods (#12769)David Robertson2022-05-171-9/+16
|
* Make `scripts-dev` pass `mypy --disallow-untyped-defs` (#12356)David Robertson2022-04-271-2/+2
| | | Not enforced in config yet. One day.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-1/+3
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Add type hints to the push module. (#8901)Patrick Cloke2020-12-111-0/+2
|
* Fix cache call signature to accept `on_invalidate`. (#8684)Erik Johnston2020-10-291-11/+27
| | | Cached functions accept an `on_invalidate` function, which we failed to add to the type signature. It's rarely used in the files that we have typed, which is why we haven't noticed it before.
* Fix typing for `@cached` wrapped functions (#8240)Erik Johnston2020-09-031-0/+85
This requires adding a mypy plugin to fiddle with the type signatures a bit.