summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2024-03-12 09:27:05 +0100
committerHelmut Grohne <helmut@subdivi.de>2024-03-12 09:27:05 +0100
commit76fe71a4c990bd98938e94cc08356a4c917371f5 (patch)
tree002a9c037168061cd610fa7113f9e51a4cca2ad0
parentf9b0cf016effb397e32c413c9b0384eb6ee3b4a9 (diff)
downloadpython-linuxnamespaces-76fe71a4c990bd98938e94cc08356a4c917371f5.tar.gz
work around mypy misdetection on bookworm
-rw-r--r--linuxnamespaces/syscalls.py3
1 files changed, 3 insertions, 0 deletions
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