summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linuxnamespaces/filedescriptor.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/linuxnamespaces/filedescriptor.py b/linuxnamespaces/filedescriptor.py
index f9460bf..ee96a94 100644
--- a/linuxnamespaces/filedescriptor.py
+++ b/linuxnamespaces/filedescriptor.py
@@ -8,9 +8,15 @@ import os
import typing
+# pylint: disable=too-few-public-methods # It's that one method we describe.
@typing.runtime_checkable
class HasFileno(typing.Protocol):
- def fileno(self) -> int: ...
+ """A typing protocol representing a file-like object and looking up the
+ underlying file descriptor.
+ """
+
+ def fileno(self) -> int:
+ """Return the underlying file descriptor."""
FileDescriptorLike = int | HasFileno