From c385146d460719c4258c8adfcf8b6c9737a94157 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Wed, 21 May 2025 22:12:41 +0200 Subject: fix return type of FileDescriptor.fileno Fixes: 30a111639ce6 ("expand use of FileDescriptor and add FileDescriptorLike type alias") --- linuxnamespaces/filedescriptor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linuxnamespaces/filedescriptor.py') diff --git a/linuxnamespaces/filedescriptor.py b/linuxnamespaces/filedescriptor.py index d11d4d6..ea699c2 100644 --- a/linuxnamespaces/filedescriptor.py +++ b/linuxnamespaces/filedescriptor.py @@ -65,7 +65,7 @@ class FileDescriptor(int): """Convenience wrapper for os.pidfd_open.""" return cls(os.pidfd_open(pid, flags)) - def fileno(self) -> FileDescriptor: + def fileno(self) -> "FileDescriptor": """Return self such that it satisfies the HasFileno protocol.""" return self -- cgit v1.2.3