Skip to content

Commit

Permalink
Fix super(self.__class__, self).__init__()
Browse files Browse the repository at this point in the history
  • Loading branch information
my8100 committed Apr 17, 2019
1 parent eb8baba commit a0bcf07
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion scrapydweb/files/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ItemsView(MyView):
methods = ['GET']

def __init__(self):
super(self.__class__, self).__init__()
super(ItemsView, self).__init__()

self.project = self.view_args['project']
self.spider = self.view_args['spider']
Expand Down
2 changes: 1 addition & 1 deletion scrapydweb/files/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LogView(MyView):
job_finished_set = job_finished_set

def __init__(self):
super(self.__class__, self).__init__() # super().__init__()
super(LogView, self).__init__() # super().__init__()

self.opt = self.view_args['opt']
self.project = self.view_args['project']
Expand Down
2 changes: 1 addition & 1 deletion scrapydweb/files/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LogsView(MyView):
methods = ['GET']

def __init__(self):
super(self.__class__, self).__init__()
super(LogsView, self).__init__()

self.project = self.view_args['project']
self.spider = self.view_args['spider']
Expand Down
4 changes: 2 additions & 2 deletions scrapydweb/files/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def source(filename):
class UploadLogView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(UploadLogView, self).__init__()

self.template = 'scrapydweb/parse.html'

Expand Down Expand Up @@ -57,7 +57,7 @@ def dispatch_request(self, **kwargs):
class UploadedLogView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(UploadedLogView, self).__init__()

self.filename = self.view_args['filename']
self.template = 'scrapydweb/stats.html'
Expand Down
2 changes: 1 addition & 1 deletion scrapydweb/files/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class ProjectsView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(ProjectsView, self).__init__()

self.opt = self.view_args['opt']
self.project = self.view_args['project']
Expand Down
2 changes: 1 addition & 1 deletion scrapydweb/myview.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def update_g(self):
class MetadataView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(MetadataView, self).__init__()

def dispatch_request(self, **kwargs):
return self.json_dumps(handle_metadata())
6 changes: 3 additions & 3 deletions scrapydweb/operations/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
class DeployView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(DeployView, self).__init__()

self.url = 'http://{}/{}.json'.format(self.SCRAPYD_SERVER, 'addversion')
self.template = 'scrapydweb/deploy.html'
Expand Down Expand Up @@ -137,7 +137,7 @@ class DeployUploadView(MyView):
methods = ['POST']

def __init__(self):
super(self.__class__, self).__init__()
super(DeployUploadView, self).__init__()

self.url = ''
self.template = 'scrapydweb/deploy_results.html'
Expand Down Expand Up @@ -388,7 +388,7 @@ def prepare_data(self):
class DeployXhrView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(DeployXhrView, self).__init__()

self.eggname = self.view_args['eggname']
self.project = self.view_args['project']
Expand Down
10 changes: 5 additions & 5 deletions scrapydweb/operations/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def history():
class ScheduleView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(ScheduleView, self).__init__()

self.project = self.view_args['project']
self.version = self.view_args['version']
Expand Down Expand Up @@ -209,7 +209,7 @@ def update_kwargs(self):
class ScheduleCheckView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(ScheduleCheckView, self).__init__()

self.url = 'http://%s/schedule.json' % self.SCRAPYD_SERVER
self.template = 'scrapydweb/schedule.html'
Expand Down Expand Up @@ -328,7 +328,7 @@ def update_data_for_timer_task(self):
class ScheduleRunView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(ScheduleRunView, self).__init__()

self.url = ''
self.template = 'scrapydweb/schedule_results.html'
Expand Down Expand Up @@ -592,7 +592,7 @@ def generate_response(self):
class ScheduleXhrView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(ScheduleXhrView, self).__init__()

self.filename = self.view_args['filename']
self.url = 'http://%s/schedule.json' % self.SCRAPYD_SERVER
Expand All @@ -614,7 +614,7 @@ def dispatch_request(self, **kwargs):
class ScheduleTaskView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(ScheduleTaskView, self).__init__()

self.url = 'http://%s/schedule.json' % self.SCRAPYD_SERVER
self.task_id = request.form['task_id']
Expand Down
4 changes: 2 additions & 2 deletions scrapydweb/overview/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class JobsView(MyView):
metadata = metadata

def __init__(self):
super(self.__class__, self).__init__()
super(JobsView, self).__init__()

style = request.args.get('style')
self.style = style if style in ['database', 'classic'] else self.metadata['style']
Expand Down Expand Up @@ -417,7 +417,7 @@ class JobsXhrView(MyView):
metadata = metadata

def __init__(self):
super(self.__class__, self).__init__()
super(JobsXhrView, self).__init__()

self.action = self.view_args['action'] # delete
self.id = self.view_args['id'] # <int:id>
Expand Down
2 changes: 1 addition & 1 deletion scrapydweb/overview/multinode.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class MultinodeView(MyView):
methods = ['POST']

def __init__(self):
super(self.__class__, self).__init__()
super(MultinodeView, self).__init__()

self.opt = self.view_args['opt']
self.project = self.view_args['project']
Expand Down
2 changes: 1 addition & 1 deletion scrapydweb/overview/servers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ServersView(MyView):
metadata = metadata

def __init__(self):
super(self.__class__, self).__init__()
super(ServersView, self).__init__()

self.opt = self.view_args['opt']
self.project = self.view_args['project']
Expand Down
4 changes: 2 additions & 2 deletions scrapydweb/overview/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TasksView(MyView):
metadata = metadata

def __init__(self):
super(self.__class__, self).__init__()
super(TasksView, self).__init__()

self.task_id = self.view_args['task_id'] # <int:task_id>, 0 ok, -1 fail
self.task_result_id = self.view_args['task_result_id'] # <int:task_result_id>
Expand Down Expand Up @@ -255,7 +255,7 @@ def query_task_job_results(self):
class TasksXhrView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(TasksXhrView, self).__init__()

self.action = self.view_args['action'] # pause|resume|remove|delete|dump|fire
self.task_id = self.view_args['task_id'] # <int:task_id>
Expand Down
2 changes: 1 addition & 1 deletion scrapydweb/system/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SettingsView(MyView):
methods = ['GET']

def __init__(self):
super(self.__class__, self).__init__()
super(SettingsView, self).__init__()

self.template = 'scrapydweb/settings.html'
self.kwargs = dict(node=self.node)
Expand Down
2 changes: 1 addition & 1 deletion scrapydweb/views/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class ApiView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(ApiView, self).__init__()

self.opt = self.view_args['opt']
self.project = self.view_args['project']
Expand Down
2 changes: 1 addition & 1 deletion scrapydweb/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class IndexView(MyView):

def __init__(self):
super(self.__class__, self).__init__()
super(IndexView, self).__init__()

def dispatch_request(self, **kwargs):
if self.SCRAPYD_SERVERS_AMOUNT == 1:
Expand Down

0 comments on commit a0bcf07

Please sign in to comment.