From b4cb9ea83a9c88b726e4fe81f0d668b462abfedd Mon Sep 17 00:00:00 2001 From: Liponex <43170114+liponex@users.noreply.github.com> Date: Wed, 31 Jul 2024 11:46:00 +0500 Subject: [PATCH] PEP 561 compliance enhancement (#2314) --- .pylintrc | 2 +- instaloader/__init__.py | 31 +++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.pylintrc b/.pylintrc index 1d438dc..73fb4e1 100644 --- a/.pylintrc +++ b/.pylintrc @@ -351,7 +351,7 @@ single-line-if-stmt=no allow-any-import-level= # Allow explicit reexports by alias from a package __init__. -allow-reexport-from-package=no +allow-reexport-from-package=yes # Allow wildcard imports from modules that define __all__. allow-wildcard-with-all=no diff --git a/instaloader/__init__.py b/instaloader/__init__.py index 39e7538..d775104 100644 --- a/instaloader/__init__.py +++ b/instaloader/__init__.py @@ -13,11 +13,26 @@ else: win_unicode_console.enable() from .exceptions import * -from .instaloader import Instaloader -from .instaloadercontext import InstaloaderContext, RateController -from .lateststamps import LatestStamps -from .nodeiterator import NodeIterator, FrozenNodeIterator, resumable_iteration -from .structures import (Hashtag, Highlight, Post, PostSidecarNode, PostComment, PostCommentAnswer, PostLocation, - Profile, Story, StoryItem, TopSearchResults, TitlePic, - load_structure_from_file, save_structure_to_file, - load_structure, get_json_structure) +from .instaloader import Instaloader as Instaloader +from .instaloadercontext import (InstaloaderContext as InstaloaderContext, + RateController as RateController) +from .lateststamps import LatestStamps as LatestStamps +from .nodeiterator import (NodeIterator as NodeIterator, + FrozenNodeIterator as FrozenNodeIterator, + resumable_iteration as resumable_iteration) +from .structures import (Hashtag as Hashtag, + Highlight as Highlight, + Post as Post, + PostSidecarNode as PostSidecarNode, + PostComment as PostComment, + PostCommentAnswer as PostCommentAnswer, + PostLocation as PostLocation, + Profile as Profile, + Story as Story, + StoryItem as StoryItem, + TopSearchResults as TopSearchResults, + TitlePic as TitlePic, + load_structure_from_file as load_structure_from_file, + save_structure_to_file as save_structure_to_file, + load_structure as load_structure, + get_json_structure as get_json_structure)