• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

neithere / argh
93%

Build:
DEFAULT BRANCH: master
Repo Added 16 Jun 2014 03:14PM UTC
Files 12
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • 111/introspect_through_wrapped
  • v0.26.2

pending completion
165

Pull #134

travis-ci

web-flow
Fix bug with skip_unknown_args=True

Passing `skip_unknown_args=True` to the parser only ever showed the
usage message.

The problem is that `parser.parse_known_args()`
(`ArgumentParser.parse_known_args`) returns a tuple
`(namespace, remainder)` instead of just a namespace object like
`parser.parse_args`. Once you pass this to
`_get_function_from_namespace_obj` it gets confused.

The unit test was expecting to only ever show the usage message when
skipping unknown args.

The remaining unknown args are stored on the namespace as `_unkown_args`,
so it's at least accessible (if we use `@expects_obj`)

```python
import argh
parser = argh.ArghParser()

@argh.arg('a')
@argh.expects_obj
def foo(args):
    print 'foo args', args

parser.add_commands([foo, bar])
parser.dispatch(skip_unknown_args=True)
```
Pull Request #134: Fix bug with skip_unknown_args=True

4 of 4 new or added lines in 1 file covered. (100.0%)

461 of 495 relevant lines covered (93.13%)

3.57 hits per line

Relevant lines Covered
Build:
Build:
495 RELEVANT LINES 461 COVERED LINES
3.57 HITS PER LINE
Source Files on master
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
165 master Fix bug with skip_unknown_args=True Passing `skip_unknown_args=True` to the parser only ever showed the usage message. The problem is that `parser.parse_known_args()` (`ArgumentParser.parse_known_args`) returns a tuple `(namespace, remainder)` i... Pull #134 06 Feb 2019 10:02PM UTC web-flow travis-ci pending completion  
162 master removing COPYING file (fixes #125) Pull #126 12 Nov 2017 03:19PM UTC web-flow travis-ci pending completion  
161 master Declare Python 3.6 support Enable tests and add Trove classifiers for Python 3.6. Pull #122 28 Jun 2017 01:43AM UTC web-flow travis-ci pending completion  
160 master tests: fix pylint warning Pull #117 18 Sep 2016 10:08AM UTC web-flow travis-ci pending completion  
159 master fix broken link describing testing in setup.py Pull #116 17 Sep 2016 08:27PM UTC web-flow travis-ci pending completion  
158 master Update changelog push 27 Aug 2016 12:03AM UTC neithere travis-ci pending completion  
157 master Merge pull request #112 from jakirkham/incl_license Include the license file in packages push 26 Aug 2016 08:41AM UTC web-flow travis-ci pending completion  
156 master Update changelog push 26 Aug 2016 08:26AM UTC neithere travis-ci pending completion  
155 master Add support for Py3.5, drop 3.2 push 26 Aug 2016 08:20AM UTC neithere travis-ci pending completion  
154 master Cleanup push 26 Aug 2016 07:56AM UTC neithere travis-ci pending completion  
See All Builds (53)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc