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 (
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 image_path or (
image_object is not None
), "should fill image_path or image_object"
- 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 max_retry != 0, f"fail to get range dynamically: {stable_num_limit}"
- Exclude checks
Consider possible security implications associated with pickle module. Open
Open
import pickle
- 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 self._model, "model is empty"
- 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 (boost_mode and valid_range) or (
not (boost_mode or valid_range)
), "boost_mode required valid_range"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert os.path.isfile(template), f"image {template} not existed"
- 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
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
salt = random.randint(10, 99)
- Exclude checks
subprocess call - check for execution of untrusted input. Open
Open
return subprocess.check_call(command)
- 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 self.can_merge(another, **kwargs)
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert not os.path.exists(json_path), f"{json_path} already existed"
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert number_of_dir <= self.MODEL_DENSE, (
f"dataset has {number_of_dir} classes (more than " + str(self.MODEL_DENSE) + "), please see "
- Exclude checks
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Open
Open
assert 0.0 < threshold < 1.0, "threshold out of range"
- 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 (
number_of_dir > 1
), f"dataset only contains one class. maybe some path errors happened: {p}?"
# more than 6 classes?
- Exclude checks