All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/toaster: fixup codebase so pydocstyle can parse
@ 2020-05-03 16:46 Frazer Clews
  2020-05-03 17:02 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 4+ messages in thread
From: Frazer Clews @ 2020-05-03 16:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Frazer Clews

From: Frazer Clews <frazer.clews@codethink.co.uk>

fixed literal comparison in lsupdates so the
integer isn't treated as a singleton, also fix
indentation in perf

Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk>
---
 .../orm/management/commands/lsupdates.py      |  2 +-
 .../toastermain/management/commands/perf.py   | 68 +++++++++----------
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/lib/toaster/orm/management/commands/lsupdates.py b/lib/toaster/orm/management/commands/lsupdates.py
index a4dbcaa7..2fbd7be3 100644
--- a/lib/toaster/orm/management/commands/lsupdates.py
+++ b/lib/toaster/orm/management/commands/lsupdates.py
@@ -68,7 +68,7 @@ class Command(BaseCommand):
                          (what,
                           pec))
         sys.stdout.flush()
-        if int(pec) is 100:
+        if int(pec) == 100:
             sys.stdout.write("\n")
             sys.stdout.flush()
 
diff --git a/lib/toaster/toastermain/management/commands/perf.py b/lib/toaster/toastermain/management/commands/perf.py
index 7d629fb3..5c41c5b2 100644
--- a/lib/toaster/toastermain/management/commands/perf.py
+++ b/lib/toaster/toastermain/management/commands/perf.py
@@ -17,46 +17,46 @@ class Command(BaseCommand):
     help    = "Test the response time for all toaster urls"
 
     def handle(self, *args, **options):
-	root_urlconf = __import__(settings.ROOT_URLCONF)
-	patterns = root_urlconf.urls.urlpatterns
-	global full_url
-	for pat in patterns:
-	    if pat.__class__.__name__ == 'RegexURLResolver':
-		url_root_res = str(pat).split('^')[1].replace('>', '')
-		if 'gui' in url_root_res:
-		    for url_patt in pat.url_patterns:
-			full_url = self.get_full_url(url_patt, url_root_res)
-			info = self.url_info(full_url)
-			status_code = info[0]
-			load_time = info[1]
-			print('Trying \'' + full_url + '\', ' + str(status_code) + ', ' + str(load_time))
+        root_urlconf = __import__(settings.ROOT_URLCONF)
+        patterns = root_urlconf.urls.urlpatterns
+        global full_url
+        for pat in patterns:
+            if pat.__class__.__name__ == 'RegexURLResolver':
+                url_root_res = str(pat).split('^')[1].replace('>', '')
+            if 'gui' in url_root_res:
+                for url_patt in pat.url_patterns:
+                    full_url = self.get_full_url(url_patt, url_root_res)
+                    info = self.url_info(full_url)
+                    status_code = info[0]
+                    load_time = info[1]
+                    print('Trying \'' + full_url + '\', ' + str(status_code) + ', ' + str(load_time))
 
     def get_full_url(self, url_patt, url_root_res):
-	full_url = str(url_patt).split('^')[1].replace('$>', '').replace('(?P<file_path>(?:/[', '/bin/busybox').replace('.*', '')
-	full_url = str(url_root_res + full_url)
-	full_url = re.sub('\(\?P<.*?>\\\d\+\)', '1', full_url)
-	full_url = 'http://localhost:8000/' + full_url
-	return full_url
+        full_url = str(url_patt).split('^')[1].replace('$>', '').replace('(?P<file_path>(?:/[', '/bin/busybox').replace('.*', '')
+        full_url = str(url_root_res + full_url)
+        full_url = re.sub('\(\?P<.*?>\\\d\+\)', '1', full_url)
+        full_url = 'http://localhost:8000/' + full_url
+        return full_url
 
     def url_info(self, full_url):
-	client = Client()
-	info = []
-	try:
-	    resp = client.get(full_url, follow = True)
-	except Exception as e_status_code:
+        client = Client()
+        info = []
+        try:
+            resp = client.get(full_url, follow = True)
+        except Exception as e_status_code:
             self.error('Url: %s, error: %s' % (full_url, e_status_code))
             resp = type('object', (), {'status_code':0, 'content': str(e_status_code)})
