1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-03-24 08:36:42 +00:00
Commit graph

22 commits

Author SHA1 Message Date
Colin Watson
d69c00b5a1
Stop using twisted.internet.defer.returnValue ()
`defer.returnValue` was only needed in Python 2; in Python 3, a simple
`return` is fine.

`twisted.internet.defer.returnValue` is deprecated as of Twisted 24.7.0.

Most uses of `returnValue` in synapse were removed a while back; this
cleans up some remaining bits.
2024-12-20 10:57:59 +00:00
Quentin Gliech
7d52ce7d4b
Format files with Ruff ()
I thought ruff check would also format, but it doesn't.

This runs ruff format in CI and dev scripts. The first commit is just a
run of `ruff format .` in the root directory.
2024-09-02 12:39:04 +01:00
Erik Johnston
23740eaa3d
Correctly mention previous copyright ()
During the migration the automated script to update the copyright
headers accidentally got rid of some of the existing copyright lines.
Reinstate them.
2024-01-23 11:26:48 +00:00
Patrick Cloke
8e1e62c9e0 Update license headers 2023-11-21 15:29:58 -05:00
Patrick Cloke
aa483cb4c9
Update ruff config ()
Enable additional checks & clean-up unneeded configuration.
2023-09-08 11:24:36 -04:00
Patrick Cloke
ad3f43be9a
Run pyupgrade for python 3.7 & 3.8. () 2023-08-15 08:11:20 -04:00
Jacek Kuśnierz
88193f2125
Remove direct refeferences to PyNaCl (use signedjson instead). () 2022-06-01 07:32:35 -04:00
Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ()
Part of 

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
Jonathan de Jong
2ca4e349e9
Bugbear: Add Mutable Parameter fixes ()
Part of 

Adds in fixes for B006 and B008, both relating to mutable parameter lint errors.

Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
2021-04-08 22:38:54 +01:00
Eric Eastwood
0a00b7ff14
Update black, and run auto formatting over the codebase ()
- 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
Jonathan de Jong
837293c314
Remove obsolete __future__ imports () 2020-09-17 08:37:01 -04:00
Patrick Cloke
c619253db8
Stop sub-classing object () 2020-09-04 06:54:56 -04:00
Patrick Cloke
c978f6c451
Convert federation client to async/await. () 2020-07-30 08:01:33 -04:00
Andrew Morgan
b7ddece2a6
Lint the contrib/ directory in CI and linting scripts, add synctl to linting script ()
Run `isort`, `flake8` and `black` over the `contrib/` directory and `synctl` script. The latter was already being done in CI, but now the linting script does it too.

Fixes https://github.com/matrix-org/synapse/issues/7910
2020-07-20 21:43:49 +01:00
Andrew Morgan
0c0b82b6d1
Allow Synapse to send registration emails + choose Synapse or an external server to handle 3pid validation ()
This is a combination of a few different PRs, finally all being merged into `develop`:

*  
*  
*  (This one added the `/versions` flag but the flag itself was actually [backed out](891afb57cb (diff-e591d42d30690ffb79f63bb726200891)) in . What's left is just giving /versions access to the config file, which could be useful in the future)
*  
*  
* 

Clients should not actually use the new registration functionality until https://github.com/matrix-org/synapse/pull/5972 is merged.

UPGRADE.rst, changelog entries and config file changes should all be reviewed closely before this PR is merged.
2019-09-06 11:35:28 +01:00
Andrew Morgan
a0d294c306
Switch to using v2 Identity Service APIs other than lookup (MSC 2140) () 2019-09-05 14:31:22 +01:00
Amber Brown
32e7c9e7f2
Run Black. () 2019-06-20 19:32:02 +10:00
cclauss
82d9d524bd Fix seven contrib files with Python syntax errors ()
* Fix seven contrib files with Python syntax errors

Signed-off-by: cclauss <cclauss@me.com>
2019-06-18 03:21:30 +10:00
Richard van der Hoff
4903ccf159 Fix some lies, and other clarifications, in docstrings
The documentation on get_json has been wrong ever since the very first commit
to synapse...
2017-04-21 01:31:09 +01:00
Andrew Shadura
6a3743b0d4
Use signedjson.sign instead of syutil.crypto.jsonsign
Functions from syutil.crypto.jsonsign are now available in
signedjson, so use that instead of depending on syutil.

Signed-off-by: Andrew Shadura <andrew@shadura.me>
2017-02-13 11:31:22 +01:00
Matthew Hodgson
6c28ac260c copyrights 2016-01-07 04:26:29 +00:00
Mark Haines
d3d0713de5 Move experiments, graph and cmdclient into contrib 2015-01-22 11:57:54 +00:00