diff --git a/beat/core/toolchain.py b/beat/core/toolchain.py
index 34d8a73c12a31a75fef426d32ed3da7c81268066..e98496115f7276119697e29d57b8ee530f00820d 100644
--- a/beat/core/toolchain.py
+++ b/beat/core/toolchain.py
@@ -127,7 +127,7 @@ class Toolchain(object):
         if data is None:  # loads prototype and validates it
 
             self.data, self.errors = prototypes.load("toolchain")
-            assert not self.errors, "\n  * %s" % "\n  *".join(self.errors)
+            assert not self.errors, "\n  * %s" % "\n  *".join(self.errors)  # nosec
 
         else:
 
@@ -152,7 +152,6 @@ class Toolchain(object):
         channels = []
         inputs = []
         outputs = []
-        loops = []
         names = {}
         connections = []
         loop_connections = []
@@ -328,11 +327,10 @@ class Toolchain(object):
     def _check_loop_connections(self, loop_connections):
         """Checks loop connection consistency"""
 
-        if not "loop_connections" in self.data:
+        if "loop_connections" not in self.data:
             return
 
         endpoints = dict()
-        unconnected_endpoints = dict()
 
         for i, connection in enumerate(self.data["loop_connections"]):
             from_ = connection["from"]
@@ -559,8 +557,6 @@ class Toolchain(object):
         title = title or "Toolchain: %s" % self.name
         channel_colors = self.data["representation"]["channel_colors"]
 
-        order = self.execution_order()
-
         from .drawing import make_label as make_drawing_label, make_layout_label
         from graphviz import Digraph