python/sepolgen: silence linter warning about has_key

flake8 warns about using has_key():

    python/sepolgen/src/sepolgen/refparser.py:315:15: W601 .has_key() is
    deprecated, use 'in'

However "spt.has_key(id)" uses function SupportMacros.has_key(), which
is not the same as the "in" operator. Silence this warning by using "#
noqa".

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2018-08-04 13:55:19 +02:00
parent 3d3c51d607
commit 20db6a5a73
No known key found for this signature in database
GPG Key ID: C191415F340DAAA0

View File

@ -312,7 +312,7 @@ def collect(stmts, parent, val=None):
def expand(ids, s):
for id in ids:
if spt.has_key(id):
if spt.has_key(id): # noqa
s.update(spt.by_name(id))
else:
s.add(id)