Comments (1)
It's tricky finding a balance between making everything extensible and suggesting to subclass. In this case, I'd subclasses would be required anyway so you could subclass and provide your own implementation of create_command
and then _command_handler
.
In Azure CLI case, even if _command_handler
was extensible, you'd still have to override create_command
for this.
This is related to #12 but in that case, it was a single line you wanted to change to use a different class. Here, modifying _command_handler
basically changes all of create_command
anyway.
link to code in question: https://github.com/Microsoft/knack/blob/master/knack/commands.py#L106
from knack.
Related Issues (20)
- Best practice to read configuration values from whithin commands? HOT 1
- What is client_factory?
- util.todict process DefaultInt to a dictionary instead of a int HOT 1
- CLICommandsLoader.create_command overrides the argument "arguments_loader" HOT 3
- Release candidate tags are sorted as higher than actual releases (0.8.0rc2 >> 0.8.0) HOT 7
- TSV output doesn't include headers
- Misleading error message for invalid choice arguments
- Knack error when I run azdev linter
- How to disable default Global Arguments (especially -o)?
- When json value has null, knack in Azure CLI changes column order unintentionally. HOT 1
- Colorama is not being installed in Windows even though it is required
- I think Knack is pulling a version of PyYAML that has a known vulnerability. HOT 10
- Config file value ignored by command validation code HOT 1
- This repo is missing important files
- Set column width for tabular output format HOT 1
- Remove / move `ensure_dir` call since it might cause some issues and not consistent HOT 5
- `extract_full_summary_from_signature` uses undocumented `Match.regs`
- Inefficient regex in `extract_full_summary_from_signature`
- knack/knack /prompting.py _prompt_bool never taking default action
- Broken `examples/test_exapp`: TypeError: ScenarioTest.__init__() missing 1 required positional argument: 'method_name' HOT 1
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 knack.