aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-12-07 10:12:34 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-12-07 10:12:34 -0500
commitfba47b040dfca978c6685b81bac60ee2f7604b4d (patch)
treec74aacefd6c5559338c32884ce72632487ce9fa9
parentb1599fd879ae83134362e718bb9855a34b2e05f4 (diff)
downloadb4-fba47b040dfca978c6685b81bac60ee2f7604b4d.tar.gz
Silence some pycharm warnings
PyCharm is warning that the list item can be None, but we already check for that, so silence the warning. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 06c95db..28d22a6 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -454,8 +454,10 @@ class LoreSeries:
self.patches[lmsg.counter] = lmsg
self.complete = not (None in self.patches[1:])
if self.patches[0] is not None:
+ # noinspection PyUnresolvedReferences
self.subject = self.patches[0].subject
elif self.patches[1] is not None:
+ # noinspection PyUnresolvedReferences
self.subject = self.patches[1].subject
def get_slug(self, extended=False):
@@ -749,6 +751,7 @@ class LoreSeries:
return start_commit, end_commit
def save_cover(self, outfile):
+ # noinspection PyUnresolvedReferences
cover_msg = self.patches[0].get_am_message(add_trailers=False, trailer_order=None)
with open(outfile, 'w') as fh:
fh.write(cover_msg.as_string(policy=emlpolicy))