Try to read version from the installed package metadata. Fallback to a dev version if not installed.
()
| 91 | |
| 92 | |
| 93 | def get_version() -> str: |
| 94 | """ |
| 95 | Try to read version from the installed package metadata. |
| 96 | Fallback to a dev version if not installed. |
| 97 | """ |
| 98 | try: |
| 99 | return pkg_version("codegraphcontext") # must match [project].name in pyproject.toml |
| 100 | except PackageNotFoundError: |
| 101 | return "0.0.0 (dev)" |
| 102 | |
| 103 | |
| 104 | # Create MCP command group |
no outgoing calls
no test coverage detected