Skip to content

Commit 7c0a507

Browse files
committed
Fix tests
1 parent 9541d4b commit 7c0a507

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ Changelog
3232

3333
Add documentation for ``setuptools-git-versioning`` script
3434

35+
.. change::
36+
:tags: tests, refactoring
37+
38+
Use builtin type annotations (instead of type comments) in ``tests/lib/util.py``,
39+
use modern annotations syntax (``type | None`` instead of ``Optional[type]``)
40+
3541
1.10
3642
----
3743

tests/lib/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import logging
24
import os
35
import subprocess
@@ -6,7 +8,7 @@
68
from datetime import datetime
79
from pathlib import Path
810
from secrets import token_hex
9-
from typing import Any, Callable, Dict
11+
from typing import Any, Callable
1012

1113
import toml
1214

@@ -168,7 +170,7 @@ def create_pyproject_toml(
168170
**kwargs,
169171
)
170172

171-
cfg: Dict[str, Any] = {}
173+
cfg: dict[str, Any] = {}
172174
cfg["build-system"] = {
173175
"requires": [
174176
"setuptools>=41",

0 commit comments

Comments
 (0)