Skip to content

Commit 3b484e7

Browse files
committed
style: from __future__ import annotations in every .py file with code
1 parent 86955f2 commit 3b484e7

File tree

6 files changed

+11
-0
lines changed

6 files changed

+11
-0
lines changed

coverage/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
1010
"""
1111

12+
from __future__ import annotations
13+
1214
# mypy's convention is that "import as" names are public from the module.
1315
# We import names as themselves to indicate that. Pylint sees it as pointless,
1416
# so disable its warning.

coverage/__main__.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
"""Coverage.py's main entry point."""
55

6+
from __future__ import annotations
7+
68
import sys
79
from coverage.cmdline import main
810
sys.exit(main())

coverage/exceptions.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
"""Exceptions coverage.py can raise."""
55

6+
from __future__ import annotations
67

78
class _BaseCoverageException(Exception):
89
"""The base-base of all Coverage exceptions."""

coverage/multiproc.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
"""Monkey-patching to add multiprocessing support for coverage.py"""
55

6+
from __future__ import annotations
7+
68
import multiprocessing
79
import multiprocessing.process
810
import os

tests/test_oddball.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
"""Oddball cases for testing coverage.py"""
55

6+
from __future__ import annotations
7+
68
import os.path
79
import re
810
import sys

tests/test_phystokens.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
"""Tests for coverage.py's improved tokenizer."""
55

6+
from __future__ import annotations
7+
68
import os.path
79
import re
810
import textwrap

0 commit comments

Comments
 (0)