Skip to content

Commit

Permalink
Make type-annotations evaluated only in type checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Jun 11, 2024
1 parent 6d1b21a commit 05889ec
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aiodocker/channel.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import asyncio


Expand Down
2 changes: 2 additions & 0 deletions aiodocker/configs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
from base64 import b64encode
from typing import Any, List, Mapping, Optional
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/containers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
import shlex
import tarfile
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/events.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import asyncio
import datetime as dt
import warnings
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/execs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
from typing import (
TYPE_CHECKING,
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/jsonstream.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
import logging
import types
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/logs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import warnings
from collections import ChainMap
from typing import TYPE_CHECKING, Any
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/multiplexed.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import asyncio
import struct
import types
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/networks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
from typing import Any, Dict, List, Mapping, Optional

Expand Down
2 changes: 2 additions & 0 deletions aiodocker/nodes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Any, List, Mapping, Optional

from .utils import clean_filters
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/secrets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
from base64 import b64encode
from typing import Any, List, Mapping, Optional
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/services.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
from typing import Any, AsyncIterator, List, Mapping, MutableMapping, Optional, Union

Expand Down
2 changes: 2 additions & 0 deletions aiodocker/stream.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import socket
import struct
import warnings
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/swarm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Iterable, Mapping, Optional

from .utils import clean_map
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/system.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Mapping


Expand Down
2 changes: 2 additions & 0 deletions aiodocker/tasks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Any, List, Mapping, Optional

from .utils import clean_filters
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import (
Mapping,
Protocol,
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import base64
import codecs
import json
Expand Down
2 changes: 2 additions & 0 deletions aiodocker/volumes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json

from .utils import clean_filters
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import asyncio
import os
import sys
Expand Down

0 comments on commit 05889ec

Please sign in to comment.