Removed "is not None"
https://stackoverflow.com/users/566644/lauritz-v-thaulow freqtrade\configuration\configuration.py:461 reduced checks freqtrade\persistence\trade_model.py:fee_updated - reduced code
This commit is contained in:
@@ -210,8 +210,8 @@ class IResolver:
|
||||
for obj in cls._get_valid_object(module_path, object_name=None,
|
||||
enum_failed=enum_failed):
|
||||
objects.append(
|
||||
{'name': obj[0].__name__ if obj is not None else '',
|
||||
'class': obj[0] if obj is not None else None,
|
||||
{'name': obj[0].__name__ if obj else '',
|
||||
'class': obj[0] if obj else None,
|
||||
'location': entry,
|
||||
})
|
||||
return objects
|
||||
|
||||
@@ -128,10 +128,10 @@ class StrategyResolver(IResolver):
|
||||
elif hasattr(strategy, attribute):
|
||||
val = getattr(strategy, attribute)
|
||||
# None's cannot exist in the config, so do not copy them
|
||||
if val is not None:
|
||||
if val:
|
||||
config[attribute] = val
|
||||
# Explicitly check for None here as other "falsy" values are possible
|
||||
elif default is not None:
|
||||
elif default:
|
||||
setattr(strategy, attribute, default)
|
||||
config[attribute] = default
|
||||
|
||||
|
||||
Reference in New Issue
Block a user