Skip to content

Commit

Permalink
Fix type annotations for Docker labels (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivienm committed Nov 15, 2021
1 parent decc34c commit 315af29
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGES/621.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix type annotations for Docker labels.
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ Paul Tagliamonte
Tianon Gravi
Tommy Beadle
Travis DePrato
Vivien Maisonneuve
Yannick Perrenet
6 changes: 3 additions & 3 deletions aiodocker/configs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from base64 import b64encode
from typing import Any, List, Mapping
from typing import Any, List, Mapping, Optional

from .utils import clean_filters, clean_map

Expand Down Expand Up @@ -33,7 +33,7 @@ async def create(
data: str,
*,
b64: bool = False,
labels: List = None,
labels: Optional[Mapping[str, str]] = None,
templating: Mapping = None,
) -> Mapping[str, Any]:
"""
Expand Down Expand Up @@ -108,7 +108,7 @@ async def update(
name: str = None,
data: str = None,
b64: bool = False,
labels: List = None,
labels: Optional[Mapping[str, str]] = None,
templating: Mapping = None,
) -> bool:
"""
Expand Down
6 changes: 3 additions & 3 deletions aiodocker/secrets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from base64 import b64encode
from typing import Any, List, Mapping
from typing import Any, List, Mapping, Optional

from .utils import clean_filters, clean_map

Expand Down Expand Up @@ -33,7 +33,7 @@ async def create(
data: str,
*,
b64: bool = False,
labels: List = None,
labels: Optional[Mapping[str, str]] = None,
driver: Mapping = None,
templating: Mapping = None,
) -> Mapping[str, Any]:
Expand Down Expand Up @@ -111,7 +111,7 @@ async def update(
name: str = None,
data: str = None,
b64: bool = False,
labels: List = None,
labels: Optional[Mapping[str, str]] = None,
driver: Mapping = None,
templating: Mapping = None,
) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion aiodocker/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def create(
task_template: Mapping[str, Any],
*,
name: str = None,
labels: List = None,
labels: Optional[Mapping[str, str]] = None,
mode: Mapping = None,
update_config: Mapping = None,
rollback_config: Mapping = None,
Expand Down

0 comments on commit 315af29

Please sign in to comment.