diff --git a/src/scriv/config.py b/src/scriv/config.py index fa9e421..8a09d0a 100644 --- a/src/scriv/config.py +++ b/src/scriv/config.py @@ -6,7 +6,7 @@ import pkgutil import re from pathlib import Path -from typing import Any, List +from typing import Any import attr diff --git a/src/scriv/format.py b/src/scriv/format.py index cc23a72..e63063e 100644 --- a/src/scriv/format.py +++ b/src/scriv/format.py @@ -1,7 +1,7 @@ """Dispatcher for format-based knowledge.""" import abc -from typing import Dict, List, Optional +from typing import Optional from .config import Config diff --git a/src/scriv/github.py b/src/scriv/github.py index 7499234..2e6b4c5 100644 --- a/src/scriv/github.py +++ b/src/scriv/github.py @@ -2,8 +2,8 @@ import logging import os -from typing import Any, Dict from collections.abc import Iterable +from typing import Any import requests diff --git a/src/scriv/gitinfo.py b/src/scriv/gitinfo.py index 93496e1..4565862 100644 --- a/src/scriv/gitinfo.py +++ b/src/scriv/gitinfo.py @@ -6,7 +6,6 @@ import subprocess import sys from pathlib import Path -from typing import Set import click diff --git a/src/scriv/literals.py b/src/scriv/literals.py index 09e55a1..20f6908 100644 --- a/src/scriv/literals.py +++ b/src/scriv/literals.py @@ -5,8 +5,8 @@ import ast import configparser import os.path -from typing import Any, Optional from collections.abc import MutableMapping +from typing import Any, Optional from .exceptions import ScrivException from .optional import tomllib, yaml diff --git a/src/scriv/scriv.py b/src/scriv/scriv.py index 023a9d4..d29ec23 100644 --- a/src/scriv/scriv.py +++ b/src/scriv/scriv.py @@ -5,9 +5,9 @@ import itertools import re import textwrap -from pathlib import Path -from typing import List, Optional from collections.abc import Iterable +from pathlib import Path +from typing import Optional import jinja2 diff --git a/src/scriv/shell.py b/src/scriv/shell.py index d54aec2..cb2c15d 100644 --- a/src/scriv/shell.py +++ b/src/scriv/shell.py @@ -3,7 +3,7 @@ import logging import shlex import subprocess -from typing import List, Tuple, Union +from typing import Union # The return value of run_command. CmdResult = tuple[bool, str] diff --git a/src/scriv/util.py b/src/scriv/util.py index c65720d..768f9bb 100644 --- a/src/scriv/util.py +++ b/src/scriv/util.py @@ -7,8 +7,8 @@ import logging import re import sys -from typing import Dict, Optional, Tuple, TypeVar from collections.abc import Sequence +from typing import TypeVar import click_log diff --git a/tests/conftest.py b/tests/conftest.py index a9ae872..5ee79b2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,8 +3,8 @@ import os import sys import traceback -from pathlib import Path from collections.abc import Iterable +from pathlib import Path import pytest import responses diff --git a/tests/faker.py b/tests/faker.py index df12ed0..c0225aa 100644 --- a/tests/faker.py +++ b/tests/faker.py @@ -1,8 +1,8 @@ """Fake implementations of some of our external information sources.""" import shlex -from typing import Callable, Dict, List, Optional, Set, Tuple from collections.abc import Iterable +from typing import Callable, Optional from scriv.shell import CmdResult diff --git a/tests/test_create.py b/tests/test_create.py index 43e836a..b24a75b 100644 --- a/tests/test_create.py +++ b/tests/test_create.py @@ -226,7 +226,7 @@ class TestCreateAdd: Tests of auto-adding created fragments. """ - def test_create_add( + def test_create_add( # pylint: disable=too-many-positional-arguments self, caplog, mocker, fake_git, cli_invoke, changelog_d ): # "scriv create --add" will invoke "git add" on the file. @@ -261,7 +261,7 @@ def test_create_add_preference( ) mock_call.assert_called_once_with(["git", "add", file_path]) - def test_create_add_preference_no_add( + def test_create_add_preference_no_add( # pylint: disable=too-many-positional-arguments self, caplog, mocker, fake_git, cli_invoke, changelog_d ): # The user can set a git configuration to default to --add, but --no-add @@ -274,7 +274,7 @@ def test_create_add_preference_no_add( mock_call.assert_not_called() assert "Added" not in caplog.text - def test_create_add_fail( + def test_create_add_fail( # pylint: disable=too-many-positional-arguments self, caplog, mocker, fake_git, cli_invoke, changelog_d ): # We properly handle failure to add. diff --git a/tests/test_ghrel.py b/tests/test_ghrel.py index 7417f24..3af33c2 100644 --- a/tests/test_ghrel.py +++ b/tests/test_ghrel.py @@ -2,7 +2,7 @@ import json import logging -from typing import Any, Dict +from typing import Any from unittest.mock import call import pytest