(cls, *args, **kwargs)
| 1190 | ) |
| 1191 | |
| 1192 | def __new__(cls, *args, **kwargs): |
| 1193 | if cls is Path: |
| 1194 | cls = WindowsPath if os.name == 'nt' else PosixPath |
| 1195 | self = cls._from_parts(args, init=False) |
| 1196 | if not self._flavour.is_supported: |
| 1197 | raise NotImplementedError("cannot instantiate %r on your system" |
| 1198 | % (cls.__name__,)) |
| 1199 | self._init() |
| 1200 | return self |
| 1201 | |
| 1202 | def _init(self, |
| 1203 | # Private non-constructor arguments |
no test coverage detected