diff options
Diffstat (limited to 'src/wikiget')
| -rw-r--r-- | src/wikiget/client.py | 10 | ||||
| -rw-r--r-- | src/wikiget/file.py | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/wikiget/client.py b/src/wikiget/client.py index 2fc4a6c..64c14d9 100644 --- a/src/wikiget/client.py +++ b/src/wikiget/client.py @@ -15,15 +15,21 @@ # You should have received a copy of the GNU General Public License # along with Wikiget. If not, see <https://www.gnu.org/licenses/>. +from __future__ import annotations + import logging -from argparse import Namespace +from typing import TYPE_CHECKING from mwclient import APIError, InvalidResponse, LoginError, Site -from mwclient.image import Image from requests import ConnectionError, HTTPError import wikiget +if TYPE_CHECKING: + from argparse import Namespace + + from mwclient.image import Image + logger = logging.getLogger(__name__) diff --git a/src/wikiget/file.py b/src/wikiget/file.py index a362aff..6fc03a1 100644 --- a/src/wikiget/file.py +++ b/src/wikiget/file.py @@ -15,12 +15,16 @@ # You should have received a copy of the GNU General Public License # along with Wikiget. If not, see <https://www.gnu.org/licenses/>. -from pathlib import Path +from __future__ import annotations -from mwclient.image import Image +from pathlib import Path +from typing import TYPE_CHECKING from wikiget import DEFAULT_SITE +if TYPE_CHECKING: + from mwclient.image import Image + class File: """A file object.""" |
