Skip to content
Open
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
204 changes: 167 additions & 37 deletions poetry.lock

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pytest = "^7.2.0"
pytest-cov = "^4.0.0"
PyYAML = "^6.0"
pre-commit = "^2.20.0"
mypy = "^0.990"
mypy = "1.19.1"
Sphinx = "^4.3.2"
furo = "^2022.9.29"

Expand All @@ -54,6 +54,15 @@ force-single-line = true
lines-after-imports = 2
lines-between-types = 1

[tool.mypy]
files = "tomlkit, tests"
strict = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]

[build-system]
requires = ["poetry-core>=1.0.0a9"]
build-backend = "poetry.core.masonry.api"
14 changes: 8 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import os

from collections.abc import Callable

import pytest


@pytest.fixture
def example():
def _example(name):
def example() -> Callable[[str], str]:
def _example(name: str) -> str:
with open(
os.path.join(os.path.dirname(__file__), "examples", name + ".toml"),
encoding="utf-8",
Expand All @@ -16,8 +18,8 @@ def _example(name):


@pytest.fixture
def json_example():
def _example(name):
def json_example() -> Callable[[str], str]:
def _example(name: str) -> str:
with open(
os.path.join(os.path.dirname(__file__), "examples", "json", name + ".json"),
encoding="utf-8",
Expand All @@ -28,8 +30,8 @@ def _example(name):


@pytest.fixture
def invalid_example():
def _example(name):
def invalid_example() -> Callable[[str], str]:
def _example(name: str) -> str:
with open(
os.path.join(
os.path.dirname(__file__), "examples", "invalid", name + ".toml"
Expand Down
Loading
Loading