Skip to content

Commit

Permalink
make sure package version is a string (#2695)
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft committed Jul 12, 2024
1 parent ee136ff commit c1eb31f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .chronus/changes/fix_package_version-2024-6-12-15-20-17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@azure-tools/typespec-python"
---

always interpret `package-version` as a string
4 changes: 4 additions & 0 deletions packages/typespec-python/generator/pygen/codegen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ def packaging_files_config(self) -> Optional[Dict[str, Any]]:
except AttributeError:
return packaging_files_config

@property
def package_version(self) -> Optional[str]:
return str(self.options.get("package-version", ""))


class CodeGenerator(Plugin):
def __init__(self, *args, **kwargs: Any) -> None:
Expand Down

0 comments on commit c1eb31f

Please sign in to comment.