From c073a68dd5cf678006af3568bda74e8e394edf42 Mon Sep 17 00:00:00 2001
From: Ned Batchelder <ned@nedbatchelder.com>
Date: Mon, 4 Nov 2024 07:11:26 -0500
Subject: [PATCH] chore: clean up after pyupgrade

---
 src/scriv/config.py  | 2 +-
 src/scriv/format.py  | 2 +-
 src/scriv/github.py  | 2 +-
 src/scriv/gitinfo.py | 1 -
 src/scriv/scriv.py   | 2 +-
 src/scriv/shell.py   | 2 +-
 src/scriv/util.py    | 2 +-
 tests/faker.py       | 2 +-
 tests/test_create.py | 6 +++---
 tests/test_ghrel.py  | 2 +-
 10 files changed, 11 insertions(+), 12 deletions(-)

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..760b30e 100644
--- a/src/scriv/github.py
+++ b/src/scriv/github.py
@@ -2,7 +2,7 @@
 
 import logging
 import os
-from typing import Any, Dict
+from typing import Any
 from collections.abc import Iterable
 
 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/scriv.py b/src/scriv/scriv.py
index 023a9d4..998d29d 100644
--- a/src/scriv/scriv.py
+++ b/src/scriv/scriv.py
@@ -6,7 +6,7 @@
 import re
 import textwrap
 from pathlib import Path
-from typing import List, Optional
+from typing import Optional
 from collections.abc import Iterable
 
 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..89e52c2 100644
--- a/src/scriv/util.py
+++ b/src/scriv/util.py
@@ -7,7 +7,7 @@
 import logging
 import re
 import sys
-from typing import Dict, Optional, Tuple, TypeVar
+from typing import TypeVar
 from collections.abc import Sequence
 
 import click_log
diff --git a/tests/faker.py b/tests/faker.py
index df12ed0..621c480 100644
--- a/tests/faker.py
+++ b/tests/faker.py
@@ -1,7 +1,7 @@
 """Fake implementations of some of our external information sources."""
 
 import shlex
-from typing import Callable, Dict, List, Optional, Set, Tuple
+from typing import Callable, Optional
 from collections.abc import Iterable
 
 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