style: use not-in membership tests

This commit is contained in:
Mark Paronyan 2026-09-30 20:45:43 +03:00
parent 7a1e79a8a0
commit 06ef803ee9
No known key found for this signature in database
GPG Key ID: 8DC7338A87FE22F8
2 changed files with 2 additions and 2 deletions

View File

@ -323,7 +323,7 @@ class Cloud(BaseNode):
if port_info["type"] == "ethernet":
network_interfaces = [interface["name"] for interface in self._interfaces()]
if not port_info["interface"] in network_interfaces:
if port_info["interface"] not in network_interfaces:
raise NodeError(
f"Interface '{port_info['interface']}' could not be found on this system, please update '{self.name}'"
)

View File

@ -413,4 +413,4 @@ async def test_export_with_ignoring_snapshots(tmpdir, project):
await write_file(str(tmpdir / "zipfile.zip"), z)
with zipfile.ZipFile(str(tmpdir / "zipfile.zip")) as myzip:
assert not os.path.join("snapshots", "snap.gns3project") in [f.filename for f in myzip.filelist]
assert os.path.join("snapshots", "snap.gns3project") not in [f.filename for f in myzip.filelist]