Skip to content

Commit 7930a38

Browse files
committed
updated check_input_parameters_type
1 parent 45cb25d commit 7930a38

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ote_sdk/ote_sdk/utils/argument_checks.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def validate(*args, **kwargs):
231231
# Checking input parameters type
232232
for parameter_name in expected_types_map:
233233
parameter = input_parameters_values_map.get(parameter_name)
234-
if parameter is None:
234+
if parameter_name not in input_parameters_values_map:
235235
default_value = expected_types_map.get(parameter_name).default
236236
# pylint: disable=protected-access
237237
if default_value != inspect._empty: # type: ignore
@@ -268,7 +268,9 @@ def check_file_extension(
268268
def check_that_null_character_absents_in_string(parameter: str, parameter_name: str):
269269
"""Function raises ValueError exception if null character: '\0' is specified in path to file"""
270270
if "\0" in parameter:
271-
raise ValueError(f"null char \\0 is specified in {parameter_name}: {parameter}")
271+
raise ValueError(
272+
rf"null char \\0 is specified in {parameter_name}: {parameter}"
273+
)
272274

273275

274276
def check_that_file_exists(file_path: str, file_path_name: str):
@@ -295,7 +297,7 @@ def check_that_all_characters_printable(parameter, parameter_name, allow_crlf=Fa
295297
)
296298
if not all_characters_printable:
297299
raise ValueError(
298-
fr"parameter {parameter_name} has not printable symbols: {parameter}"
300+
rf"parameter {parameter_name} has not printable symbols: {parameter}"
299301
)
300302

301303

0 commit comments

Comments
 (0)