From d70b486c013726264b4659b90014ffb0b827ae87 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli <zack@upsilon.cc> Date: Sun, 15 Sep 2019 10:51:20 +0200 Subject: [PATCH] fix indentation and spelling: make "make check" happy --- bin/swh-revhash | 4 ++-- swh/model/model.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/swh-revhash b/bin/swh-revhash index c7e2998a..6de0a26a 100755 --- a/bin/swh-revhash +++ b/bin/swh-revhash @@ -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') diff --git a/swh/model/model.py b/swh/model/model.py index badac8c6..70559dbb 100644 --- a/swh/model/model.py +++ b/swh/model/model.py @@ -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.') -- GitLab