From 76fe71a4c990bd98938e94cc08356a4c917371f5 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 12 Mar 2024 09:27:05 +0100 Subject: work around mypy misdetection on bookworm --- linuxnamespaces/syscalls.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linuxnamespaces') diff --git a/linuxnamespaces/syscalls.py b/linuxnamespaces/syscalls.py index 8f5e25b..de1b87e 100644 --- a/linuxnamespaces/syscalls.py +++ b/linuxnamespaces/syscalls.py @@ -224,6 +224,9 @@ class MountFlags(enum.IntFlag): parts: list[str] = [] remain = self for val, text in MountFlags.__flagvals: + # Older mypy think MountFlags.__flagvals and thus text was of type + # MountFlags. + assert isinstance(text, str) if remain & val == val: parts.insert(0, text) remain &= ~val -- cgit v1.2.3