Add some typing to Endpoint.respec()

This commit is contained in:
Tristan Partin
2024-07-15 10:35:49 -05:00
committed by Tristan Partin
parent b197cc20fc
commit 7cf59ae5b4

View File

@@ -3785,12 +3785,12 @@ class Endpoint(PgProtocol, LogUtils):
self.endpoint_id, self.tenant_id, pageserver_id, self.active_safekeepers
)
def respec(self, **kwargs):
def respec(self, **kwargs: Any) -> None:
"""Update the endpoint.json file used by control_plane."""
# Read config
config_path = os.path.join(self.endpoint_path(), "endpoint.json")
with open(config_path, "r") as f:
data_dict = json.load(f)
data_dict: dict[str, Any] = json.load(f)
# Write it back updated
with open(config_path, "w") as file: