Lines Matching refs:name
141 def __getattr__(self, name): argument
142 if name in self:
143 return self[name]
145 raise AttributeError("'PropertyDict' object has no attribute '%s'" % name)
147 def __setattr__(self, name, value): argument
148 self[name] = value
150 def __delattr__(self, name): argument
151 if name in self:
152 del self[name]
154 raise AttributeError("'PropertyDict' object has no attribute '%s'" % name)
206 … if isinstance(option, Option) and option.deprecated and ctx.params[option.name] != default:
209 … raise FatalError('Error: %s' % deprecation.full_message('Option "%s"' % option.name))
211 … print_warning('Warning: %s' % deprecation.full_message('Option "%s"' % option.name))
214 def __init__(self, callback, name, aliases, dependencies, order_dependencies, action_args): argument
216 self.name = name
226 self.callback(self.name, context, global_args, **action_args)
231 name=None, argument
238 super(Action, self).__init__(name, **kwargs)
240 self.name = self.name or self.callback.__name__
279 name=self.name,
291 message = deprecation.full_message('Command "%s"' % self.name)
420 for name, action in all_actions.get('actions', {}).items():
430 self._actions[name] = Action(name=name, **action)
431 for alias in [name] + action.get('aliases', []):
432 self.commands_with_aliases[alias] = name
435 self._actions[name].params.append(Argument(**argument_args))
439 self._actions[name].params.append(option)
447 … ' "shared" options can be declared only on global level' % (option.name, name))
450 if option.scope.is_global and option.name not in [o.name for o in self.params]:
453 self._actions[name].params.append(option)
456 return sorted(filter(lambda name: not self._actions[name].hidden, self._actions))
458 def get_command(self, ctx, name): argument
459 if name in self.commands_with_aliases:
460 return self._actions.get(self.commands_with_aliases.get(name))
464 return Action(name=name, callback=self._actions.get('fallback').unwrapped_callback)
546 [item for item, count in Counter(task.name for task in tasks).items() if count > 1])
557 if task.name == 'help':
563 option = next((o for o in ctx.command.params if o.name == key), None)
573 … 'This option can appear at most once in the command line.' % (key, task.name))
595 tasks_dict = dict([(t.name, t) for t in tasks])
610 (task.name, dep))
615 … option = next((o for o in ctx.command.params if o.name == key), None)
633 if task.name not in tasks_to_run.keys():
634 tasks_to_run.update([(task.name, task)])
640 name_with_aliases = task.name
684 for _finder, name, _ispkg in sorted(iter_modules([directory])):
685 if name.endswith('_ext'):
686 extensions[name] = import_module(name)
699 for name, extension in extensions.items():
703 print_warning('WARNING: Cannot load idf.py extension "%s"' % name)
740 return codecs.lookup(locale.getpreferredencoding()).name != 'ascii'
798 elif os.name == 'posix' and not _valid_unicode_config():