mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Make use of pathlib nearly everywhere (breaks docs gen)
Python 3.6 introduced support for the os.PathLike interface, which means Python 3.5 did not have it yet and attempting to use it in os functions would fail. Instead we can use pathlib for everything, but not all work is done yet.
This commit is contained in:
@@ -86,7 +86,7 @@ def parse_tl(file_path, layer, methods=None, ignored_ids=CORE_TYPES):
|
||||
obj_all = []
|
||||
obj_by_name = {}
|
||||
obj_by_type = collections.defaultdict(list)
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
with file_path.open() as file:
|
||||
is_function = False
|
||||
for line in file:
|
||||
comment_index = line.find('//')
|
||||
|
Reference in New Issue
Block a user