Skip to content

Commit

Permalink
Merge pull request #14 from remopas/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
remkop22 authored May 18, 2022
2 parents 005dd6e + 7edffc9 commit 6ba7011
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/binread/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _to_instance(field: Union["FieldType", type]) -> Optional["FieldType"]:
):
return field() # type: ignore
elif hasattr(field, "_field_type"):
getattr(field, "_field_type")
return getattr(field, "_field_type")
else:
return None

Expand Down Expand Up @@ -181,9 +181,8 @@ def read(
def formatclass(*args, **kwargs):
with_args = True

if len(args) == 0 and isinstance(args[0], Callable):
if len(args) == 1 and isinstance(args[0], Callable):
with_args = False
args = []
kwargs = {}

def decorator(cls):
Expand Down

0 comments on commit 6ba7011

Please sign in to comment.