Skip to content

Commit 36723d3

Browse files
committed
style: fix lint errors
1 parent 2daa0f8 commit 36723d3

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

libdestruct/c/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
__all__ = ["c_int", "c_long", "c_str", "c_uint", "c_ulong"]
1414

15-
import libdestruct.c.base_type_inflater
15+
import libdestruct.c.base_type_inflater # noqa: F401

libdestruct/common/obj.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def to_bytes(self: obj) -> bytes:
6868
"""Serialize the object to bytes."""
6969

7070
@classmethod
71-
def from_bytes(cls, data: bytes) -> obj:
71+
def from_bytes(cls: type[obj], data: bytes) -> obj:
7272
"""Deserialize the object from bytes."""
7373
item = cls(data, 0)
7474
item.freeze()
@@ -113,7 +113,7 @@ def __repr__(self: obj) -> str:
113113
"""Return a string representation of the object."""
114114
return f"{self.__class__.__name__}({self.get()})"
115115

116-
def __eq__(self, value: object) -> bool:
116+
def __eq__(self: obj, value: object) -> bool:
117117
"""Return whether the object is equal to the given value."""
118118
if not isinstance(value, obj):
119119
return False

libdestruct/common/struct/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
__all__ = ["struct", "struct_impl", "ptr_to", "ptr_to_self"]
1212

1313
import libdestruct.common.struct.field_inflater
14-
import libdestruct.common.struct.struct_inflater
14+
import libdestruct.common.struct.struct_inflater # noqa: F401

libdestruct/common/struct/struct_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def __repr__(self: struct_impl) -> str:
136136
}}
137137
}}"""
138138

139-
def __eq__(self, value: object) -> bool:
139+
def __eq__(self: struct_impl, value: object) -> bool:
140140
"""Return whether the struct is equal to the given value."""
141141
if not isinstance(value, struct_impl):
142142
return False

0 commit comments

Comments
 (0)