-	status_code = resp.status_code
-	info.append(status_code)
-	try:
-	    req = requests.get(full_url)
-	except Exception as e_load_time:
+        status_code = resp.status_code
+        info.append(status_code)
+        try:
+            req = requests.get(full_url)
+        except Exception as e_load_time:
             self.error('Url: %s, error: %s' % (full_url, e_load_time))
-	load_time = req.elapsed
-	info.append(load_time)
-	return info
+        load_time = req.elapsed
+        info.append(load_time)
+        return info
 
     def error(self, *args):
-	for arg in args:
-	    print(arg, end=' ', file=sys.stderr)
-	print(file=sys.stderr)
+        for arg in args:
+            print(arg, end=' ', file=sys.stderr)
+        print(file=sys.stderr)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✗ patchtest: failure for lib/toaster: fixup codebase so pydocstyle can parse
  2020-05-03 16:46 [PATCH] lib/toaster: fixup codebase so pydocstyle can parse Frazer Clews
@ 2020-05-03 17:02 ` Patchwork
  2020-05-03 22:06   ` Frazer Clews
  0 siblings, 1 reply; 4+ messages in thread
From: Patchwork @ 2020-05-03 17:02 UTC (permalink / raw)
  To: Frazer Leslie Clews; +Cc: openembedded-core

== Series Details ==

Series: lib/toaster: fixup codebase so pydocstyle can parse
Revision: 1
URL   : https://patchwork.openembedded.org/series/23925/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 26eb22191f)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* ✗ patchtest: failure for lib/toaster: fixup codebase so pydocstyle can parse
  2020-05-03 17:02 ` ✗ patchtest: failure for " Patchwork
@ 2020-05-03 22:06   ` Frazer Clews
  0 siblings, 0 replies; 4+ messages in thread
From: Frazer Clews @ 2020-05-03 22:06 UTC (permalink / raw)
  To: openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 1746 bytes --]

Not sure why this error is coming up, it seems to be rebased with the 
latest master branch

Thanks

Frazer



-------- Forwarded Message --------
Subject: 	✗ patchtest: failure for lib/toaster: fixup codebase so 
pydocstyle can parse
Date: 	Sun, 03 May 2020 17:02:54 -0000
From: 	Patchwork <patchwork@patchwork.openembedded.org>
Reply-To: 	openembedded-core@lists.openembedded.org
To: 	Frazer Clews <frazer.clews@codethink.co.uk>
CC: 	openembedded-core@lists.openembedded.org



== Series Details ==

Series: lib/toaster: fixup codebase so pydocstyle can parse
Revision: 1
URL : https://patchwork.openembedded.org/series/23925/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] Suggested fix Rebase your series on top of 
targeted branch
Targeted branch master (currently at 26eb22191f)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your 
concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



