Skip to content

Commit

Permalink
Merge pull request #35 from buluba89/master
Browse files Browse the repository at this point in the history
Added default value option to StrSeq template
  • Loading branch information
sampsyo committed Apr 16, 2018
2 parents 087c2a1 + fde5c92 commit 7a60ee1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@ matrix:
include:
- python: 2.7
env: {TOXENV: py27-test}
- python: 3.3
env: {TOXENV: py33-cov, COVERAGE: 1}
- python: 3.4
env: {TOXENV: py34-test}
env: {TOXENV: py34-cov, COVERAGE: 1}
- python: 3.5
env: {TOXENV: py35-test}
- python: pypy
env: {TOXENV: pypy-test}
- python: 2.7
env: {TOXENV: py27-flake8}
- python: 3.3
env: {TOXENV: py33-flake8}
- python: 3.4
env: {TOXENV: py34-flake8}
- python: 2.7
env: {TOXENV: docs}

Expand Down
4 changes: 2 additions & 2 deletions confuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1226,14 +1226,14 @@ class StrSeq(Template):
Validates both actual YAML string lists and single strings. Strings
can optionally be split on whitespace.
"""
def __init__(self, split=True):
def __init__(self, split=True, default=REQUIRED):
"""Create a new template.
`split` indicates whether, when the underlying value is a single
string, it should be split on whitespace. Otherwise, the
resulting value is a list containing a single string.
"""
super(StrSeq, self).__init__()
super(StrSeq, self).__init__(default)
self.split = split

def convert(self, value, view):
Expand Down

0 comments on commit 7a60ee1

Please sign in to comment.