From 4c009c3fa71a6712403542257f1a6cf0e79c05f7 Mon Sep 17 00:00:00 2001 From: Seth Morton Date: Sat, 21 Dec 2024 10:53:59 -0800 Subject: [PATCH] More correctly idenfity the presence of group --- path/__init__.pyi | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/path/__init__.pyi b/path/__init__.pyi index ae487f0..e21eaf9 100644 --- a/path/__init__.pyi +++ b/path/__init__.pyi @@ -27,14 +27,6 @@ from typing import ( overload, ) -try: - import grp as _grp -except ImportError: - _has_grp = False -else: - _has_grp = True - del _grp - from typing_extensions import Never from _typeshed import ( ExcInfo, @@ -334,10 +326,9 @@ class Path(str): def get_owner(self) -> str: ... @property def owner(self) -> str: ... - if _has_grp: - def group(self, *, follow_symlinks: bool = ...) -> str: ... if sys.platform != 'win32': + def group(self, *, follow_symlinks: bool = ...) -> str: ... def statvfs(self) -> os.statvfs_result: ... def pathconf(self, name: str | int) -> int: ...