Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions telegram_upload/caption_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,7 @@ class FilePath(FileMixin, Path):
def __new__(cls, *args, **kwargs):
if cls is FilePath:
cls = WindowsFilePath if os.name == 'nt' else PosixFilePath
self = cls._from_parts(args)
if not self._flavour.is_supported:
raise NotImplementedError("cannot instantiate %r on your system"
% (cls.__name__,))
return self
return Path.__new__(cls, *args, **kwargs)


class WindowsFilePath(FileMixin, WindowsPath):
Expand Down