Upgrade to latest flake8, address new flake issues.
This commit is contained in:
parent
bd467a9b73
commit
c89c12062d
@ -1 +1,7 @@
|
||||
from bemani.api.app import app, config
|
||||
|
||||
|
||||
__all__ = [
|
||||
"app",
|
||||
"config",
|
||||
]
|
||||
|
@ -3,3 +3,12 @@ from bemani.api.objects.catalog import CatalogObject
|
||||
from bemani.api.objects.records import RecordsObject
|
||||
from bemani.api.objects.profile import ProfileObject
|
||||
from bemani.api.objects.statistics import StatisticsObject
|
||||
|
||||
|
||||
__all__ = [
|
||||
"BaseObject",
|
||||
"CatalogObject",
|
||||
"RecordsObject",
|
||||
"ProfileObject",
|
||||
"StatisticsObject",
|
||||
]
|
||||
|
@ -1,2 +1,9 @@
|
||||
from bemani.backend.dispatch import Dispatch, UnrecognizedPCBIDException
|
||||
from bemani.backend.base import Base
|
||||
|
||||
|
||||
__all__ = [
|
||||
"Dispatch",
|
||||
"UnrecognizedPCBIDException",
|
||||
"Base",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.backend.bishi.factory import BishiBashiFactory
|
||||
from bemani.backend.bishi.base import BishiBashiBase
|
||||
|
||||
|
||||
__all__ = [
|
||||
"BishiBashiFactory",
|
||||
"BishiBashiBase",
|
||||
]
|
||||
|
@ -1,3 +1,10 @@
|
||||
from bemani.backend.core.core import CoreHandler
|
||||
from bemani.backend.core.cardmng import CardManagerHandler
|
||||
from bemani.backend.core.eacoin import PASELIHandler
|
||||
|
||||
|
||||
__all__ = [
|
||||
"CoreHandler",
|
||||
"CardManagerHandler",
|
||||
"PASELIHandler",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.backend.ddr.factory import DDRFactory
|
||||
from bemani.backend.ddr.base import DDRBase
|
||||
|
||||
|
||||
__all__ = [
|
||||
"DDRFactory",
|
||||
"DDRBase",
|
||||
]
|
||||
|
@ -1 +1,6 @@
|
||||
from bemani.backend.ess.eventlog import EventLogHandler
|
||||
|
||||
|
||||
__all__ = [
|
||||
"EventLogHandler",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.backend.iidx.factory import IIDXFactory
|
||||
from bemani.backend.iidx.base import IIDXBase
|
||||
|
||||
|
||||
__all__ = [
|
||||
"IIDXFactory",
|
||||
"IIDXBase",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.backend.jubeat.factory import JubeatFactory
|
||||
from bemani.backend.jubeat.base import JubeatBase
|
||||
|
||||
|
||||
__all__ = [
|
||||
"JubeatFactory",
|
||||
"JubeatBase",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.backend.museca.factory import MusecaFactory
|
||||
from bemani.backend.museca.base import MusecaBase
|
||||
|
||||
|
||||
__all__ = [
|
||||
"MusecaFactory",
|
||||
"MusecaBase",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.backend.popn.factory import PopnMusicFactory
|
||||
from bemani.backend.popn.base import PopnMusicBase
|
||||
|
||||
|
||||
__all__ = [
|
||||
"PopnMusicFactory",
|
||||
"PopnMusicBase",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.backend.reflec.factory import ReflecBeatFactory
|
||||
from bemani.backend.reflec.base import ReflecBeatBase
|
||||
|
||||
|
||||
__all__ = [
|
||||
"ReflecBeatFactory",
|
||||
"ReflecBeatBase",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.backend.sdvx.factory import SoundVoltexFactory
|
||||
from bemani.backend.sdvx.base import SoundVoltexBase
|
||||
|
||||
|
||||
__all__ = [
|
||||
"SoundVoltexFactory",
|
||||
"SoundVoltexBase",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.client.base import BaseClient
|
||||
from bemani.client.protocol import ClientProtocol
|
||||
|
||||
|
||||
__all__ = [
|
||||
"BaseClient",
|
||||
"ClientProtocol",
|
||||
]
|
||||
|
@ -1 +1,6 @@
|
||||
from bemani.client.bishi.bishi import TheStarBishiBashiClient
|
||||
|
||||
|
||||
__all__ = [
|
||||
"TheStarBishiBashiClient",
|
||||
]
|
||||
|
@ -3,3 +3,12 @@ from bemani.client.ddr.ddrx3 import DDRX3Client
|
||||
from bemani.client.ddr.ddr2013 import DDR2013Client
|
||||
from bemani.client.ddr.ddr2014 import DDR2014Client
|
||||
from bemani.client.ddr.ddrace import DDRAceClient
|
||||
|
||||
|
||||
__all__ = [
|
||||
"DDRX2Client",
|
||||
"DDRX3Client",
|
||||
"DDR2013Client",
|
||||
"DDR2014Client",
|
||||
"DDRAceClient",
|
||||
]
|
||||
|
@ -3,3 +3,12 @@ from bemani.client.iidx.spada import IIDXSpadaClient
|
||||
from bemani.client.iidx.pendual import IIDXPendualClient
|
||||
from bemani.client.iidx.copula import IIDXCopulaClient
|
||||
from bemani.client.iidx.sinobuz import IIDXSinobuzClient
|
||||
|
||||
|
||||
__all__ = [
|
||||
"IIDXTricoroClient",
|
||||
"IIDXSpadaClient",
|
||||
"IIDXPendualClient",
|
||||
"IIDXCopulaClient",
|
||||
"IIDXSinobuzClient",
|
||||
]
|
||||
|
@ -3,3 +3,12 @@ from bemani.client.jubeat.saucerfulfill import JubeatSaucerFulfillClient
|
||||
from bemani.client.jubeat.prop import JubeatPropClient
|
||||
from bemani.client.jubeat.qubell import JubeatQubellClient
|
||||
from bemani.client.jubeat.clan import JubeatClanClient
|
||||
|
||||
|
||||
__all__ = [
|
||||
"JubeatSaucerClient",
|
||||
"JubeatSaucerFulfillClient",
|
||||
"JubeatPropClient",
|
||||
"JubeatQubellClient",
|
||||
"JubeatClanClient",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.client.museca.museca1 import Museca1Client
|
||||
from bemani.client.museca.museca1plus import Museca1PlusClient
|
||||
|
||||
|
||||
__all__ = [
|
||||
"Museca1Client",
|
||||
"Museca1PlusClient",
|
||||
]
|
||||
|
@ -4,3 +4,13 @@ from bemani.client.popn.sunnypark import PopnMusicSunnyParkClient
|
||||
from bemani.client.popn.lapistoria import PopnMusicLapistoriaClient
|
||||
from bemani.client.popn.eclale import PopnMusicEclaleClient
|
||||
from bemani.client.popn.usaneko import PopnMusicUsaNekoClient
|
||||
|
||||
|
||||
__all__ = [
|
||||
"PopnMusicTuneStreetClient",
|
||||
"PopnMusicFantasiaClient",
|
||||
"PopnMusicSunnyParkClient",
|
||||
"PopnMusicLapistoriaClient",
|
||||
"PopnMusicEclaleClient",
|
||||
"PopnMusicUsaNekoClient",
|
||||
]
|
||||
|
@ -4,3 +4,13 @@ from bemani.client.reflec.colette import ReflecBeatColette
|
||||
from bemani.client.reflec.groovin import ReflecBeatGroovinUpper
|
||||
from bemani.client.reflec.volzza import ReflecBeatVolzza
|
||||
from bemani.client.reflec.volzza2 import ReflecBeatVolzza2
|
||||
|
||||
|
||||
__all__ = [
|
||||
"ReflecBeat",
|
||||
"ReflecBeatLimelight",
|
||||
"ReflecBeatColette",
|
||||
"ReflecBeatGroovinUpper",
|
||||
"ReflecBeatVolzza",
|
||||
"ReflecBeatVolzza2",
|
||||
]
|
||||
|
@ -3,3 +3,12 @@ from bemani.client.sdvx.infiniteinfection import SoundVoltexInfiniteInfectionCli
|
||||
from bemani.client.sdvx.gravitywars_s1 import SoundVoltexGravityWarsS1Client
|
||||
from bemani.client.sdvx.gravitywars_s2 import SoundVoltexGravityWarsS2Client
|
||||
from bemani.client.sdvx.heavenlyhaven import SoundVoltexHeavenlyHavenClient
|
||||
|
||||
|
||||
__all__ = [
|
||||
"SoundVoltexBoothClient",
|
||||
"SoundVoltexInfiniteInfectionClient",
|
||||
"SoundVoltexGravityWarsS1Client",
|
||||
"SoundVoltexGravityWarsS2Client",
|
||||
"SoundVoltexHeavenlyHavenClient",
|
||||
]
|
||||
|
@ -7,3 +7,21 @@ from bemani.common.id import ID
|
||||
from bemani.common.aes import AESCipher
|
||||
from bemani.common.time import Time
|
||||
from bemani.common.parallel import Parallel
|
||||
|
||||
|
||||
__all__ = [
|
||||
"Model",
|
||||
"ValidatedDict",
|
||||
"HTTP",
|
||||
"APIConstants",
|
||||
"GameConstants",
|
||||
"VersionConstants",
|
||||
"DBConstants",
|
||||
"CardCipher",
|
||||
"CardCipherException",
|
||||
"ID",
|
||||
"AESCipher",
|
||||
"Time",
|
||||
"Parallel",
|
||||
"intish",
|
||||
]
|
||||
|
@ -2,3 +2,25 @@ from bemani.data.data import Data, DBCreateException
|
||||
from bemani.data.exceptions import ScoreSaveException
|
||||
from bemani.data.types import User, Achievement, Machine, Arcade, Score, Attempt, News, Link, Song, Event, Server, Client, UserID, ArcadeID
|
||||
from bemani.data.remoteuser import RemoteUser
|
||||
|
||||
|
||||
__all__ = [
|
||||
"Data",
|
||||
"DBCreateException",
|
||||
"ScoreSaveException",
|
||||
"User",
|
||||
"Achievement",
|
||||
"Machine",
|
||||
"Arcade",
|
||||
"Score",
|
||||
"Attempt",
|
||||
"News",
|
||||
"Link",
|
||||
"Song",
|
||||
"Event",
|
||||
"Server",
|
||||
"Client",
|
||||
"UserID",
|
||||
"ArcadeID",
|
||||
"RemoteUser",
|
||||
]
|
||||
|
@ -3,3 +3,13 @@ from bemani.format.arc import ARC
|
||||
from bemani.format.twodx import TwoDX
|
||||
from bemani.format.iidxchart import IIDXChart
|
||||
from bemani.format.iidxmusicdb import IIDXMusicDB, IIDXSong
|
||||
|
||||
|
||||
__all__ = [
|
||||
"IFS",
|
||||
"ARC",
|
||||
"TwoDX",
|
||||
"IIDXChart",
|
||||
"IIDXMusicDB",
|
||||
"IIDXSong",
|
||||
]
|
||||
|
@ -1 +1,9 @@
|
||||
from bemani.frontend.app import app, config, loginrequired, loginprohibited
|
||||
|
||||
|
||||
__all__ = [
|
||||
"app",
|
||||
"config",
|
||||
"loginrequired",
|
||||
"loginprohibited",
|
||||
]
|
||||
|
@ -1 +1,6 @@
|
||||
from bemani.frontend.account.account import account_pages
|
||||
|
||||
|
||||
__all__ = [
|
||||
"account_pages",
|
||||
]
|
||||
|
@ -1 +1,6 @@
|
||||
from bemani.frontend.admin.admin import admin_pages
|
||||
|
||||
|
||||
__all__ = [
|
||||
"admin_pages",
|
||||
]
|
||||
|
@ -1 +1,6 @@
|
||||
from bemani.frontend.arcade.arcade import arcade_pages
|
||||
|
||||
|
||||
__all__ = [
|
||||
"arcade_pages",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.frontend.bishi.endpoints import bishi_pages
|
||||
from bemani.frontend.bishi.cache import BishiBashiCache
|
||||
|
||||
|
||||
__all__ = [
|
||||
"BishiBashiCache",
|
||||
"bishi_pages",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.frontend.ddr.endpoints import ddr_pages
|
||||
from bemani.frontend.ddr.cache import DDRCache
|
||||
|
||||
|
||||
__all__ = [
|
||||
"DDRCache",
|
||||
"ddr_pages",
|
||||
]
|
||||
|
@ -1 +1,6 @@
|
||||
from bemani.frontend.home.home import home_pages
|
||||
|
||||
|
||||
__all__ = [
|
||||
"home_pages",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.frontend.iidx.endpoints import iidx_pages
|
||||
from bemani.frontend.iidx.cache import IIDXCache
|
||||
|
||||
|
||||
__all__ = [
|
||||
"IIDXCache",
|
||||
"iidx_pages",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.frontend.jubeat.endpoints import jubeat_pages
|
||||
from bemani.frontend.jubeat.cache import JubeatCache
|
||||
|
||||
|
||||
__all__ = [
|
||||
"JubeatCache",
|
||||
"jubeat_pages",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.frontend.museca.endpoints import museca_pages
|
||||
from bemani.frontend.museca.cache import MusecaCache
|
||||
|
||||
|
||||
__all__ = [
|
||||
"MusecaCache",
|
||||
"museca_pages",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.frontend.popn.endpoints import popn_pages
|
||||
from bemani.frontend.popn.cache import PopnMusicCache
|
||||
|
||||
|
||||
__all__ = [
|
||||
"PopnMusicCache",
|
||||
"popn_pages",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.frontend.reflec.endpoints import reflec_pages
|
||||
from bemani.frontend.reflec.cache import ReflecBeatCache
|
||||
|
||||
|
||||
__all__ = [
|
||||
"ReflecBeatCache",
|
||||
"reflec_pages",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.frontend.sdvx.endpoints import sdvx_pages
|
||||
from bemani.frontend.sdvx.cache import SoundVoltexCache
|
||||
|
||||
|
||||
__all__ = [
|
||||
"SoundVoltexCache",
|
||||
"sdvx_pages",
|
||||
]
|
||||
|
@ -1,3 +1,8 @@
|
||||
import os
|
||||
|
||||
static_location = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
__all__ = [
|
||||
"static_location",
|
||||
]
|
||||
|
@ -1,3 +1,8 @@
|
||||
import os
|
||||
|
||||
templates_location = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
__all__ = [
|
||||
"templates_location",
|
||||
]
|
||||
|
@ -1,2 +1,8 @@
|
||||
from bemani.protocol.protocol import EAmuseProtocol, EAmuseException
|
||||
from bemani.protocol.node import Node
|
||||
|
||||
__all__ = [
|
||||
"EAmuseProtocol",
|
||||
"EAmuseException",
|
||||
"Node",
|
||||
]
|
||||
|
@ -857,7 +857,7 @@ class Node:
|
||||
return False
|
||||
|
||||
return True
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
def __ne__(self, other: object) -> bool:
|
||||
|
@ -1 +1,6 @@
|
||||
from bemani.sniff.sniff import Sniffer
|
||||
|
||||
|
||||
__all__ = [
|
||||
"Sniffer",
|
||||
]
|
||||
|
@ -35,7 +35,7 @@ def mainloop(address: Optional[str]=None, port: int=80, verbose: bool=False) ->
|
||||
inbound['headers'].get('x-eamuse-info'),
|
||||
inbound['data']
|
||||
)
|
||||
except EAmuseException as e:
|
||||
except EAmuseException:
|
||||
in_req = None
|
||||
|
||||
print("Inbound request (from {}:{} to {}:{}):".format(
|
||||
@ -63,7 +63,7 @@ def mainloop(address: Optional[str]=None, port: int=80, verbose: bool=False) ->
|
||||
outbound['headers'].get('x-eamuse-info'),
|
||||
outbound['data']
|
||||
)
|
||||
except EAmuseException as e:
|
||||
except EAmuseException:
|
||||
out_req = None
|
||||
|
||||
print("Outbound response (from {}:{} to {}:{}):".format(
|
||||
|
@ -4,7 +4,7 @@ Requests
|
||||
mysqlclient
|
||||
passlib
|
||||
mypy
|
||||
flake8==3.5.0
|
||||
flake8
|
||||
typed-ast
|
||||
SQLAlchemy
|
||||
alembic
|
||||
|
@ -1,3 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
flake8 bemani/ --ignore E501 | grep -v "migrations\/" | grep -v "__init__.*F401"
|
||||
flake8 bemani/ --ignore E501,E252,W504 | grep -v "migrations\/"
|
||||
|
@ -30,11 +30,9 @@ do
|
||||
cmdline+=("bemani.utils.$project")
|
||||
done
|
||||
|
||||
echo "Verifying type information..."
|
||||
MYPYPATH=$(python -c "import os; print(os.path.realpath('.'))") mypy \
|
||||
"${cmdline[@]}" \
|
||||
--warn-redundant-casts \
|
||||
--disallow-untyped-calls \
|
||||
--disallow-untyped-defs \
|
||||
--no-strict-optional
|
||||
echo "Done!"
|
||||
|
Loading…
x
Reference in New Issue
Block a user