[-- Attachment #1.2: Type: text/html, Size: 4235 bytes --]

[-- Attachment #2: 0001-lib-toaster-fixup-codebase-so-pydocstyle-can-parse.patch --]
[-- Type: text/x-patch, Size: 4813 bytes --]

From 6f6086e0a885b6fa09b3f7e78a410a2321705f58 Mon Sep 17 00:00:00 2001
From: Frazer Clews <frazer.clews@codethink.co.uk>
Date: Fri, 1 May 2020 17:17:48 +0100
Subject: [PATCH] lib/toaster: fixup codebase so pydocstyle can parse

fixed literal comparison in lsupdates so the
integer isn't treated as a singleton, also fix
indentation in perf

Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk>
---
 .../orm/management/commands/lsupdates.py      |  2 +-
 .../toastermain/management/commands/perf.py   | 68 +++++++++----------
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/lib/toaster/orm/management/commands/lsupdates.py b/lib/toaster/orm/management/commands/lsupdates.py
index a4dbcaa7..2fbd7be3 100644
--- a/lib/toaster/orm/management/commands/lsupdates.py
+++ b/lib/toaster/orm/management/commands/lsupdates.py
@@ -68,7 +68,7 @@ class Command(BaseCommand):
                          (what,
                           pec))
         sys.stdout.flush()
-        if int(pec) is 100:
+        if int(pec) == 100:
             sys.stdout.write("\n")
             sys.stdout.flush()
 
diff --git a/lib/toaster/toastermain/management/commands/perf.py b/lib/toaster/toastermain/management/commands/perf.py
index 7d629fb3..5c41c5b2 100644
--- a/lib/toaster/toastermain/management/commands/perf.py
+++ b/lib/toaster/toastermain/management/commands/perf.py
@@ -17,46 +17,46 @@ class Command(BaseCommand):
     help    = "Test the response time for all toaster urls"
 
     def handle(self, *args, **options):
-	root_urlconf = __import__(settings.ROOT_URLCONF)
-	patterns = root_urlconf.urls.urlpatterns
-	global full_url
-	for pat in patterns:
-	    if pat.__class__.__name__ == 'RegexURLResolver':
-		url_root_res = str(pat).split('^')[1].replace('>', '')
-		if 'gui' in url_root_res:
-		    for url_patt in pat.url_patterns:
-			full_url = self.get_full_url(url_patt, url_root_res)
-			info = self.url_info(full_url)
-			status_code = info[0]
-			load_time = info[1]
-			print('Trying \'' + full_url + '\', ' + str(status_code) + ', ' + str(load_time))
+        root_urlconf = __import__(settings.ROOT_URLCONF)
+        patterns = root_urlconf.urls.urlpatterns
+        global full_url
+        for pat in patterns:
+            if pat.__class__.__name__ == 'RegexURLResolver':
+                url_root_res = str(pat).split('^')[1].replace('>', '')
+            if 'gui' in url_root_res:
+                for url_patt in pat.url_patterns:
+                    full_url = self.get_full_url(url_patt, url_root_res)
+                    info = self.url_info(full_url)
+                    status_code = info[0]
+                    load_time = info[1]
+                    print('Trying \'' + full_url + '\', ' + str(status_code) + ', ' + str(load_time))
 
     def get_full_url(self, url_patt, url_root_res):
-	full_url = str(url_patt).split('^')[1].replace('$>', '').replace('(?P<file_path>(?:/[', '/bin/busybox').replace('.*', '')
-	full_url = str(url_root_res + full_url)
-	full_url = re.sub('\(\?P<.*?>\\\d\+\)', '1', full_url)
-	full_url = 'http://localhost:8000/' + full_url
-	return full_url
+        full_url = str(url_patt).split('^')[1].replace('$>', '').replace('(?P<file_path>(?:/[', '/bin/busybox').replace('.*', '')
+        full_url = str(url_root_res + full_url)
+        full_url = re.sub('\(\?P<.*?>\\\d\+\)', '1', full_url)
+        full_url = 'http://localhost:8000/' + full_url
+        return full_url
 
     def url_info(self, full_url):
-	client = Client()
-	info = []
-	try:
-	    resp = client.get(full_url, follow = True)
-	except Exception as e_status_code:
+        client = Client()
+        info = []
+        try:
+            resp = client.get(full_url, follow = True)
+        except Exception as e_status_code:
             self.error('Url: %s, error: %s' % (full_url, e_status_code))
             resp = type('object', (), {'status_code':0, 'content': str(e_status_code)})
-	status_code = resp.status_code
-	info.append(status_code)
-	try:
-	    req = requests.get(full_url)
-	except Exception as e_load_time:
+        status_code = resp.status_code
+        info.append(status_code)
+        try:
+            req = requests.get(full_url)
+        except Exception as e_load_time:
             self.error('Url: %s, error: %s' % (full_url, e_load_time))
-	load_time = req.elapsed
-	info.append(load_time)
-	return info
+        load_time = req.elapsed
+        info.append(load_time)
+        return info
 
     def error(self, *args):
-	for arg in args:
-	    print(arg, end=' ', file=sys.stderr)
-	print(file=sys.stderr)
+        for arg in args:
+            print(arg, end=' ', file=sys.stderr)
+        print(file=sys.stderr)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] lib/toaster: fixup codebase so pydocstyle can parse
@ 2020-05-04 13:26 Frazer Clews
  0 siblings, 0 replies; 4+ messages in thread
From: Frazer Clews @ 2020-05-04 13:26 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Frazer Clews

From: Frazer Clews <frazer.clews@codethink.co.uk>

fixed literal comparison in lsupdates so the
integer isn't treated as a singleton, also fix
indentation in perf

Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk>
---
 .../orm/management/commands/lsupdates.py      |  2 +-
 .../toastermain/management/commands/perf.py   | 68 +++++++++----------
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/lib/toaster/orm/management/commands/lsupdates.py b/lib/toaster/orm/management/commands/lsupdates.py
index a4dbcaa7..2fbd7be3 100644
--- a/lib/toaster/orm/management/commands/lsupdates.py
+++ b/lib/toaster/orm/management/commands/lsupdates.py
@@ -68,7 +68,7 @@ class Command(BaseCommand):
                          (what,
                           pec))
         sys.stdout.flush()
