Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ strict_equality = true
warn_unreachable = true
warn_no_return = true

[[tool.mypy.overrides]]
module = "tests.*"
disallow_incomplete_defs = false
disallow_untyped_defs = false


# Pytest
# ======
Expand Down
20 changes: 10 additions & 10 deletions tests/sort_lines_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_unknown_options(self) -> None:


class TestSortLines:
def test_sort_lines(self):
def test_sort_lines(self) -> None:
lines = [
'# pragma: alphabetize\n',
'Bob\n',
Expand All @@ -89,7 +89,7 @@ def test_sort_lines(self):
'Eve\n',
]

def test_case_insensitive(self):
def test_case_insensitive(self) -> None:
lines = [
'# pragma: alphabetize[case-insensitive]\n',
'Bob\n',
Expand All @@ -110,7 +110,7 @@ def test_case_insensitive(self):
'eve\n',
]

def test_already_sorted(self):
def test_already_sorted(self) -> None:
lines = [
'# pragma: alphabetize\n',
'Alice\n',
Expand All @@ -124,7 +124,7 @@ def test_already_sorted(self):

assert sorted_lines == lines

def test_sorting_stops_when_indentation_changes(self):
def test_sorting_stops_when_indentation_changes(self) -> None:
lines = [
'# pragma: alphabetize\n',
' Bob\n',
Expand All @@ -145,7 +145,7 @@ def test_sorting_stops_when_indentation_changes(self):
'Charlie\n',
]

def test_sorting_stops_at_empty_line(self):
def test_sorting_stops_at_empty_line(self) -> None:
lines = [
'# pragma: alphabetize\n',
'Bob\n',
Expand All @@ -169,7 +169,7 @@ def test_sorting_stops_at_empty_line(self):
]


def test_file_needs_no_sorting(tmp_path: Path):
def test_file_needs_no_sorting(tmp_path: Path) -> None:
file = tmp_path / 't.py'
file.write_text(
"""\
Expand All @@ -195,7 +195,7 @@ def test_file_needs_no_sorting(tmp_path: Path):
"""


def test_file_already_sorted(tmp_path: Path):
def test_file_already_sorted(tmp_path: Path) -> None:
file = tmp_path / 't.py'
file.write_text(
"""\
Expand Down Expand Up @@ -239,7 +239,7 @@ def test_file_already_sorted(tmp_path: Path):
"""


def test_file_changed(tmp_path: Path):
def test_file_changed(tmp_path: Path) -> None:
file = tmp_path / 't.py'
file.write_text(
"""\
Expand Down Expand Up @@ -347,7 +347,7 @@ def test_file_changed(tmp_path: Path):
"""


def test_case_insensitive(tmp_path: Path):
def test_case_insensitive(tmp_path: Path) -> None:
file = tmp_path / 't.py'
file.write_text(
"""\
Expand Down Expand Up @@ -455,7 +455,7 @@ def test_case_insensitive(tmp_path: Path):
"""


def test_multiple_files(tmp_path: Path):
def test_multiple_files(tmp_path: Path) -> None:
unchanged_file = tmp_path / 'unchanged.py'
unchanged_file.write_text(
"""\
Expand Down