Change set ops to use methods instead of operators.
This commit is contained in:
parent
8ce6e39b1c
commit
45e7734b1a
|
@ -179,8 +179,9 @@ class AssertionRewritingHook(object):
|
|||
The named module or package as well as any nested modules will
|
||||
be rewritten on import.
|
||||
"""
|
||||
already_imported = (
|
||||
(set(names) & set(sys.modules)) - set(self._rewritten_names))
|
||||
already_imported = (set(names)
|
||||
.intersection(sys.modules)
|
||||
.difference(self._rewritten_names))
|
||||
for name in already_imported:
|
||||
if not AssertionRewriter.is_rewrite_disabled(
|
||||
sys.modules[name].__doc__ or ""):
|
||||
|
|
Loading…
Reference in New Issue