-
Notifications
You must be signed in to change notification settings - Fork 395
No need to have version_string
as an argument since it's always the same
#19012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c7d0552
fd4af27
f140bc1
961b7ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Remove `version_string` argument from `HomeServer` since it's always the same. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -741,6 +741,7 @@ class SynapseSite(ProxySite): | |
|
||
def __init__( | ||
self, | ||
*, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made these keyword only arguments to make it easier to search and confirm what Additionally, a good idea because positional arguments are easy to mess up especially when there are multiple strings next to each other. |
||
logger_name: str, | ||
site_tag: str, | ||
config: ListenerConfig, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,6 +175,7 @@ | |
from synapse.streams.events import EventSources | ||
from synapse.synapse_rust.rendezvous import RendezvousHandler | ||
from synapse.types import DomainSpecificString, ISynapseReactor | ||
from synapse.util import SYNAPSE_VERSION | ||
from synapse.util.caches import CACHE_METRIC_REGISTRY | ||
from synapse.util.clock import Clock | ||
from synapse.util.distributor import Distributor | ||
|
@@ -322,7 +323,6 @@ def __init__( | |
hostname: str, | ||
config: HomeServerConfig, | ||
reactor: Optional[ISynapseReactor] = None, | ||
version_string: str = "Synapse", | ||
): | ||
""" | ||
Args: | ||
|
@@ -347,7 +347,7 @@ def __init__( | |
self._instance_id = random_string(5) | ||
self._instance_name = config.worker.instance_name | ||
|
||
self.version_string = version_string | ||
self.version_string = f"Synapse/{SYNAPSE_VERSION}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main change is consolidating everything to this assignment instead of this being passed in as an argument. |
||
|
||
self.datastores: Optional[Databases] = None | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are future TODO's (not for this PR)