Skip to content

Commit 5b8b0e6

Browse files
committed
attempting to fix mypy in windows CI
1 parent 593f6d0 commit 5b8b0e6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fileformats/generic/fsobject.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import os
2-
import platform
32
import typing as ty
4-
from pathlib import Path
3+
from pathlib import Path, WindowsPath
54
from fileformats.core.fileset import FileSet
65
from fileformats.core.exceptions import (
76
FormatMismatchError,
@@ -60,7 +59,7 @@ def exists(self) -> bool:
6059
return True
6160

6261
def group(self) -> ty.Optional[str]:
63-
if platform.system() == "Windows":
62+
if isinstance(self.fspath, WindowsPath):
6463
return None
6564
return self.fspath.group()
6665

@@ -75,7 +74,7 @@ def name(self) -> str:
7574
return self.fspath.name
7675

7776
def owner(self) -> ty.Optional[str]:
78-
if platform.system() == "Windows":
77+
if isinstance(self.fspath, WindowsPath):
7978
return None
8079
return self.fspath.owner()
8180

0 commit comments

Comments
 (0)