pep8: Use "X not in Y" instead of "not X in Y"
flake8 --select E713, semi-manual fixing
This commit is contained in:
parent
31a96228db
commit
21e8f82fd7
57 changed files with 81 additions and 83 deletions
|
|
@ -392,7 +392,7 @@ class BaseObject(object):
|
|||
try:
|
||||
attr = (self._fields or {})[name]
|
||||
except KeyError:
|
||||
if not name in dir(self) and not name.startswith('_'):
|
||||
if name not in dir(self) and not name.startswith('_'):
|
||||
warnings.warn('Creating a non-field attribute %s. Please prefix it with _' % name,
|
||||
AttributeCreationWarning, stacklevel=2)
|
||||
object.__setattr__(self, name, value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue