[PATCH 46 of 52 Narval cube] [flake8] fix F841 local variable assigned to but never used

Nsukami Patrick ptrck at nskm.xyz
Wed Apr 1 11:34:46 CEST 2020


# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1585731938 0
#      Wed Apr 01 09:05:38 2020 +0000
# Node ID 2980b949b9c6ea579dda63682f87e77dfdd09a0b
# Parent  2ca121b113de94e352e4fb72560edcc2b6e4a00b
[flake8] fix F841 local variable assigned to but never used

diff --git a/cubicweb_narval/narvalbot/server.py b/cubicweb_narval/narvalbot/server.py
--- a/cubicweb_narval/narvalbot/server.py
+++ b/cubicweb_narval/narvalbot/server.py
@@ -250,7 +250,7 @@
         url = cnxh.instance_url + str(task.planeid)
         if cmd.returncode:
             try:
-                ret = cnxh.http_get(url, vid='fire_transition', trname='kill')
+                cnxh.http_get(url, vid='fire_transition', trname='kill')
             except requests.HTTPError as ex:
                 # CW returns a 409 (CONFLICT) on ValidationError,
                 # expected if plan already is done or failed
diff --git a/cubicweb_narval/views/plan.py b/cubicweb_narval/views/plan.py
--- a/cubicweb_narval/views/plan.py
+++ b/cubicweb_narval/views/plan.py
@@ -250,7 +250,6 @@
         if rset is None:
             rset = self.process_rql()
         assert len(rset) == 1
-        entity = rset.get_entity(0, 0)
         log_file = self._cw.entity_from_eid(int(posted['eid']))
         with NamedTemporaryFile() as tmpfile:
             if log_file.data:
diff --git a/test/unittest_security.py b/test/unittest_security.py
--- a/test/unittest_security.py
+++ b/test/unittest_security.py
@@ -54,8 +54,8 @@
                 cnx.commit()
 
         with self.new_access('toto').client_cnx() as cnx:
-            plan = cnx.create_entity('Plan', priority=LOW,
-                                     execution_of=recipe)
+            cnx.create_entity('Plan', priority=LOW,
+                              execution_of=recipe)
             cnx.commit()
 
 




More information about the cubicweb-devel mailing list