Skip to content

Commit

Permalink
CH-59 Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
condar-metacell committed Sep 27, 2024
1 parent 0dfd8c8 commit 09d9842
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from cloudharness.middleware import set_authentication_token
from django.http.request import HttpRequest


class CloudharnessMiddleware:
def __init__(self, get_response):
self.get_response = get_response
Expand Down
2 changes: 1 addition & 1 deletion tools/deployment-cli-tools/ch_cli_tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def replace_value(value: Any) -> Any:
if isinstance(value, dict):
return replace_in_dict(value, source, replacement)
return value

return {
key: replace_value(value)
for key, value in src_dict.items()
Expand Down
6 changes: 3 additions & 3 deletions tools/deployment-cli-tools/harness-application
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def handle_server_template(app_path: str) -> None:


def handle_flask_server_template(app_path: str) -> None:
generate_server(app_path)
generate_server(app_path)


def handle_django_app_template(app_name: str, app_path: str) -> None:
Expand Down Expand Up @@ -177,7 +177,7 @@ def create_django_app_vscode_debug_configuration(app_name: str):
vscode_launch_path.parent.mkdir(parents=True, exist_ok=True)
with vscode_launch_path.open('w') as f:
json.dump(launch_config, f, indent=2, sort_keys=True)


def merge_template_directories(template_name: str, app_path: str) -> None:
for base_path in (CH_ROOT, os.getcwd()):
Expand All @@ -187,4 +187,4 @@ def merge_template_directories(template_name: str, app_path: str) -> None:


if __name__ == "__main__":
main()
main()
5 changes: 2 additions & 3 deletions tools/deployment-cli-tools/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_does_not_replace_in_keys(_):
new_dict = replace_in_dict(src_dict, 'foo', 'xxx')

assert new_dict.keys() == src_dict.keys()

def test_replaces_in_values(_):
src_dict = {
'a': 'foo',
Expand Down Expand Up @@ -130,7 +130,6 @@ def test_replaces_in_values_within_lists(_):

assert new_dict['a'] == ['xxx', 'bar', 'baz', 3, 'xxxbar']


def test_replaces_in_values_within_nested_dict(_):
src_dict = {
'a': {
Expand All @@ -148,4 +147,4 @@ def test_replaces_in_values_within_nested_dict(_):
'b': 'bar',
'c': 'xxxbar',
'e': ['xxx', 'bar', 'xxxbar']
}
}

0 comments on commit 09d9842

Please sign in to comment.