Replace type(1) == int
with isinstance(1, int)
(#4217)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
committed by
GitHub
parent
ff5fa57415
commit
7dcdca3bf4
@ -791,7 +791,7 @@ class SettingsManager(dict):
|
||||
|
||||
self.load()
|
||||
correct_keys = self.keys() == self.defaults.keys()
|
||||
correct_types = all(type(a) == type(b) for a, b in zip(self.values(), self.defaults.values()))
|
||||
correct_types = all(type(a) is type(b) for a, b in zip(self.values(), self.defaults.values()))
|
||||
correct_version = check_version(self['settings_version'], self.version)
|
||||
if not (correct_keys and correct_types and correct_version):
|
||||
LOGGER.warning(
|
||||
|
Reference in New Issue
Block a user