Showing 212 of 220 total issues
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert classify_result.contain(to_stage), f"no stage {to_stage} found in result"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert max_retry != 0, f"fail to get range dynamically: {stable_num_limit}"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert ret, f"read frame failed, frame id: {frame_id}"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert os.path.isfile(model_path), f"model file {model_path} not existed"
# assert model data is empty
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert os.path.isfile(img_path), f"file {img_path} is not existed"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert self.data, "load_frames() first"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert not output_path.is_file(), f"file {output_path} already existed"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert p.is_dir(), f"{p} is not a valid directory"
# validate: at least two classes
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
number_of_dir > 1
), f"dataset only contains one class. maybe some path errors happened: {p}?"
# more than 6 classes?
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert os.path.isfile(from_file), f"file {from_file} not existed"
- Exclude checks
subprocess call - check for execution of untrusted input. Open
Open
return subprocess.check_call(command)
- Exclude checks
Remove this commented out code. Open
Open
# model = Sequential()
- Read upRead up
- Exclude checks
Programmers should not comment out code as it bloats programs and reduces readability.
Unused code should be deleted and can be retrieved from source control history if required.
See
- MISRA C:2004, 2.4 - Sections of code should not be "commented out".
- MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
- MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
- MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"