summary refs log tree commit diff
path: root/scripts-dev
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-12-12 21:25:07 +0000
committerGitHub <noreply@github.com>2022-12-12 21:25:07 +0000
commit3d87847ecc943c689c4587c5327d744e4a8f92c2 (patch)
tree376b5e4eecb94e0fe75272cf78be7235f307d54a /scripts-dev
parentFix missing cache invalidation in application service code (#14670) (diff)
downloadsynapse-3d87847ecc943c689c4587c5327d744e4a8f92c2.tar.xz
Enable `--warn-redundant-casts` option in mypy (#14671)
* 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>
Diffstat (limited to 'scripts-dev')
-rwxr-xr-xscripts-dev/release.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts-dev/release.py b/scripts-dev/release.py
index bf47b6c713..6974fd7895 100755
--- a/scripts-dev/release.py
+++ b/scripts-dev/release.py
@@ -27,7 +27,7 @@ import time
 import urllib.request
 from os import path
 from tempfile import TemporaryDirectory
-from typing import Any, List, Optional, cast
+from typing import Any, List, Optional
 
 import attr
 import click
@@ -174,9 +174,7 @@ def _prepare() -> None:
         click.get_current_context().abort()
 
     # Switch to the release branch.
-    # Cast safety: parse() won't return a version.LegacyVersion from our
-    # version string format.
-    parsed_new_version = cast(version.Version, version.parse(new_version))
+    parsed_new_version = version.parse(new_version)
 
     # We assume for debian changelogs that we only do RCs or full releases.
     assert not parsed_new_version.is_devrelease