Skip to content

Commit

Permalink
Use Sequence[] instead of list[] for lists of StrPath. (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored Nov 6, 2023
1 parent 580708d commit 14df3ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/antsibull_core/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import asyncio
import os
import typing as t
from collections.abc import Sequence

from .subprocess_util import async_log_run

Expand All @@ -22,7 +23,7 @@ class CollectionFormatError(Exception):


async def install_together(
collection_tarballs: list[StrPath], ansible_collections_dir: StrPath
collection_tarballs: Sequence[StrPath], ansible_collections_dir: StrPath
) -> None:
installers = []
for pathname in collection_tarballs:
Expand All @@ -44,7 +45,7 @@ async def install_together(


async def install_separately(
collection_tarballs: list[StrPath], collection_dir: StrPath
collection_tarballs: Sequence[StrPath], collection_dir: StrPath
) -> list[str]:
installers = []
collection_dirs: list[str] = []
Expand Down
4 changes: 2 additions & 2 deletions src/antsibull_core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import os.path
import typing as t
from collections.abc import Iterable, Mapping
from collections.abc import Iterable, Mapping, Sequence

import perky # type: ignore[import]
import pydantic as p
Expand Down Expand Up @@ -61,7 +61,7 @@ def find_config_files(conf_files: Iterable[StrPath]) -> list[str]:

def validate_config(
config: Mapping,
filenames: list[StrPath] | list[str],
filenames: Sequence[StrPath],
app_context_model: type[AppContext],
) -> None:
"""
Expand Down

0 comments on commit 14df3ac

Please sign in to comment.