From 71b9f274b206a4096549acf94d9b9c4d01cd93e2 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sat, 16 Apr 2022 03:00:59 -0400 Subject: [PATCH] fix: replace hyphens with suffixes when cleaning proto filename --- protoletariat/fdsetgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protoletariat/fdsetgen.py b/protoletariat/fdsetgen.py index 44feedfe..8a1044c9 100644 --- a/protoletariat/fdsetgen.py +++ b/protoletariat/fdsetgen.py @@ -24,7 +24,7 @@ def _remove_proto_suffix(name: str) -> str: >>> _remove_proto_suffix("a/b.proto") 'a/b' """ - return _PROTO_SUFFIX_PATTERN.sub(r"\1", name) + return _PROTO_SUFFIX_PATTERN.sub(r"\1", name).replace("-", "_") def _should_ignore(fd_name: str, patterns: Sequence[str]) -> bool: