def handle(self, *args, **options):
     include_apps = exclude_apps = exclude_packages = None
     if options['include_apps']:
         include_apps = options['include_apps'].split(',')
     if options['exclude_apps']:
         exclude_apps = options['exclude_apps'].split(',')
     if options['exclude_packages']:
         exclude_packages = options['exclude_packages'].split(',')
     verbosity = int(options['verbosity'])
     remove_isolate_nodes = options['remove_isolate_nodes']
     remove_sink_nodes = options['remove_sink_nodes']
     remove_source_nodes = options['remove_source_nodes']
     only_cyclic = options['only_cyclic']
     show_modules = options['show_modules']
     file_name = options['file_name']
     use_colors = options['use_colors']
     dotted_scope_local = options['dotted_scope_local']
     scope_global = options['scope_global']
     scope = scope_global and SCOPE_GLOBAL or None
     if not compatible_scope(dotted_scope_local, scope_global):
         raise InvalidOptions("The dotted-scope-local and scope-global are incompatibles")
     create_graph_apps_dependence(file_name=file_name,
                                  include_apps=include_apps,
                                  exclude_apps=exclude_apps,
                                  exclude_packages=exclude_packages,
                                  verbosity=verbosity,
                                  show_modules=show_modules,
                                  remove_isolate_nodes=remove_isolate_nodes,
                                  remove_sink_nodes=remove_sink_nodes,
                                  remove_source_nodes=remove_source_nodes,
                                  only_cyclic=only_cyclic,
                                  scope=scope,
                                  use_colors=use_colors,
                                  dotted_scope_local=dotted_scope_local)
Esempio n. 2
0
 def handle(self, *args, **options):
     include_apps = exclude_apps = exclude_packages = None
     if options['include_apps']:
         include_apps = options['include_apps'].split(',')
     if options['exclude_apps']:
         exclude_apps = options['exclude_apps'].split(',')
     if options['exclude_packages']:
         exclude_packages = options['exclude_packages'].split(',')
     verbosity = int(options['verbosity'])
     remove_isolate_nodes = options['remove_isolate_nodes']
     remove_sink_nodes = options['remove_sink_nodes']
     remove_source_nodes = options['remove_source_nodes']
     only_cyclic = options['only_cyclic']
     show_modules = options['show_modules']
     file_name = options['file_name']
     use_colors = options['use_colors']
     dotted_scope_local = options['dotted_scope_local']
     scope_global = options['scope_global']
     scope = scope_global and SCOPE_GLOBAL or None
     if not compatible_scope(dotted_scope_local, scope_global):
         raise InvalidOptions(
             "The dotted-scope-local and scope-global are incompatibles")
     create_graph_apps_dependence(file_name=file_name,
                                  include_apps=include_apps,
                                  exclude_apps=exclude_apps,
                                  exclude_packages=exclude_packages,
                                  verbosity=verbosity,
                                  show_modules=show_modules,
                                  remove_isolate_nodes=remove_isolate_nodes,
                                  remove_sink_nodes=remove_sink_nodes,
                                  remove_source_nodes=remove_source_nodes,
                                  only_cyclic=only_cyclic,
                                  scope=scope,
                                  use_colors=use_colors,
                                  dotted_scope_local=dotted_scope_local)
Esempio n. 3
0
 def clean(self):
     cleaned_data = super(DetectCyclicForm, self).clean()
     dotted_scope_local = cleaned_data['dotted_scope_local']
     scope_global = cleaned_data['scope_global']
     if not compatible_scope(dotted_scope_local, scope_global):
         scope_global_errors = self._errors.get('scope_global', ErrorList())
         scope_global_errors.append(_('This option is incompatible with dotted scope local'))
         self._errors['scope_global'] = scope_global_errors
     return cleaned_data
Esempio n. 4
0
 def clean(self):
     cleaned_data = super(DetectCyclicForm, self).clean()
     dotted_scope_local = cleaned_data['dotted_scope_local']
     scope_global = cleaned_data['scope_global']
     if not compatible_scope(dotted_scope_local, scope_global):
         scope_global_errors = self._errors.get('scope_global', ErrorList())
         scope_global_errors.append(
             _('This option is incompatible with dotted scope local'))
         self._errors['scope_global'] = scope_global_errors
     return cleaned_data