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@xxxxxxx> --- python/sepolgen/src/sepolgen/refparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sepolgen/src/sepolgen/refparser.py b/python/sepolgen/src/sepolgen/refparser.py index 3415aff9b48f..97e2342c4693 100644 --- a/python/sepolgen/src/sepolgen/refparser.py +++ b/python/sepolgen/src/sepolgen/refparser.py @@ -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) -- 2.18.0 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.