MCPcopy Create free account
hub / github.com/ipython/traitlets / ArgcompleteApp

Class ArgcompleteApp

examples/argcomplete_app.py:126–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124
125
126class ArgcompleteApp(Application):
127 name = Unicode("argcomplete-example-app")
128 description = Unicode("prints requested environment variables")
129 classes = [JsonPrinter, EnvironPrinter]
130
131 config_file = Unicode("", help="Load this config file").tag(config=True)
132
133 aliases = {
134 ("e", "env-var", "env-vars"): "EnvironPrinter.vars",
135 ("s", "style"): "EnvironPrinter.style",
136 ("json-indent"): "JsonPrinter.indent",
137 }
138
139 flags = {
140 "skip-if-missing": bool_flag(EnvironPrinter.skip_if_missing),
141 }
142
143 def initialize(self, argv=None):
144 self.parse_command_line(argv)
145 if self.config_file:
146 self.load_config_file(self.config_file)
147
148 def start(self):
149 EnvironPrinter(parent=self).print()
150
151
152if __name__ == "__main__":

Callers

nothing calls this directly

Calls 3

UnicodeClass · 0.90
bool_flagFunction · 0.85
tagMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…