Skip to content

Commit a6fc4e1

Browse files
committed
make ruff happy
1 parent c3c9eb2 commit a6fc4e1

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

src/warnet/main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ def auth(kube_config: str) -> None:
154154
user_token = user["user"]["token"]
155155
content["contexts"][0]
156156
flatten_cmd = "kubectl config view --flatten"
157-
result_flatten = subprocess.run(flatten_cmd, shell=True, check=True, capture_output=True, text=True)
157+
result_flatten = subprocess.run(
158+
flatten_cmd, shell=True, check=True, capture_output=True, text=True
159+
)
158160
except subprocess.CalledProcessError as e:
159161
print("Error occurred while executing kubectl config view --flatten:")
160162
print(e.stderr)
@@ -171,7 +173,9 @@ def auth(kube_config: str) -> None:
171173

172174
try:
173175
update_cmd = f"kubectl config set-credentials {user_name} --token {user_token}"
174-
result_update = subprocess.run(update_cmd, shell=True, check=True, capture_output=True, text=True)
176+
result_update = subprocess.run(
177+
update_cmd, shell=True, check=True, capture_output=True, text=True
178+
)
175179
if result_update.returncode != 0:
176180
print("Could not update authorization file")
177181
print(result_flatten.stderr)

src/warnet/network.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,20 @@ def should_copy(item: Path) -> bool:
8888

8989
print(f"Finished copying files to {target_dir}")
9090

91+
9192
def copy_network_defaults(directory: Path):
9293
"""Create the project structure for a warnet project's network"""
9394
copy_defaults(directory, WAR_NETWORK_DIR, WAR_NETWORK_FILES.joinpath(), [])
9495

96+
9597
def copy_scenario_defaults(directory: Path):
9698
"""Create the project structure for a warnet project's scenarios"""
97-
copy_defaults(directory, WAR_SCENARIOS_DIR, WAR_SCENARIOS_FILES.joinpath(), ["__init__.py", "__pycache__", "commander.py"])
99+
copy_defaults(
100+
directory,
101+
WAR_SCENARIOS_DIR,
102+
WAR_SCENARIOS_FILES.joinpath(),
103+
["__init__.py", "__pycache__", "commander.py"],
104+
)
98105

99106

100107
@network.command()

0 commit comments

Comments
 (0)