Comments (5)
Hm, interesting. Looks like in your environment argcomplete
is present and in the default CI environments for Argh it's not.
It may be a good idea to add a tox env with extras=completion
.
OTOH, the only thing it would check is whether COMPLETION_ENABLED
is set to the correct value depending on whether it was possible to import argcomplete
. It's such a trivial bit of logic that I'm rather leaning towards adding # pragma: no cover
to these lines that you've mentioned. The behaviour with and without argcomplete
is tested with a mock in any case.
from argh.
I've excluded that line from coverage, it really makes no sense to add a whole tox env to test that pretty obvious bit of code. Thanks for reporting!
from argh.
Hmm. The latest build in CI for Python 3.9 says:
platform linux -- Python 3.9.17, pytest-7.4.1, pluggy-1.3.0
...
Required test coverage of 100% reached. Total coverage: 100.00%
Not sure if the difference is related to sunos5
. Do you have the results for Argh 0.28 in the same environment? Do you have more detailed information about the missed statements?
This argh.completion
where coverage is missing is a tiny module with barely any logic, so it's probably either sh
being used instead of bash
in that environment, or argcomplete
not being installed.
from argh.
The more complete report shows these two lines as missing:
70 except ImportError:
71 argcomplete = None
from argh.
Yes, exactly. The argcomplete
is installed here.
from argh.
Related Issues (20)
- Expose version information at runtime
- Revamp unit tests
- Remove previously deprecated stuff HOT 1
- Add type annotations to existing code
- Keyword-Only Arguments as Options
- Add support for Python 3.12
- Refactor assembling module
- Type hints: basic usage to infer argument types HOT 2
- TypeError: cannot picke '_io.TextIOWrapper' regression in 0.30 for `type=FileType(..), default=sys.stdin)` HOT 2
- 0.30.X is breaking console scripts by moving options to positional arguments HOT 5
- Issue with underscores in positional arguments since 0.30.0 HOT 1
- Using argh.argh(args=... , default=...) causes double nesting of passed arguments HOT 1
- TypingHintArgSpecGuesser breaks on type alias List HOT 11
- Option to disable replacement of "_" with "-" in named cli arguments HOT 3
- Trim trailing `_` from argument names
- Setting the argument name with `dest` is ignored HOT 2
- cmake deprecation warning with cmake<3.5 HOT 1
- Test failures with Python 3.13.0b2 HOT 3
- Add ability to display long options in usage message
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argh.