diff options
author | Helmut Grohne <helmut@subdivi.de> | 2025-05-23 07:32:10 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2025-05-23 07:32:10 +0200 |
commit | e022d5373d61096967446818469d6f6c4ad4e56f (patch) | |
tree | df3b28b27d76f1fd76adad3a91125d96c0c6c779 | |
parent | 054bf286f347aa56a0a992dc73feea1d34b12bb5 (diff) | |
download | python-linuxnamespaces-e022d5373d61096967446818469d6f6c4ad4e56f.tar.gz |
align HasFileno protocol with asyncvarlink
-rw-r--r-- | linuxnamespaces/filedescriptor.py | 8 |
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 |