Skip to content

Commit

Permalink
Update to mypy 1.4.1
Browse files Browse the repository at this point in the history
Fix TypeVar returning without concrete allocation
  • Loading branch information
FlorianDeconinck committed Apr 24, 2024
1 parent 4b7cb10 commit 695c174
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ repos:
args: ["--profile", "black"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
rev: v1.4.1
hooks:
- id: mypy
name: mypy-ndsl
args: [--config-file, setup.cfg]
additional_dependencies: [types-PyYAML]
files: ndsl
exclude: |
(?x)^(
Expand Down
12 changes: 6 additions & 6 deletions ndsl/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class Allocator(Protocol):
def __call__(self, shape: Iterable[int], dtype: type) -> Array:
def __call__(self, shape: Iterable[int], dtype: type):
pass


Expand All @@ -21,23 +21,23 @@ class NumpyModule(Protocol):

@functools.wraps(np.rot90)
def rot90(self, *args, **kwargs):
...
pass

@functools.wraps(np.sum)
def sum(self, *args, **kwargs):
...
pass

@functools.wraps(np.log)
def log(self, *args, **kwargs):
...
pass

@functools.wraps(np.sin)
def sin(self, *args, **kwargs):
...
pass

@functools.wraps(np.asarray)
def asarray(self, *args, **kwargs):
...
pass


class AsyncRequest(Protocol):
Expand Down

0 comments on commit 695c174

Please sign in to comment.