diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-08-15 08:11:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-15 08:11:20 -0400 |
commit | ad3f43be9a597dd4fdf59e0a95e4630e7b9502fe (patch) | |
tree | 40f2e27daf4feed7b525938fa5a45d99a34ca9d9 /synapse/__init__.py | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-ad3f43be9a597dd4fdf59e0a95e4630e7b9502fe.tar.xz |
Run pyupgrade for python 3.7 & 3.8. (#16110)
Diffstat (limited to 'synapse/__init__.py')
-rw-r--r-- | synapse/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py index 6c1801862b..2f9c22a833 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -25,7 +25,11 @@ from synapse.util.rust import check_rust_lib_up_to_date from synapse.util.stringutils import strtobool # Check that we're not running on an unsupported Python version. -if sys.version_info < (3, 8): +# +# Note that we use an (unneeded) variable here so that pyupgrade doesn't nuke the +# if-statement completely. +py_version = sys.version_info +if py_version < (3, 8): print("Synapse requires Python 3.8 or above.") sys.exit(1) @@ -78,7 +82,7 @@ try: except ImportError: pass -import synapse.util +import synapse.util # noqa: E402 __version__ = synapse.util.SYNAPSE_VERSION |