Skip to content

Commit

Permalink
chore: remove now-unnecessary type ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
MHajoha committed Aug 22, 2024
1 parent 9361794 commit 3f71c8e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions questionpy_server/web/_routes/_attempts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
attempt_routes = web.RouteTableDef()


@attempt_routes.post(r"/packages/{package_hash:\w+}/attempt/start") # type: ignore[arg-type]
@attempt_routes.post(r"/packages/{package_hash:\w+}/attempt/start")
@ensure_required_parts
async def post_attempt_start(
request: web.Request, package: Package, question_state: bytes, data: AttemptStartArguments
Expand All @@ -35,7 +35,7 @@ async def post_attempt_start(
return pydantic_json_response(data=attempt, status=201)


@attempt_routes.post(r"/packages/{package_hash:\w+}/attempt/view") # type: ignore[arg-type]
@attempt_routes.post(r"/packages/{package_hash:\w+}/attempt/view")
@ensure_required_parts
async def post_attempt_view(
request: web.Request, package: Package, question_state: bytes, data: AttemptViewArguments
Expand All @@ -56,7 +56,7 @@ async def post_attempt_view(
return pydantic_json_response(data=attempt, status=201)


@attempt_routes.post(r"/packages/{package_hash:\w+}/attempt/score") # type: ignore[arg-type]
@attempt_routes.post(r"/packages/{package_hash:\w+}/attempt/score")
@ensure_required_parts
async def post_attempt_score(
request: web.Request, package: Package, question_state: bytes, data: AttemptScoreArguments
Expand Down
2 changes: 1 addition & 1 deletion questionpy_server/web/_routes/_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
file_routes = web.RouteTableDef()


@file_routes.post(r"/packages/{package_hash}/file/{namespace}/{short_name}/{path:static/.*}") # type: ignore[arg-type]
@file_routes.post(r"/packages/{package_hash}/file/{namespace}/{short_name}/{path:static/.*}")
@ensure_package
async def serve_static_file(request: web.Request, package: Package) -> web.Response:
qpy_server = request.app[QPyServer.APP_KEY]
Expand Down
6 changes: 3 additions & 3 deletions questionpy_server/web/_routes/_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def get_package(request: web.Request) -> web.Response:
return pydantic_json_response(data=package.get_info())


@package_routes.post(r"/packages/{package_hash:\w+}/options") # type: ignore[arg-type]
@package_routes.post(r"/packages/{package_hash:\w+}/options")
@ensure_required_parts
async def post_options(
request: web.Request, package: Package, data: RequestBaseData, question_state: bytes | None = None
Expand All @@ -60,7 +60,7 @@ async def post_options(
return pydantic_json_response(data=QuestionEditFormResponse(definition=definition, form_data=form_data))


@package_routes.post(r"/packages/{package_hash:\w+}/question") # type: ignore[arg-type]
@package_routes.post(r"/packages/{package_hash:\w+}/question")
@ensure_required_parts
async def post_question(
request: web.Request, data: QuestionCreateArguments, package: Package, question_state: bytes | None = None
Expand All @@ -83,7 +83,7 @@ async def post_question_migrate(_request: web.Request) -> web.Response:
raise HTTPMethodNotAllowed(msg, "")


@package_routes.post(r"/package-extract-info") # type: ignore[arg-type]
@package_routes.post(r"/package-extract-info")
@ensure_package
async def package_extract_info(_request: web.Request, package: Package) -> web.Response:
"""Get package information."""
Expand Down

0 comments on commit 3f71c8e

Please sign in to comment.