Skip to content

Commit

Permalink
chore: set up mypy (#1407)
Browse files Browse the repository at this point in the history
  • Loading branch information
kantord authored Jun 27, 2021
1 parent b200502 commit 4f001aa
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 8 deletions.
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"

1 comment on commit 4f001aa

@vercel
Copy link

@vercel vercel bot commented on 4f001aa Jun 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.