mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-20 21:43:58 +01:00
Remove unused type-ignores (#14433)
* Remove unused type-ignores Oversights in #14427 and #14429. * Changelog
This commit is contained in:
parent
fb66fae84b
commit
2cc592584a
3 changed files with 8 additions and 6 deletions
1
changelog.d/14433.misc
Normal file
1
changelog.d/14433.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix mypy errors introduced by bumping the locked version of `attrs` and `gitpython`.
|
|
@ -219,9 +219,7 @@ def _prepare() -> None:
|
||||||
update_branch(repo)
|
update_branch(repo)
|
||||||
|
|
||||||
# Create the new release branch
|
# Create the new release branch
|
||||||
# Type ignore will no longer be needed after GitPython 3.1.28.
|
repo.create_head(release_branch_name, commit=base_branch)
|
||||||
# See https://github.com/gitpython-developers/GitPython/pull/1419
|
|
||||||
repo.create_head(release_branch_name, commit=base_branch) # type: ignore[arg-type]
|
|
||||||
|
|
||||||
# Special-case SyTest: we don't actually prepare any files so we may
|
# Special-case SyTest: we don't actually prepare any files so we may
|
||||||
# as well push it now (and only when we create a release branch;
|
# as well push it now (and only when we create a release branch;
|
||||||
|
|
|
@ -45,9 +45,12 @@ class _EventSourcesInner:
|
||||||
class EventSources:
|
class EventSources:
|
||||||
def __init__(self, hs: "HomeServer"):
|
def __init__(self, hs: "HomeServer"):
|
||||||
self.sources = _EventSourcesInner(
|
self.sources = _EventSourcesInner(
|
||||||
# mypy thinks attribute.type is `Optional`, but we know it's never `None` here since
|
# mypy previously warned that attribute.type is `Optional`, but we know it's
|
||||||
# all the attributes of `_EventSourcesInner` are annotated.
|
# never `None` here since all the attributes of `_EventSourcesInner` are
|
||||||
*(attribute.type(hs) for attribute in attr.fields(_EventSourcesInner)) # type: ignore[misc]
|
# annotated.
|
||||||
|
# As of the stubs in attrs 22.1.0, `attr.fields()` now returns Any,
|
||||||
|
# so the call to `attribute.type` is not checked.
|
||||||
|
*(attribute.type(hs) for attribute in attr.fields(_EventSourcesInner))
|
||||||
)
|
)
|
||||||
self.store = hs.get_datastores().main
|
self.store = hs.get_datastores().main
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue