Skip to content

Commit 48977ef

Browse files
committed
Auto unsafe fixes
1 parent aaac5e2 commit 48977ef

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

contentctl/actions/detection_testing/DetectionTestingManager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def sigint_handler(signum, frame):
8282
# Wait for all instances to be set up
8383
for future in concurrent.futures.as_completed(future_instances_setup):
8484
try:
85-
result = future.result()
85+
future.result()
8686
except Exception as e:
8787
self.output_dto.terminate = True
8888
print(f"Error setting up container: {str(e)}")
@@ -97,7 +97,7 @@ def sigint_handler(signum, frame):
9797
# Wait for execution to finish
9898
for future in concurrent.futures.as_completed(future_instances_execute):
9999
try:
100-
result = future.result()
100+
future.result()
101101
except Exception as e:
102102
self.output_dto.terminate = True
103103
print(f"Error running in container: {str(e)}")
@@ -110,14 +110,14 @@ def sigint_handler(signum, frame):
110110
}
111111
for future in concurrent.futures.as_completed(future_views_shutdowner):
112112
try:
113-
result = future.result()
113+
future.result()
114114
except Exception as e:
115115
print(f"Error stopping view: {str(e)}")
116116

117117
# Wait for original view-related threads to complete
118118
for future in concurrent.futures.as_completed(future_views):
119119
try:
120-
result = future.result()
120+
future.result()
121121
except Exception as e:
122122
print(f"Error running container: {str(e)}")
123123

contentctl/actions/detection_testing/views/DetectionTestingViewCLI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def setup(self):
3838
miniters=0,
3939
mininterval=0,
4040
)
41-
fmt = self.format_pbar(
41+
self.format_pbar(
4242
len(self.sync_obj.outputQueue), len(self.sync_obj.inputQueue)
4343
)
4444

contentctl/helper/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def validate_git_hash(
141141
# Note, of course, that a hash can be in 0, 1, more branches!
142142
for branch_string in all_branches_containing_hash:
143143
if branch_string.split(" ")[0] == "*" and (
144-
branch_string.split(" ")[-1] == branch_name or branch_name == None
144+
branch_string.split(" ")[-1] == branch_name or branch_name is None
145145
):
146146
# Yes, the hash exists in the branch (or branch_name was None and it existed in at least one branch)!
147147
return True
@@ -376,7 +376,7 @@ def download_file_from_http(
376376
)
377377

378378
try:
379-
download_start_time = default_timer()
379+
default_timer()
380380
bytes_written = 0
381381
file_to_download = requests.get(file_path, stream=True)
382382
file_to_download.raise_for_status()

contentctl/input/yml_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def load_file(file_path: pathlib.Path, add_fields:bool=True, STRICT_YML_CHECKING
4242
print(exc)
4343
sys.exit(1)
4444

45-
if add_fields == False:
45+
if add_fields is False:
4646
return yml_obj
4747

4848

contentctl/output/conf_output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def writeHeaders(self) -> set[pathlib.Path]:
5353

5454
#The contents of app.manifest are not a conf file, but json.
5555
#DO NOT write a header for this file type, simply create the file
56-
with open(self.config.getPackageDirectoryPath() / pathlib.Path('app.manifest'), 'w') as f:
56+
with open(self.config.getPackageDirectoryPath() / pathlib.Path('app.manifest'), 'w'):
5757
pass
5858

5959

0 commit comments

Comments
 (0)