Skip to content

Commit 6e1cbff

Browse files
committed
attempting to get mypy to run on windows
1 parent 5b8b0e6 commit 6e1cbff

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fileformats/generic/fsobject.py

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

6162
def group(self) -> ty.Optional[str]:
62-
if isinstance(self.fspath, WindowsPath):
63+
if platform.system() == "Windows":
6364
return None
6465
return self.fspath.group()
6566

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

7677
def owner(self) -> ty.Optional[str]:
77-
if isinstance(self.fspath, WindowsPath):
78+
if platform.system() == "Windows":
7879
return None
7980
return self.fspath.owner()
8081

0 commit comments

Comments
 (0)