Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set up mypy #1407

Merged
merged 1 commit into from
Jun 27, 2021
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import editdistance
import editdistance # type: ignore

from librelingo_utils import get_dumb_opaque_id, audio_id, clean_word, iterate_phrases
from .dictionary import _define_words_in_sentence
Expand Down
2 changes: 1 addition & 1 deletion apps/librelingo_json_export/librelingo_json_export/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
import click
import click # type: ignore
import collections
from librelingo_yaml_loader import load_course
from librelingo_json_export.export import export_course
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals

from snapshottest import Snapshot
from snapshottest import Snapshot # type: ignore


snapshots = Snapshot()
Expand Down
2 changes: 1 addition & 1 deletion apps/librelingo_json_export/tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import random
import pytest
from click.testing import CliRunner
from click.testing import CliRunner # type: ignore
from librelingo_json_export.cli import _command, DEFAULT_SETTINGS
from librelingo_fakes import fakes

Expand Down
2 changes: 1 addition & 1 deletion apps/librelingo_json_export/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import json
import os
import random
from pyfakefs.fake_filesystem_unittest import TestCase as FakeFsTestCase
from pyfakefs.fake_filesystem_unittest import TestCase as FakeFsTestCase # type: ignore
from librelingo_fakes import fakes
from librelingo_json_export.export import (
_export_course_skills,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from yaml import safe_load
from yaml.constructor import SafeConstructor

import html2markdown
import html2markdown # type: ignore


def add_bool(self, node):
Expand Down
2 changes: 1 addition & 1 deletion apps/librelingo_yaml_loader/tests/test_yaml_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path
from unittest.mock import patch
from unittest import TestCase
from pyfakefs.fake_filesystem_unittest import TestCase as FakeFsTestCase
from pyfakefs.fake_filesystem_unittest import TestCase as FakeFsTestCase # type: ignore
from librelingo_types import (
Course,
License,
Expand Down
57 changes: 56 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ pytest-watch = "^4.2.0"
mkdocs-material = "^7.0.3"
mkdocs = "^1.1.2"
black = "^21.6b0"
mypy = "^0.910"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"