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