Skip to content

Commit

Permalink
bump version, merge pull request #49 from iterative/fix-non-str-choices
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl authored Sep 1, 2021
2 parents 1e1d6ef + f1402f3 commit 1c0242c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
*.py[cod]
/shtab/_dist_ver.py
__pycache__/

# Packages
/shtab/_dist_ver.py
/*.egg*/
/build/
/dist/

# Unit test / coverage reports
/.coverage
/.pytest_cache/
/.coverage*
/coverage.xml
__pycache__/
/.pytest_cache/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ repos:
name: Check TODO
language: pygrep
entry: TODO
args: [-i]
types: [text]
exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$
args: [-i]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
Expand Down
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@ known_first_party=shtab

[tool:pytest]
timeout=5
addopts=-v --tb=short -rxs -W=error --log-level=debug --durations=0 --cov=shtab --cov-report=term-missing --cov-report=xml
log_level=DEBUG
python_files=test_*.py
testpaths=tests
addopts=-v --tb=short -rxs -W=error --durations=0 --cov=shtab --cov-report=term-missing --cov-report=xml
4 changes: 2 additions & 2 deletions shtab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ def format_optional(opt):
else (
choice_type2fn[opt.choices[0].type]
if isinstance(opt.choices[0], Choice)
else "({})".format(" ".join(opt.choices))
else "({})".format(" ".join(map(str, opt.choices)))
)
if opt.choices
else "",
Expand All @@ -570,7 +570,7 @@ def format_positional(opt):
else (
choice_type2fn[opt.choices[0].type]
if isinstance(opt.choices[0], Choice)
else "({})".format(" ".join(opt.choices))
else "({})".format(" ".join(map(str, opt.choices)))
)
if opt.choices
else "",
Expand Down

0 comments on commit 1c0242c

Please sign in to comment.