1
0
mirror of synced 2025-01-18 14:14:03 +01:00

Upgrade to latest flake8, address new flake issues.

This commit is contained in:
Jennifer Taylor 2019-12-10 01:10:14 +00:00
parent bd467a9b73
commit c89c12062d
47 changed files with 307 additions and 7 deletions

View File

@ -1 +1,7 @@
from bemani.api.app import app, config
__all__ = [
"app",
"config",
]

View File

@ -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",
]

View File

@ -1,2 +1,9 @@
from bemani.backend.dispatch import Dispatch, UnrecognizedPCBIDException
from bemani.backend.base import Base
__all__ = [
"Dispatch",
"UnrecognizedPCBIDException",
"Base",
]

View File

@ -1,2 +1,8 @@
from bemani.backend.bishi.factory import BishiBashiFactory
from bemani.backend.bishi.base import BishiBashiBase
__all__ = [
"BishiBashiFactory",
"BishiBashiBase",
]

View File

@ -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",
]

View File

@ -1,2 +1,8 @@
from bemani.backend.ddr.factory import DDRFactory
from bemani.backend.ddr.base import DDRBase
__all__ = [
"DDRFactory",
"DDRBase",
]

View File

@ -1 +1,6 @@
from bemani.backend.ess.eventlog import EventLogHandler
__all__ = [
"EventLogHandler",
]

View File

@ -1,2 +1,8 @@
from bemani.backend.iidx.factory import IIDXFactory
from bemani.backend.iidx.base import IIDXBase
__all__ = [
"IIDXFactory",
"IIDXBase",
]

View File

@ -1,2 +1,8 @@
from bemani.backend.jubeat.factory import JubeatFactory
from bemani.backend.jubeat.base import JubeatBase
__all__ = [
"JubeatFactory",
"JubeatBase",
]

View File

@ -1,2 +1,8 @@
from bemani.backend.museca.factory import MusecaFactory
from bemani.backend.museca.base import MusecaBase
__all__ = [
"MusecaFactory",
"MusecaBase",
]

View File

@ -1,2 +1,8 @@
from bemani.backend.popn.factory import PopnMusicFactory
from bemani.backend.popn.base import PopnMusicBase
__all__ = [
"PopnMusicFactory",
"PopnMusicBase",
]

View File

@ -1,2 +1,8 @@
from bemani.backend.reflec.factory import ReflecBeatFactory
from bemani.backend.reflec.base import ReflecBeatBase
__all__ = [
"ReflecBeatFactory",
"ReflecBeatBase",
]

View File

@ -1,2 +1,8 @@
from bemani.backend.sdvx.factory import SoundVoltexFactory
from bemani.backend.sdvx.base import SoundVoltexBase
__all__ = [
"SoundVoltexFactory",
"SoundVoltexBase",
]

View File

@ -1,2 +1,8 @@
from bemani.client.base import BaseClient
from bemani.client.protocol import ClientProtocol
__all__ = [
"BaseClient",
"ClientProtocol",
]

View File

@ -1 +1,6 @@
from bemani.client.bishi.bishi import TheStarBishiBashiClient
__all__ = [
"TheStarBishiBashiClient",
]

View File

@ -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",
]

View File

@ -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",
]

View File

@ -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",
]

View File

@ -1,2 +1,8 @@
from bemani.client.museca.museca1 import Museca1Client
from bemani.client.museca.museca1plus import Museca1PlusClient
__all__ = [
"Museca1Client",
"Museca1PlusClient",
]

View File

@ -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",
]

View File

@ -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",
]

View File

@ -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",
]

View File

@ -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",
]

View File

@ -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",
]

View File

@ -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",
]

View File

@ -1 +1,9 @@
from bemani.frontend.app import app, config, loginrequired, loginprohibited
__all__ = [
"app",
"config",
"loginrequired",
"loginprohibited",
]

View File

@ -1 +1,6 @@
from bemani.frontend.account.account import account_pages
__all__ = [
"account_pages",
]

View File

@ -1 +1,6 @@
from bemani.frontend.admin.admin import admin_pages
__all__ = [
"admin_pages",
]

View File

@ -1 +1,6 @@
from bemani.frontend.arcade.arcade import arcade_pages
__all__ = [
"arcade_pages",
]

View File

@ -1,2 +1,8 @@
from bemani.frontend.bishi.endpoints import bishi_pages
from bemani.frontend.bishi.cache import BishiBashiCache
__all__ = [
"BishiBashiCache",
"bishi_pages",
]

View File

@ -1,2 +1,8 @@
from bemani.frontend.ddr.endpoints import ddr_pages
from bemani.frontend.ddr.cache import DDRCache
__all__ = [
"DDRCache",
"ddr_pages",
]

View File

@ -1 +1,6 @@
from bemani.frontend.home.home import home_pages
__all__ = [
"home_pages",
]

View File

@ -1,2 +1,8 @@
from bemani.frontend.iidx.endpoints import iidx_pages
from bemani.frontend.iidx.cache import IIDXCache
__all__ = [
"IIDXCache",
"iidx_pages",
]

View File

@ -1,2 +1,8 @@
from bemani.frontend.jubeat.endpoints import jubeat_pages
from bemani.frontend.jubeat.cache import JubeatCache
__all__ = [
"JubeatCache",
"jubeat_pages",
]

View File

@ -1,2 +1,8 @@
from bemani.frontend.museca.endpoints import museca_pages
from bemani.frontend.museca.cache import MusecaCache
__all__ = [
"MusecaCache",
"museca_pages",
]

View File

@ -1,2 +1,8 @@
from bemani.frontend.popn.endpoints import popn_pages
from bemani.frontend.popn.cache import PopnMusicCache
__all__ = [
"PopnMusicCache",
"popn_pages",
]

View File

@ -1,2 +1,8 @@
from bemani.frontend.reflec.endpoints import reflec_pages
from bemani.frontend.reflec.cache import ReflecBeatCache
__all__ = [
"ReflecBeatCache",
"reflec_pages",
]

View File

@ -1,2 +1,8 @@
from bemani.frontend.sdvx.endpoints import sdvx_pages
from bemani.frontend.sdvx.cache import SoundVoltexCache
__all__ = [
"SoundVoltexCache",
"sdvx_pages",
]

View File

@ -1,3 +1,8 @@
import os
static_location = os.path.abspath(os.path.dirname(__file__))
__all__ = [
"static_location",
]

View File

@ -1,3 +1,8 @@
import os
templates_location = os.path.abspath(os.path.dirname(__file__))
__all__ = [
"templates_location",
]

View File

@ -1,2 +1,8 @@
from bemani.protocol.protocol import EAmuseProtocol, EAmuseException
from bemani.protocol.node import Node
__all__ = [
"EAmuseProtocol",
"EAmuseException",
"Node",
]

View File

@ -857,7 +857,7 @@ class Node:
return False
return True
except Exception as e:
except Exception:
return False
def __ne__(self, other: object) -> bool:

View File

@ -1 +1,6 @@
from bemani.sniff.sniff import Sniffer
__all__ = [
"Sniffer",
]

View File

@ -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(

View File

@ -4,7 +4,7 @@ Requests
mysqlclient
passlib
mypy
flake8==3.5.0
flake8
typed-ast
SQLAlchemy
alembic

View File

@ -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\/"

View File

@ -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!"