Compare commits
2 commits
fc5c3f3691
...
0d4c822210
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d4c822210 | |||
| 6d8472d005 |
4 changed files with 9 additions and 17 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
## 0.7.0a5 (2025-12-30)
|
||||||
|
|
||||||
## 0.7.0a4 (2025-11-21)
|
## 0.7.0a4 (2025-11-21)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "tiramisu_cmdline_parser"
|
name = "tiramisu_cmdline_parser"
|
||||||
version = "0.7.0a4"
|
version = "0.7.0a5"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "command-line parser using Tiramisu"
|
description = "command-line parser using Tiramisu"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.7.0a4"
|
__version__ = "0.7.0a5"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (C) 2018-2019 Team tiramisu (see AUTHORS for all contributors)
|
# Copyright (C) 2018-2025 Team tiramisu (see AUTHORS for all contributors)
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
# This program is free software: you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU Lesser General Public License as published by the
|
# under the terms of the GNU Lesser General Public License as published by the
|
||||||
|
|
@ -29,18 +29,6 @@ from gettext import gettext as _
|
||||||
from tiramisu import Config
|
from tiramisu import Config
|
||||||
from tiramisu.error import PropertiesOptionError, LeadershipError, ConfigError
|
from tiramisu.error import PropertiesOptionError, LeadershipError, ConfigError
|
||||||
|
|
||||||
# except ImportError:
|
|
||||||
# Config = None
|
|
||||||
# from tiramisu_api.error import PropertiesOptionError
|
|
||||||
# LeadershipError = ValueError
|
|
||||||
try:
|
|
||||||
from tiramisu_api import Config as ConfigJson
|
|
||||||
|
|
||||||
if Config is None:
|
|
||||||
Config = ConfigJson
|
|
||||||
except ImportError:
|
|
||||||
ConfigJson = Config
|
|
||||||
|
|
||||||
|
|
||||||
def get_choice_list(config, properties, display):
|
def get_choice_list(config, properties, display):
|
||||||
def convert(choice):
|
def convert(choice):
|
||||||
|
|
@ -322,7 +310,7 @@ class _BuildKwargs:
|
||||||
class TiramisuCmdlineParser(ArgumentParser):
|
class TiramisuCmdlineParser(ArgumentParser):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
config: Union[Config, ConfigJson],
|
config: Config,
|
||||||
*args,
|
*args,
|
||||||
root: str = None,
|
root: str = None,
|
||||||
fullpath: bool = True,
|
fullpath: bool = True,
|
||||||
|
|
@ -340,6 +328,8 @@ class TiramisuCmdlineParser(ArgumentParser):
|
||||||
unrestraint = True
|
unrestraint = True
|
||||||
self.fullpath = fullpath
|
self.fullpath = fullpath
|
||||||
self.config = config
|
self.config = config
|
||||||
|
config_properties = config.property.get()
|
||||||
|
self.config_frozen = "frozen" in config_properties or "everything_frozen" in config_properties
|
||||||
self.root = root
|
self.root = root
|
||||||
self.remove_empty_od = remove_empty_od
|
self.remove_empty_od = remove_empty_od
|
||||||
self.unrestraint = unrestraint
|
self.unrestraint = unrestraint
|
||||||
|
|
@ -462,7 +452,7 @@ class TiramisuCmdlineParser(ArgumentParser):
|
||||||
obj = None
|
obj = None
|
||||||
for obj in config:
|
for obj in config:
|
||||||
# do not display frozen option
|
# do not display frozen option
|
||||||
if "frozen" in obj.property.get():
|
if self.config_frozen and "frozen" in obj.property.get():
|
||||||
continue
|
continue
|
||||||
if obj.isoptiondescription():
|
if obj.isoptiondescription():
|
||||||
if _forhelp:
|
if _forhelp:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue