[oe-commits] [bitbake] branch master updated: base.bbclass: fix 'python should use 4 spaces indentation' warnings

git at git.openembedded.org git at git.openembedded.org
Sat Dec 28 23:51:24 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository bitbake.

The following commit(s) were added to refs/heads/master by this push:
     new a8e7e91  base.bbclass: fix 'python should use 4 spaces indentation' warnings
a8e7e91 is described below

commit a8e7e913407d5c381fd817689bab19208919f86e
Author: Masahiro Yamada <masahiroy at kernel.org>
AuthorDate: Sun Dec 22 16:09:14 2019 +0900

    base.bbclass: fix 'python should use 4 spaces indentation' warnings
    
    Even if there are not so many users of base.bbclass bundled in bitbake,
    it is helpful as sample code at least.
    
    If this base.bbclass is used, bitbake emits the following warnings:
    
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 41
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 42
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 43
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 44
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 45
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 46
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 47
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 53
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 54
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 55
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 56
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 63
    WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 64
    
    Let's fix the indentation as suggested. While I was touching these lines,
    I also fixed "isnt" into "isn't" in the comment line.
    
    Signed-off-by: Masahiro Yamada <masahiroy at kernel.org>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 classes/base.bbclass | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index 08441fe..1809396 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -38,30 +38,30 @@ bbfatal() {
 addtask showdata
 do_showdata[nostamp] = "1"
 python do_showdata() {
-	import sys
-	# emit variables and shell functions
-	bb.data.emit_env(sys.__stdout__, d, True)
-	# emit the metadata which isnt valid shell
-	for e in bb.data.keys(d):
-		if d.getVarFlag(e, 'python', False):
-			bb.plain("\npython %s () {\n%s}" % (e, d.getVar(e)))
+    import sys
+    # emit variables and shell functions
+    bb.data.emit_env(sys.__stdout__, d, True)
+    # emit the metadata which isn't valid shell
+    for e in bb.data.keys(d):
+        if d.getVarFlag(e, 'python', False):
+            bb.plain("\npython %s () {\n%s}" % (e, d.getVar(e)))
 }
 
 addtask listtasks
 do_listtasks[nostamp] = "1"
 python do_listtasks() {
-	import sys
-	for e in bb.data.keys(d):
-		if d.getVarFlag(e, 'task', False):
-			bb.plain("%s" % e)
+    import sys
+    for e in bb.data.keys(d):
+        if d.getVarFlag(e, 'task', False):
+            bb.plain("%s" % e)
 }
 
 addtask build
 do_build[dirs] = "${TOPDIR}"
 do_build[nostamp] = "1"
 python base_do_build () {
-	bb.note("The included, default BB base.bbclass does not define a useful default task.")
-	bb.note("Try running the 'listtasks' task against a .bb to see what tasks are defined.")
+    bb.note("The included, default BB base.bbclass does not define a useful default task.")
+    bb.note("Try running the 'listtasks' task against a .bb to see what tasks are defined.")
 }
 
 EXPORT_FUNCTIONS do_clean do_mrproper do_build

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list