Merge pull request #4564 from jacty/patch-1

Unnecessary update when value is None
This commit is contained in:
Andrey Rahmatullin 2020-08-10 16:14:42 +05:00 committed by GitHub
commit 702de0480b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,8 @@ class BaseSettings(MutableMapping):
def __init__(self, values=None, priority='project'):
self.frozen = False
self.attributes = {}
self.update(values, priority)
if values:
self.update(values, priority)
def __getitem__(self, opt_name):
if opt_name not in self: