Skip to content
Snippets Groups Projects
Commit d70b486c authored by Stefano Zacchiroli's avatar Stefano Zacchiroli
Browse files

fix indentation and spelling: make "make check" happy

parent e77c94d5
No related merge requests found
......@@ -18,8 +18,8 @@ def revhash(revision_raw):
"""Compute the revision hash.
"""
if b'\\n' in revision_raw: # HACK: string have somehow their \n
# expanded to \\n
# HACK: string have somehow their \n expanded to \\n
if b'\\n' in revision_raw:
revision_raw = revision_raw.replace(b'\\n', b'\n')
h = hashutil.hash_git_data(revision_raw, 'commit')
......
......@@ -26,7 +26,7 @@ class BaseModel:
that are suitable for JSON/msgpack-like formats."""
def to_dict(self):
"""Wrapper of `attr.asdict` that can be overriden by subclasses
"""Wrapper of `attr.asdict` that can be overridden by subclasses
that have special handling of some of the fields."""
return attr.asdict(self)
......@@ -352,7 +352,7 @@ class Content(BaseModel):
@reason.validator
def check_reason(self, attribute, value):
"""Checks the reason is full iff status != absent."""
"""Checks the reason is full if status != absent."""
assert self.reason == value
if self.status == 'absent' and value is None:
raise ValueError('Must provide a reason if content is absent.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment