perf: add --version fast-path to skip full import chain
perf: add --version fast-path to skip full import chain
This commit is contained in:
commit
07bd44db28
1 changed files with 7 additions and 0 deletions
|
|
@ -22,6 +22,13 @@ if TYPE_CHECKING:
|
|||
|
||||
def main() -> None:
|
||||
"""Entry point for the codeflash command-line interface."""
|
||||
# Fast path: --version exits before importing the full stack
|
||||
if len(sys.argv) == 2 and sys.argv[1] == "--version":
|
||||
from codeflash.version import __version__
|
||||
|
||||
print(f"Codeflash version {__version__}")
|
||||
return
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from codeflash.cli_cmds.cli import parse_args, process_pyproject_config
|
||||
|
|
|
|||
Loading…
Reference in a new issue