mirror of
https://github.com/kennethreitz/replit-py.git
synced 2026-06-05 23:10:18 +00:00
black formatting
This commit is contained in:
@@ -331,7 +331,11 @@ class Audio:
|
||||
LoopCount=loop_count,
|
||||
Volume=volume,
|
||||
Type=str(ReaderType.tone),
|
||||
Args=RequestArgs(WaveType=wave_type, Pitch=pitch, Seconds=duration,),
|
||||
Args=RequestArgs(
|
||||
WaveType=wave_type,
|
||||
Pitch=pitch,
|
||||
Seconds=duration,
|
||||
),
|
||||
)
|
||||
|
||||
with open("/tmp/audio", "w") as f:
|
||||
|
||||
@@ -84,7 +84,10 @@ class AsyncJSONKey:
|
||||
return await self._error("Invalid JSON data read", read)
|
||||
|
||||
if not self._is_valid_type(data):
|
||||
return await self._error(self._type_mismatch_msg(data), read,)
|
||||
return await self._error(
|
||||
self._type_mismatch_msg(data),
|
||||
read,
|
||||
)
|
||||
return data
|
||||
|
||||
async def _error(self, error: str, read: str) -> JSON_TYPE:
|
||||
@@ -209,7 +212,10 @@ class JSONKey(AsyncJSONKey):
|
||||
data = read
|
||||
|
||||
if not self._is_valid_type(data):
|
||||
return self._error(self._type_mismatch_msg(data), read,)
|
||||
return self._error(
|
||||
self._type_mismatch_msg(data),
|
||||
read,
|
||||
)
|
||||
return data
|
||||
|
||||
def _error(self, error: str, read: str) -> JSON_TYPE:
|
||||
|
||||
@@ -92,7 +92,11 @@ class App(flask.Flask):
|
||||
self.jinja_env.trim_blocks = True
|
||||
self.jinja_env.lstrip_blocks = True
|
||||
|
||||
def login_wall(self, exclude: Set[str] = ("/",), handler: Callable = None,) -> None:
|
||||
def login_wall(
|
||||
self,
|
||||
exclude: Set[str] = ("/",),
|
||||
handler: Callable = None,
|
||||
) -> None:
|
||||
"""Require users to be logged-in on all pages.
|
||||
|
||||
Args:
|
||||
|
||||
Reference in New Issue
Block a user