Browse Source

fixed pylint

Dimitri Korsch 3 years ago
parent
commit
56350dc7df

+ 1 - 0
pycs/database/Project.py

@@ -257,6 +257,7 @@ class Project(NamedBaseModel):
 
 
             label_obj.parent_id = parent_label_obj.id
             label_obj.parent_id = parent_label_obj.id
 
 
+    # pylint: disable=no-self-use
     def __check_labels(self, labels):
     def __check_labels(self, labels):
         """ check labels for unique keys and cycles """
         """ check labels for unique keys and cycles """
 
 

+ 3 - 3
pycs/frontend/endpoints/projects/ExecuteLabelProvider.py

@@ -7,14 +7,11 @@ from flask.views import View
 
 
 from pycs import db
 from pycs import db
 from pycs.database.LabelProvider import LabelProvider
 from pycs.database.LabelProvider import LabelProvider
-from pycs.database.Label import Label
 from pycs.database.Project import Project
 from pycs.database.Project import Project
 from pycs.frontend.notifications.NotificationManager import NotificationManager
 from pycs.frontend.notifications.NotificationManager import NotificationManager
 from pycs.jobs.JobGroupBusyException import JobGroupBusyException
 from pycs.jobs.JobGroupBusyException import JobGroupBusyException
 from pycs.jobs.JobRunner import JobRunner
 from pycs.jobs.JobRunner import JobRunner
 
 
-from tqdm import tqdm
-
 
 
 class ExecuteLabelProvider(View):
 class ExecuteLabelProvider(View):
     """db
     """db
@@ -78,6 +75,9 @@ class ExecuteLabelProvider(View):
                 project = Project.query.get(project_id)
                 project = Project.query.get(project_id)
                 labels = project.bulk_create_labels(provided_labels)
                 labels = project.bulk_create_labels(provided_labels)
 
 
+                for label in labels:
+                    nm.create_label(label)
+
         # run job with given functions
         # run job with given functions
         jobs.run(project,
         jobs.run(project,
                  'Label Provider',
                  'Label Provider',