David Robertson
e0f11ae4a5
disallow-untyped-defs for synapse.push ( #11023 )
2021-10-11 17:42:10 +01:00
Patrick Cloke
f4b1a9a527
Require direct references to configuration variables. ( #10985 )
...
This removes the magic allowing accessing configurable
variables directly from the config object. It is now required
that a specific configuration class is used (e.g. `config.foo`
must be replaced with `config.server.foo`).
2021-10-06 10:47:41 -04:00
Jonathan de Jong
bdfde6dca1
Use inline type hints in `http/federation/`, `storage/` and `util/` ( #10381 )
2021-07-15 12:46:54 -04:00
Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ( #9786 )
...
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>`
2021-04-14 15:34:27 +01:00
Eric Eastwood
0a00b7ff14
Update black, and run auto formatting over the codebase ( #9381 )
...
- Update black version to the latest
- Run black auto formatting over the codebase
- Run autoformatting according to [`docs/code_style.md
`](80d6dc9783/docs/code_style.md
)
- Update `code_style.md` docs around installing black to use the correct version
2021-02-16 22:32:34 +00:00
Erik Johnston
cbabb312e0
Use `async with` for ID gens ( #8383 )
...
This will allow us to hit the DB after we've finished using the generated stream ID.
2020-09-23 16:11:18 +01:00
Patrick Cloke
8a4a4186de
Simplify super() calls to Python 3 syntax. ( #8344 )
...
This converts calls like super(Foo, self) -> super().
Generated with:
sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
2020-09-18 09:56:44 -04:00
Jonathan de Jong
a3f124b821
Switch metaclass initialization to python 3-compatible syntax ( #8326 )
2020-09-16 15:15:55 -04:00
reivilibre
a5370072b5
Don't remember `enabled` of deleted push rules and properly return 404 for missing push rules in `.../actions` and `.../enabled` ( #7796 )
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2020-09-09 11:39:39 +01:00
Patrick Cloke
da77520cd1
Convert additional databases to async/await part 2 ( #8200 )
2020-09-01 08:39:04 -04:00
Erik Johnston
2231dffee6
Make StreamIdGen `get_next` and `get_next_mult` async ( #8161 )
...
This is mainly so that `StreamIdGenerator` and `MultiWriterIdGenerator`
will have the same interface, allowing them to be used interchangeably.
2020-08-25 15:10:08 +01:00
Erik Johnston
c9c544cda5
Remove `ChainedIdGenerator`. ( #8123 )
...
It's just a thin wrapper around two ID gens to make `get_current_token`
and `get_next` return tuples. This can easily be replaced by calling the
appropriate methods on the underlying ID gens directly.
2020-08-19 13:41:51 +01:00
Patrick Cloke
b069b78bb4
Convert pusher databases to async/await. ( #8075 )
2020-08-14 10:30:16 -04:00
Patrick Cloke
894dae74fe
Convert misc database code to async ( #8087 )
2020-08-14 07:24:26 -04:00
Patrick Cloke
fbe930dad2
Convert the roommember database to async/await. ( #8070 )
2020-08-12 12:14:34 -04:00
Brendan Abolivier
cdbb8e6d6e
Implement new experimental push rules ( #7997 )
...
With an undocumented configuration setting to enable them for specific users.
2020-08-10 11:48:01 +01:00
David Vo
4dd27e6d11
Reduce unnecessary whitespace in JSON. ( #7372 )
2020-08-07 08:02:55 -04:00
Brendan Abolivier
118a9eafb3
Merge branch 'develop' of github.com:matrix-org/synapse into babolivier/new_push_rules
2020-08-06 10:52:50 +01:00
Erik Johnston
a7bdf98d01
Rename database classes to make some sense ( #8033 )
2020-08-05 21:38:57 +01:00