Skip to content

Commit

Permalink
pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla committed Oct 18, 2023
1 parent 7eb49b4 commit 77a6525
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/livemaker/lpb.py
Expand Up @@ -186,7 +186,7 @@ def _struct(cls):
def from_struct(cls, struct, **kwargs):
"""Create an LMProject from the specified struct."""
if isinstance(struct, construct.Container):
d = {k: v for k, v in struct.items()}
d = dict(struct.items())
d.update(kwargs)
return cls(**d)
raise NotImplementedError
Expand Down
2 changes: 1 addition & 1 deletion src/livemaker/lpm.py
Expand Up @@ -154,7 +154,7 @@ def _struct(cls):
def from_struct(cls, struct, **kwargs):
"""Create an LMProject from the specified struct."""
if isinstance(struct, construct.Container):
d = {k: v for k, v in struct.items()}
d = dict(struct.items())
d.update(kwargs)
return cls(**d)
raise NotImplementedError
Expand Down
2 changes: 1 addition & 1 deletion src/livemaker/lsb/core.py
Expand Up @@ -94,7 +94,7 @@ def _struct(cls):
def from_struct(cls, struct, **kwargs):
"""Instantiate an object from a construct Struct."""
if isinstance(struct, construct.Container):
d = {k: v for k, v in struct.items()}
d = dict(struct.items())
d.update(kwargs)
return cls(**d)
raise NotImplementedError
Expand Down
4 changes: 2 additions & 2 deletions src/livemaker/lsb/novel.py
Expand Up @@ -828,7 +828,7 @@ def _struct(cls):

@classmethod
def from_struct(cls, struct):
d = {k: v for k, v in struct.items()}
d = dict(struct.items())
if struct.decorators is not None:
d["decorators"] = [TDecorate.from_struct(x) for x in struct.decorators]
if struct.conditions is not None:
Expand Down Expand Up @@ -1510,7 +1510,7 @@ def handle_startendtag(self, tag, attrs):

def handle_starttag(self, tag, attrs):
tag = LNSTag[tag.lower()]
attrs = {k: v for k, v in attrs}
attrs = dict(attrs)
d = {
"decorator": self.decorator,
"text_speed": self.text_speed,
Expand Down

0 comments on commit 77a6525

Please sign in to comment.