Skip to content

Commit 6d6c953

Browse files
Only dereference --method-filter when generating clients
1 parent 93bb7f6 commit 6d6c953

File tree

1 file changed

+5
-5
lines changed
  • src/replit_river/codegen

1 file changed

+5
-5
lines changed

src/replit_river/codegen/run.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ def main() -> None:
4848
client.add_argument("schema", help="schema file")
4949
args = parser.parse_args()
5050

51-
method_filter: set[str] | None = None
52-
if args.method_filter:
53-
with open(args.method_filter) as handle:
54-
method_filter = set(x.strip() for x in handle.readlines())
55-
5651
if args.command == "server":
5752
proto_path = os.path.abspath(args.proto)
5853
target_directory = os.path.abspath(args.output)
@@ -68,6 +63,11 @@ def main() -> None:
6863
def file_opener(path: Path) -> TextIO:
6964
return open(path, "w")
7065

66+
method_filter: set[str] | None = None
67+
if args.method_filter:
68+
with open(args.method_filter) as handle:
69+
method_filter = set(x.strip() for x in handle.readlines())
70+
7171
schema_to_river_client_codegen(
7272
lambda: open(schema_path),
7373
target_path,

0 commit comments

Comments
 (0)