Skip to content

Commit

Permalink
fix: remove 3.9-only with_stem method call
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Nov 23, 2021
1 parent 174350f commit 4d7f178
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions protoletariat/__main__.py
Expand Up @@ -113,11 +113,7 @@ def main(
for fd in filter(lambda fd: fd.dependency, fdset.file):
fd_name = fd.name
stem = proto_suffix_pattern.sub("", fd_name)
python_file = (
generated_python_dir.joinpath(fd_name)
.with_stem(f"{stem}_pb2")
.with_suffix(".py")
)
python_file = generated_python_dir.joinpath(fd_name).with_name(f"{stem}_pb2.py")
raw_code = python_file.read_text()
module = ast.parse(raw_code)
new_module = rewriter.visit(module)
Expand Down

0 comments on commit 4d7f178

Please sign in to comment.