Skip to content

Commit

Permalink
Update black (encode#2114)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee authored Apr 5, 2023
1 parent 94b1d70 commit 597071c
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-e .[full]

# Testing
black==22.12.0
black==23.3.0
coverage==7.1.0
importlib-metadata==4.13.0
mypy==1.0.1
Expand Down
1 change: 0 additions & 1 deletion starlette/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#
# See issue: https://github.com/encode/starlette/issues/1365
try:

# check if the Python version supports the parameter
# using usedforsecurity=False to avoid an exception on FIPS systems
# that reject usedforsecurity=True
Expand Down
2 changes: 0 additions & 2 deletions starlette/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ async def method_not_allowed(self, request: Request) -> Response:


class WebSocketEndpoint:

encoding: typing.Optional[str] = None # May be "text", "bytes", or "json".

def __init__(self, scope: Scope, receive: Receive, send: Send) -> None:
Expand Down Expand Up @@ -91,7 +90,6 @@ async def dispatch(self) -> None:
await self.on_disconnect(websocket, close_code)

async def decode(self, websocket: WebSocket, message: Message) -> typing.Any:

if self.encoding == "text":
if "text" not in message:
await websocket.close(code=status.WS_1003_UNSUPPORTED_DATA)
Expand Down
1 change: 0 additions & 1 deletion starlette/middleware/cors.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def __init__(
expose_headers: typing.Sequence[str] = (),
max_age: int = 600,
) -> None:

if "*" in allow_methods:
allow_methods = ALL_METHODS

Expand Down
1 change: 0 additions & 1 deletion starlette/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def get_schema(self, routes: typing.List[BaseRoute]) -> dict:
endpoints_info = self.get_endpoints(routes)

for endpoint in endpoints_info:

parsed = self.parse_docstring(endpoint.func)

if not parsed:
Expand Down
2 changes: 1 addition & 1 deletion starlette/templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(
context_processors: typing.Optional[
typing.List[typing.Callable[[Request], typing.Dict[str, typing.Any]]]
] = None,
**env_options: typing.Any
**env_options: typing.Any,
) -> None:
assert jinja2 is not None, "jinja2 must be installed to use Jinja2Templates"
self.env = self._create_env(directory, **env_options)
Expand Down

0 comments on commit 597071c

Please sign in to comment.