Skip to content

Commit

Permalink
chore: apply more linter suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Oct 18, 2024
1 parent d37c881 commit 9b4fccf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions arguebuf/cli/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path
from typing import Annotated

import arg_services
import grpc
Expand All @@ -17,10 +18,10 @@ def __init__(self, basepath: Path, glob: str):
self.glob = glob

def Casebase(
self, req: casebase_pb2.CasebaseRequest, context: grpc.ServicerContext
self, request: casebase_pb2.CasebaseRequest, context: grpc.ServicerContext
) -> casebase_pb2.CasebaseResponse:
cases = arguebuf.load.casebase(
req.include, req.exclude, self.basepath, self.glob
request.include, request.exclude, self.basepath, self.glob
)

return casebase_pb2.CasebaseResponse(
Expand All @@ -44,9 +45,9 @@ def callback(server: grpc.Server):

@cli.command()
def start(
address: str = typer.Argument("127.0.0.1:50051"),
basepath: Path = typer.Option(Path(".")),
glob: str = typer.Option("*/*"),
address: Annotated[str, typer.Argument("127.0.0.1:50051")],
basepath: Annotated[Path, typer.Option(Path("."))],
glob: Annotated[str, typer.Option("*/*")],
):
arg_services.serve(
address,
Expand Down
2 changes: 1 addition & 1 deletion arguebuf/load/_load_casebase.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def from_protobuf(cls, filter: CasebaseFilterProto) -> "CasebaseFilter":
return cls(filter.name, filter.cases, **filter.kwargs)


CasebaseFilterType = t.Union[CasebaseFilter, CasebaseFilterProto]
CasebaseFilterType = CasebaseFilter | CasebaseFilterProto


def convert_filters(
Expand Down

0 comments on commit 9b4fccf

Please sign in to comment.