Skip to content

Commit 49e0236

Browse files
committed
test: require Python >= 3.6
1 parent 36a5be7 commit 49e0236

13 files changed

+20
-23
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ repos:
7070
rev: v2.7.4
7171
hooks:
7272
- id: pyupgrade
73-
args: [--py3-plus, --keep-percent-format]
73+
args: [--py36-plus, --keep-percent-format]
7474
exclude: ^completions/
7575

7676
- repo: https://github.com/perltidy/perltidy

doc/testing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Installing dependencies
2323
-----------------------
2424

2525
Installing dependencies should be easy using your local package manager or
26-
`pip`. Python 3.4 or newer is required, and the rest of the Python package
26+
`pip`. Python 3.6 or newer is required, and the rest of the Python package
2727
dependencies are specified in the `test/requirements.txt` file. If using `pip`,
2828
this file can be fed directly to it, e.g. like:
2929
------------------------------------

extra/make-changelog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import git
1010

1111
repo = git.Repo(".")
12-
changelog = defaultdict(list) # type: Dict[str, List[str]]
12+
changelog: Dict[str, List[str]] = defaultdict(list)
1313

1414
if len(sys.argv) != 2:
1515
print("Usage: %s SINCE-TAG" % __file__, file=sys.stderr)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[tool.black]
22
line-length = 79
3-
target-version = ["py34", "py35", "py36", "py37", "py38"]
3+
target-version = ["py36", "py37", "py38"]

test/requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Python >= 3.4 required here
1+
# Python >= 3.6 required here
22
pexpect>=4
33
pytest>=3.6
44
pytest-xdist
5-
typing;python_version<"3.5"

test/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ markers =
55
complete
66

77
[mypy]
8-
python_version = 3.4
8+
python_version = 3.6
99
show_error_codes = true
1010
ignore_missing_imports = true
1111

test/t/test_finger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def test_2(self, bash, completion, users_at):
2626
def test_partial_hostname(self, bash, known_hosts):
2727
first_char, partial_hosts = partialize(bash, known_hosts)
2828
user = "test"
29-
completion = assert_complete(bash, "finger %s@%s" % (user, first_char))
29+
completion = assert_complete(bash, f"finger {user}@{first_char}")
3030
if len(completion) == 1:
3131
assert completion == partial_hosts[0][1:]
3232
else:
33-
assert completion == ["%s@%s" % (user, x) for x in partial_hosts]
33+
assert completion == [f"{user}@{x}" for x in partial_hosts]

test/t/test_make.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ def test_1(self, completion):
1212
def test_2(self, bash, completion):
1313
"""Hidden targets."""
1414
assert completion == ".cache/ .test_passes".split()
15-
os.remove("%s/make/%s" % (bash.cwd, "extra_makefile"))
15+
os.remove(f"{bash.cwd}/make/extra/makefile")
1616

1717
@pytest.mark.complete("make .cache/", cwd="make", require_cmd=True)
1818
def test_3(self, bash, completion):
1919
assert completion == "1 2".split()
20-
os.remove("%s/make/%s" % (bash.cwd, "extra_makefile"))
20+
os.remove(f"{bash.cwd}/make/extra_makefile")
2121

2222
@pytest.mark.complete("make ", cwd="shared/empty_dir")
2323
def test_4(self, completion):
@@ -30,17 +30,17 @@ def test_5(self, completion):
3030
@pytest.mark.complete("make ", cwd="make", require_cmd=True)
3131
def test_6(self, bash, completion):
3232
assert completion == "all clean extra_makefile install sample".split()
33-
os.remove("%s/make/%s" % (bash.cwd, "extra_makefile"))
33+
os.remove(f"{bash.cwd}/make/extra_makefile")
3434

3535
@pytest.mark.complete("make .cache/.", cwd="make", require_cmd=True)
3636
def test_7(self, bash, completion):
3737
assert completion == ".1 .2".split()
38-
os.remove("%s/make/%s" % (bash.cwd, "extra_makefile"))
38+
os.remove(f"{bash.cwd}/make/extra_makefile")
3939

4040
@pytest.mark.complete("make -C make ", require_cmd=True)
4141
def test_8(self, bash, completion):
4242
assert completion == "all clean extra_makefile install sample".split()
43-
os.remove("%s/make/%s" % (bash.cwd, "extra_makefile"))
43+
os.remove(f"{bash.cwd}/make/extra_makefile")
4444

4545
@pytest.mark.complete("make -", require_cmd=True)
4646
def test_9(self, completion):

test/t/test_mutt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ def test_4(self, bash):
2828
.split()
2929
)
3030
assert got == [
31-
"%s/mutt/%s" % (bash.cwd, x)
31+
f"{bash.cwd}/mutt/{x}"
3232
for x in ("muttrc", "bar/muttrc_b", "foo/muttrc_f")
3333
]

test/t/test_scp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ def test_live(self, live_pwd, completion):
7676
Connection to it must open sufficiently quickly for the
7777
ConnectTimeout and sleep_after_tab settings.
7878
"""
79-
assert completion == "%s:%s/" % (LIVE_HOST, live_pwd)
79+
assert completion == f"{LIVE_HOST}:{live_pwd}/"

0 commit comments

Comments
 (0)