Add support for tab completion (#12411)
* Add support for tab completion * make flake8 happy * Add documentation
This commit is contained in:
@ -4,7 +4,7 @@ We list each subcommand here explicitly because all the reliable ways of searchi
|
||||
"""
|
||||
import sys
|
||||
|
||||
from milc import cli
|
||||
from milc import cli, __VERSION__
|
||||
|
||||
from . import c2json
|
||||
from . import cformat
|
||||
@ -47,5 +47,15 @@ from . import pytest
|
||||
# void: 3.9
|
||||
|
||||
if sys.version_info[0] != 3 or sys.version_info[1] < 7:
|
||||
cli.log.error('Your Python is too old! Please upgrade to Python 3.7 or later.')
|
||||
print('Error: Your Python is too old! Please upgrade to Python 3.7 or later.')
|
||||
exit(127)
|
||||
|
||||
milc_version = __VERSION__.split('.')
|
||||
|
||||
if int(milc_version[0]) < 2 and int(milc_version[1]) < 3:
|
||||
from pathlib import Path
|
||||
|
||||
requirements = Path('requirements.txt').resolve()
|
||||
|
||||
print(f'Your MILC library is too old! Please upgrade: python3 -m pip install -U -r {str(requirements)}')
|
||||
exit(127)
|
||||
|
Reference in New Issue
Block a user