Run pyupgrade --py37-plus

This commit is contained in:
Nick Steel
2020-01-05 23:50:35 +00:00
parent 10cc04adae
commit dd93b42e1d
5 changed files with 3 additions and 14 deletions

View File

@ -1,6 +1,3 @@
from __future__ import unicode_literals
import logging, os, json, pathlib import logging, os, json, pathlib
import tornado.web import tornado.web
import tornado.websocket import tornado.websocket
@ -59,10 +56,10 @@ class ReactRouterHandler(tornado.web.StaticFileHandler):
self.path = path self.path = path
self.absolute_path = path self.absolute_path = path
self.dirname, self.filename = os.path.split(path) self.dirname, self.filename = os.path.split(path)
super(ReactRouterHandler, self).initialize(self.dirname) super().initialize(self.dirname)
def get(self, path=None, include_body=True): def get(self, path=None, include_body=True):
return super(ReactRouterHandler, self).get(self.path, include_body) return super().get(self.path, include_body)
## ##
# Frontend factory # Frontend factory

View File

@ -1,6 +1,3 @@
from __future__ import unicode_literals
import random, string, logging, json, pykka, urllib, os, sys, mopidy_iris, subprocess import random, string, logging, json, pykka, urllib, os, sys, mopidy_iris, subprocess
import tornado.web import tornado.web
import tornado.ioloop import tornado.ioloop

View File

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from mopidy.core import CoreListener from mopidy.core import CoreListener
from .core import IrisCore from .core import IrisCore
@ -13,7 +11,7 @@ logger = logging.getLogger(__name__)
class IrisFrontend(pykka.ThreadingActor, CoreListener): class IrisFrontend(pykka.ThreadingActor, CoreListener):
def __init__(self, config, core): def __init__(self, config, core):
super(IrisFrontend, self).__init__() super().__init__()
# Pass our Mopidy config and core to the IrisCore instance # Pass our Mopidy config and core to the IrisCore instance
iris.config = config iris.config = config

View File

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from datetime import datetime from datetime import datetime
from tornado.escape import json_encode, json_decode from tornado.escape import json_encode, json_decode
import tornado.ioloop, tornado.web, tornado.websocket, tornado.template import tornado.ioloop, tornado.web, tornado.websocket, tornado.template

View File

@ -1,4 +1,3 @@
from threading import Thread from threading import Thread
import os, logging, subprocess, json import os, logging, subprocess, json