Skip to content

Commit

Permalink
Run mypy in strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rec committed Jan 25, 2024
1 parent c02a237 commit 7fb0ec4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions clsprop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,17 @@ def name(cls, name):
"""

import sys
import typing as t


class clsprop(property):
def __get__(self, obj, objtype=None):
def __get__(self, obj: t.Any, objtype: t.Any = None) -> t.Any:
return super().__get__(objtype)

def __set__(self, obj, value):
def __set__(self, obj: t.Any, value: t.Any) -> None:
super().__set__(type(obj), value)

def __delete__(self, obj):
def __delete__(self, obj: t.Any) -> None:
# This is never called; there seems to be no way to make
# this work.
super().__delete__(type(obj))
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ line-length = 88

[tool.ruff.format]
quote-style = "single"

[tool.mypy]
strict = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
3 changes: 2 additions & 1 deletion test_clsprop.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import clsprop
import pytest

import clsprop

BUG_FIXED = False


Expand Down

0 comments on commit 7fb0ec4

Please sign in to comment.