Skip to content

Commit

Permalink
ci: Fix type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Nov 13, 2022
1 parent 4de7024 commit 12cd342
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 2 additions & 0 deletions config/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ ignore_missing_imports = true
exclude = tests/fixtures/
warn_unused_ignores = true
show_error_codes = true
namespace_packages = true
explicit_package_bases = true
1 change: 1 addition & 0 deletions duties.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def check_types(ctx): # noqa: WPS231
Arguments:
ctx: The context instance (passed automatically).
"""
os.environ["MYPYPATH"] = "src"
ctx.run(f"mypy --config-file config/mypy.ini {PY_SRC}", title="Type-checking", pty=PTY)


Expand Down
13 changes: 1 addition & 12 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,7 @@
import pytest
from markdown.core import Markdown
from mkdocs import config

try:
from mkdocs.config.defaults import get_schema
except ImportError:

def get_schema() -> tuple[tuple]: # noqa: WPS440
"""Fallback for old versions of MkDocs.
Returns:
The default schema.
"""
return config.DEFAULT_SCHEMA
from mkdocs.config.defaults import get_schema


@pytest.fixture(name="mkdocs_conf")
Expand Down

0 comments on commit 12cd342

Please sign in to comment.