Skip to content

Commit

Permalink
Set default value for prompt.
Browse files Browse the repository at this point in the history
  • Loading branch information
JINWOO-J committed Nov 17, 2023
1 parent 5d99b6f commit 41ab4e2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions BUILD_ARGS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

--build-arg BASE_IMAGE=python:3.9.13-slim-buster
--build-arg BUILD_DATE=2023-11-16T12:59:51UTC
--build-arg BUILD_DATE=2023-11-16T13:45:21UTC
--build-arg DOCKER_BUILD_OPTION=--no-cache --rm=true
--build-arg ECHO_OPTION=
--build-arg GIT_USER=JINWOO-J
Expand All @@ -11,4 +11,4 @@
--build-arg REPO_HUB=jinwoo
--build-arg SED_OPTION=''
--build-arg UNAME_S=Darwin
--build-arg VERSION=1.0.56
--build-arg VERSION=1.0.57
14 changes: 14 additions & 0 deletions examples/color_print/table_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,17 @@ def add_comma(value):
show_lines=True,
# columns=["address"]
)


PrintRichTable(
title="RichTable List with description - align",
data=list_data,
with_idx=True,
call_value_func=add_comma,
show_lines=True,
columns_options={
"value": {
"justify": "left",
}
}
)
2 changes: 1 addition & 1 deletion pawnlib/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__title__ = 'pawnlib'
__description__ = 'pawnlib is a collection of libraries for IaC.'
__url__ = 'https://github.com/jinwoo-j/pawnlib'
__version__ = '1.0.56'
__version__ = '1.0.57'
__author__ = 'Jinwoo Jeong'
__author_email__ = 'jinwoo@parametacorp.com'
__license__ = 'MIT'
Expand Down
2 changes: 2 additions & 0 deletions pawnlib/input/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,8 @@ def inq_prompt(*args, **kwargs):
style = None
if kwargs.get('style'):
style = kwargs.pop('style')
if not kwargs.get('type'):
kwargs['type'] = "input"
answer = prompt(questions=kwargs, style=style)
if answer.get('name'):
return answer['name']
Expand Down
4 changes: 2 additions & 2 deletions pawnlib/utils/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def __init__(self, url="", wallet=None, network_info: NetworkInfo = None, raise_
self.global_reqeust_payload = {}

self.default = {
"stepLimit": hex(200000)
"stepLimit": hex(2500000)
}

def initialize(self):
Expand Down Expand Up @@ -719,7 +719,7 @@ def get_estimate_step(self, url=None, tx=None):
if res_json.get('error'):
# pawn.console.debug(f"[red] An error occurred while running debug_estimateStep, {res_json['error'].get('message')}")
# sys.exit(-1)
self.exit_on_failure(f"[red] An error occurred while running debug_estimateStep, {res_json['error'].get('message')}")
self.exit_on_failure(f"An error occurred while running debug_estimateStep, {res_json['error'].get('message')}")

return res.get('result')

Expand Down

0 comments on commit 41ab4e2

Please sign in to comment.