Skip to content

Commit

Permalink
Use iterable, not iterator, so lists can be taken as an argument
Browse files Browse the repository at this point in the history
  • Loading branch information
crwilcox authored Feb 16, 2024
1 parent fe07aa2 commit 39b43be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nox/tox_to_nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
import os
import pkgutil
import re
from collections.abc import Iterator
from configparser import ConfigParser
from pathlib import Path
from subprocess import check_output
from typing import Any
from typing import Any, Iterable

import jinja2
import tox.config
Expand All @@ -44,7 +43,7 @@
)


def wrapjoin(seq: Iterator[Any]) -> str:
def wrapjoin(seq: Iterable[Any]) -> str:
"""Wrap each item in single quotes and join them with a comma."""
return ", ".join([f"'{item}'" for item in seq])

Expand Down

0 comments on commit 39b43be

Please sign in to comment.