-        if int(pec) is 100:
+        if int(pec) == 100:
             sys.stdout.write("\n")
             sys.stdout.flush()
 
diff --git a/lib/toaster/toastermain/management/commands/perf.py b/lib/toaster/toastermain/management/commands/perf.py
index 7d629fb3..5c41c5b2 100644
--- a/lib/toaster/toastermain/management/commands/perf.py
+++ b/lib/toaster/toastermain/management/commands/perf.py
@@ -17,46 +17,46 @@ class Command(BaseCommand):
     help    = "Test the response time for all toaster urls"
 
     def handle(self, *args, **options):
-	root_urlconf = __import__(settings.ROOT_URLCONF)
-	patterns = root_urlconf.urls.urlpatterns
-	global full_url
-	for pat in patterns:
-	    if pat.__class__.__name__ == 'RegexURLResolver':
-		url_root_res = str(pat).split('^')[1].replace('>', '')
-		if 'gui' in url_root_res:
-		    for url_patt in pat.url_patterns:
-			full_url = self.get_full_url(url_patt, url_root_res)
-			info = self.url_info(full_url)
-			status_code = info[0]
-			load_time = info[1]
-			print('Trying \'' + full_url + '\', ' + str(status_code) + ', ' + str(load_time))
+        root_urlconf = __import__(settings.ROOT_URLCONF)
+        patterns = root_urlconf.urls.urlpatterns
+        global full_url
+        for pat in patterns:
+            if pat.__class__.__name__ == 'RegexURLResolver':
+                url_root_res = str(pat).split('^')[1].replace('>', '')
+            if 'gui' in url_root_res:
+                for url_patt in pat.url_patterns:
+                    full_url = self.get_full_url(url_patt, url_root_res)
+                    info = self.url_info(full_url)
+                    status_code = info[0]
+                    load_time = info[1]
+                    print('Trying \'' + full_url + '\', ' + str(status_code) + ', ' + str(load_time))
 
     def get_full_url(self, url_patt, url_root_res):
-	full_url = str(url_patt).split('^')[1].replace('$>', '').replace('(?P<file_path>(?:/[', '/bin/busybox').replace('.*', '')
-	full_url = str(url_root_res + full_url)
-	full_url = re.sub('\(\?P<.*?>\\\d\+\)', '1', full_url)
-	full_url = 'http://localhost:8000/' + full_url
-	return full_url
+        full_url = str(url_patt).split('^')[1].replace('$>', '').replace('(?P<file_path>(?:/[', '/bin/busybox').replace('.*', '')
+        full_url = str(url_root_res + full_url)
+        full_url = re.sub('\(\?P<.*?>\\\d\+\)', '1', full_url)
+        full_url = 'http://localhost:8000/' + full_url
+        return full_url
 
     def url_info(self, full_url):
-	client = Client()
-	info = []
-	try:
-	    resp = client.get(full_url, follow = True)
-	except Exception as e_status_code:
+        client = Client()
+        info = []
+        try:
+            resp = client.get(full_url, follow = True)
+        except Exception as e_status_code:
             self.error('Url: %s, error: %s' % (full_url, e_status_code))
             resp = type('object', (), {'status_code':0, 'content': str(e_status_code)})
-	status_code = resp.status_code
-	info.append(status_code)
-	try:
-	    req = requests.get(full_url)
-	except Exception as e_load_time:
+        status_code = resp.status_code
+        info.append(status_code)
+        try:
+            req = requests.get(full_url)
+        except Exception as e_load_time:
             self.error('Url: %s, error: %s' % (full_url, e_load_time))
-	load_time = req.elapsed
-	info.append(load_time)
-	return info
+        load_time = req.elapsed
+        info.append(load_time)
+        return info
 
     def error(self, *args):
-	for arg in args:
-	    print(arg, end=' ', file=sys.stderr)
-	print(file=sys.stderr)
+        for arg in args:
+            print(arg, end=' ', file=sys.stderr)
+        print(file=sys.stderr)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-04 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 16:46 [PATCH] lib/toaster: fixup codebase so pydocstyle can parse Frazer Clews
2020-05-03 17:02 ` ✗ patchtest: failure for " Patchwork
2020-05-03 22:06   ` Frazer Clews
2020-05-04 13:26 [PATCH] " Frazer Clews

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.