general: update mypy config, seems that logs of type: ignore aren't necessary anymore
This commit is contained in:
parent
a445d2cbfe
commit
c34656e8fb
52 changed files with 142 additions and 105 deletions
|
@ -1,6 +1,6 @@
|
|||
from pathlib import Path
|
||||
|
||||
import pytest # type: ignore
|
||||
import pytest
|
||||
|
||||
from my.calendar.holidays import is_holiday
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ def test_dynamic_configuration(notes: Path) -> None:
|
|||
0.0,
|
||||
]
|
||||
|
||||
import pytest # type: ignore
|
||||
import pytest
|
||||
|
||||
|
||||
def test_environment_variable(tmp_path: Path) -> None:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pytest # type: ignore
|
||||
import pytest
|
||||
|
||||
# I guess makes sense by default
|
||||
@pytest.fixture(autouse=True)
|
||||
|
|
|
@ -6,7 +6,7 @@ import zipfile
|
|||
|
||||
from my.core.kompress import kopen, kexists, CPath
|
||||
|
||||
import pytest # type: ignore
|
||||
import pytest
|
||||
|
||||
|
||||
structure_data: Path = Path(__file__).parent / "structure_data"
|
||||
|
|
|
@ -38,7 +38,7 @@ def test_dynamic_config_2(tmp_path: Path) -> None:
|
|||
assert item1.username == 'user2'
|
||||
|
||||
|
||||
import pytest # type: ignore
|
||||
import pytest
|
||||
|
||||
@pytest.mark.skip(reason="won't work at the moment because of inheritance")
|
||||
def test_dynamic_config_simplenamespace(tmp_path: Path) -> None:
|
||||
|
|
|
@ -7,7 +7,7 @@ ROOT = Path(__file__).parent.absolute()
|
|||
OUTPUTS = ROOT / 'outputs'
|
||||
|
||||
|
||||
import pytest # type: ignore
|
||||
import pytest
|
||||
|
||||
|
||||
def test_hpi(prepare: str) -> None:
|
||||
|
@ -19,7 +19,7 @@ def test_orger(prepare: str, tmp_path: Path) -> None:
|
|||
om = import_file(ROOT / 'orger/modules/polar.py')
|
||||
# reload(om)
|
||||
|
||||
pv = om.PolarView() # type: ignore
|
||||
pv = om.PolarView()
|
||||
# TODO hmm. worth making public?
|
||||
OUTPUTS.mkdir(exist_ok=True)
|
||||
out = OUTPUTS / (get_valid_filename(prepare) + '.org')
|
||||
|
|
|
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
|
|||
from my.core.compat import windows
|
||||
from my.core.common import get_files
|
||||
|
||||
import pytest # type: ignore
|
||||
import pytest
|
||||
|
||||
|
||||
# hack to replace all /tmp with 'real' tmp dir
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from pathlib import Path
|
||||
|
||||
import pytest # type: ignore
|
||||
import pytest
|
||||
|
||||
|
||||
def test() -> None:
|
||||
|
|
|
@ -49,7 +49,7 @@ def with_config():
|
|||
|
||||
import my.core.cfg as C
|
||||
with C.tmp_config() as config:
|
||||
config.pdfs = user_config # type: ignore
|
||||
config.pdfs = user_config
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
|
|
|
@ -64,7 +64,7 @@ def test_preserves_extra_attr() -> None:
|
|||
assert isinstance(getattr(config, 'please_keep_me'), str)
|
||||
|
||||
|
||||
import pytest # type: ignore
|
||||
import pytest
|
||||
@pytest.fixture(autouse=True, scope='module')
|
||||
def prepare():
|
||||
from .common import testdata
|
||||
|
|
|
@ -18,7 +18,7 @@ def test_location_perf() -> None:
|
|||
|
||||
# in theory should support any HTML takeout file?
|
||||
# although IIRC bookmarks and search-history.html weren't working
|
||||
import pytest # type: ignore
|
||||
import pytest
|
||||
@pytest.mark.parametrize(
|
||||
'path', [
|
||||
'YouTube/history/watch-history.html',
|
||||
|
|
|
@ -10,7 +10,7 @@ def _init_default_config() -> None:
|
|||
import my.config
|
||||
class default_config:
|
||||
count = 5
|
||||
my.config.simple = default_config # type: ignore[attr-defined,assignment,misc]
|
||||
my.config.simple = default_config # type: ignore[assignment,misc]
|
||||
|
||||
|
||||
def test_tmp_config() -> None:
|
||||
|
|
|
@ -2,8 +2,8 @@ import sys
|
|||
from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
|
||||
import pytest # type: ignore
|
||||
import pytz # type: ignore
|
||||
import pytest
|
||||
import pytz
|
||||
|
||||
from my.core.error import notnone
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue