public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: [gentoo-catalyst] [PATCH 02/13] lint: unwrap multiple statements
Date: Tue,  6 Oct 2015 11:05:18 -0400	[thread overview]
Message-ID: <1444143929-26705-2-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1444143929-26705-1-git-send-email-vapier@gentoo.org>

It's hard to read code that packs multiple statements in one line, so
unwrap the few places in the codebase where we do that.
---
 catalyst/config.py      | 3 ++-
 targets/stage1/build.py | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index 48d9c12..ffad9b3 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -53,7 +53,8 @@ class ParserBase(object):
 			myline = trailing_comment.sub("", myline)
 
 			# Skip any blank lines
-			if not myline: continue
+			if not myline:
+				continue
 
 			if self.key_value_separator in myline:
 				# Split on the first occurence of the separator creating two strings in the array mobjs
diff --git a/targets/stage1/build.py b/targets/stage1/build.py
index 6495ee3..be1bc4d 100755
--- a/targets/stage1/build.py
+++ b/targets/stage1/build.py
@@ -33,6 +33,8 @@ for idx in range(0, len(pkgs)):
 		buildpkgs[bidx] = pkgs[idx]
 		if buildpkgs[bidx][0:1] == "*":
 			buildpkgs[bidx] = buildpkgs[bidx][1:]
-	except: pass
+	except:
+		pass
 
-for b in buildpkgs: sys.stdout.write(b+" ")
+for b in buildpkgs:
+	sys.stdout.write(b + " ")
-- 
2.5.2



  reply	other threads:[~2015-10-06 15:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 15:05 [gentoo-catalyst] [PATCH 01/13] lint: fix duplicate fcntl import Mike Frysinger
2015-10-06 15:05 ` Mike Frysinger [this message]
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 03/13] lint: fix bad indentation Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 04/13] lint: convert funcs to @staticmethod where it makes sense Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 05/13] lint: clean up bare exception handling Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 06/13] lint: avoid relative imports Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 07/13] fileops: fix passing of gid/uid/minimal args Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 08/13] lint: revise wildcard import Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 09/13] lint: mark unused func args Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 10/13] lint: init all members in __init__ Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 11/13] version: use the passed in value Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 12/13] targets: fix bad set_build_kernel_vars call Mike Frysinger
2015-10-06 15:05 ` [gentoo-catalyst] [PATCH 13/13] lint: clean up superfluous parens Mike Frysinger
2015-10-06 15:27   ` Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444143929-26705-2-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox