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 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 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 model_path.is_file(), f"file {model_path} not existed"
- Exclude checks
Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue. Open
Open
self._model = pickle.load(f)
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert len(stable_num_limit) == 2, "num_limit should be something like [1, 3]"
- Exclude checks
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 (
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 config_path.as_posix().endswith(
".json"
), "config file should be json format"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert config_path.is_file(), f"no config file found in {config_path}"
# todo: support different types in the future
- 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 self._model, "model is empty"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert (
len(train_label) > 1
), f"seems only one class in the training dataset, at least two classes are required: {train_label}"
- 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 not os.path.isfile(json_path), f"{json_path} already existed"
- Exclude checks
Consider possible security implications associated with subprocess module. Open
Open
import subprocess
- 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(from_file), f"file {from_file} 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 self._model, "model is empty"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert image_path or (
image_object is not None
), "should fill image_path or image_object"
- Exclude checks