Skip to content

Commit 7476eea

Browse files
committed
Format.
1 parent a95052a commit 7476eea

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/managers/config.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ def render_cassandra_config(
6464
seeds=seeds or self.seeds,
6565
),
6666
self._cassandra_authentication_config(
67-
authentication
68-
if authentication is not None
69-
else self.authentication
67+
authentication if authentication is not None else self.authentication
7068
),
7169
self._cassandra_peer_tls_config(
7270
enabled=enable_peer_tls
@@ -95,12 +93,8 @@ def render_env(self, cassandra_limit_memory_mb: int | None) -> None:
9593
self._render_env(
9694
self._merge_dicts(
9795
[
98-
self._map_env(
99-
self.workload.cassandra_paths.env.read_text().split("\n")
100-
),
101-
self._env_heap_config(
102-
cassandra_limit_memory_mb=cassandra_limit_memory_mb
103-
),
96+
self._map_env(self.workload.cassandra_paths.env.read_text().split("\n")),
97+
self._env_heap_config(cassandra_limit_memory_mb=cassandra_limit_memory_mb),
10498
self._env_jmx_exporter_config(
10599
self.workload.cassandra_paths.jmx_exporter.as_posix(),
106100
self.workload.cassandra_paths.jmx_exporter_config.as_posix(),
@@ -138,9 +132,7 @@ def _env_heap_config(cassandra_limit_memory_mb: int | None) -> dict[str, str]:
138132
if cassandra_limit_memory_mb is not None and cassandra_limit_memory_mb < 1024:
139133
raise ValueError("cassandra_limit_memory_mb should be at least 1024")
140134
return {
141-
"MAX_HEAP_SIZE": f"{cassandra_limit_memory_mb}M"
142-
if cassandra_limit_memory_mb
143-
else "",
135+
"MAX_HEAP_SIZE": f"{cassandra_limit_memory_mb}M" if cassandra_limit_memory_mb else "",
144136
"HEAP_NEWSIZE": f"{cassandra_limit_memory_mb // 2}M"
145137
if cassandra_limit_memory_mb
146138
else "",
@@ -216,9 +208,7 @@ def _cassandra_peer_tls_config(
216208
@staticmethod
217209
def _cassandra_authentication_config(enabled: bool) -> dict[str, Any]:
218210
return {
219-
"authenticator": "PasswordAuthenticator"
220-
if enabled
221-
else "AllowAllAuthenticator",
211+
"authenticator": "PasswordAuthenticator" if enabled else "AllowAllAuthenticator",
222212
}
223213

224214
@staticmethod

0 commit comments

Comments
 (0)