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

mypy: remove --follow-imports=skip checks #235

Closed
wants to merge 2 commits into from
Closed
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
18 changes: 11 additions & 7 deletions pytools/test/test_pytools.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def f(i, j=(1,)):
assert count[0] == 2


def test_memoize_frozen():
def test_memoize_frozen() -> None:
from dataclasses import dataclass

from pytools import memoize_method
Expand All @@ -187,9 +187,11 @@ class FrozenDataclass:
def double_value(self):
return 2 * self.value

c = FrozenDataclass(10)
assert c.double_value() == 20
c.double_value.clear_cache(c) # pylint: disable=no-member
c0 = FrozenDataclass(10)
assert c0.double_value() == 20

# pylint: disable=no-member
c0.double_value.clear_cache(c0) # type: ignore[attr-defined]

# }}}

Expand All @@ -208,9 +210,11 @@ def __setattr__(self, key, value):
def double_value(self):
return 2 * self.value

c = FrozenClass(10)
assert c.double_value() == 20
c.double_value.clear_cache(c) # pylint: disable=no-member
c1 = FrozenClass(10)
assert c1.double_value() == 20

# pylint: disable=no-member
c1.double_value.clear_cache(c1) # type: ignore[attr-defined]

# }}}

Expand Down
6 changes: 1 addition & 5 deletions run-mypy.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#! /bin/bash

set -ex

mypy --show-error-codes pytools

mypy --strict --follow-imports=skip pytools/datatable.py pytools/persistent_dict.py
python -m mypy --show-error-codes pytools
Loading