Returns a tuple of the plugin classes registered with the python style checker.

  :rtype: tuple of :class:`pants.contrib.python.checks.checker.common.CheckstylePlugin` subtypes
492999
def plugins():
  
  return (
    ClassFactoring,
    ConstantLogic,
    ExceptStatements,
    FutureCompatibility,
    ImportOrder,
    Indentation,
    MissingContextManager,
    NewStyleClasses,
    Newlines,
    PrintStatements,
    TrailingWhitespace,
    PEP8VariableNames,
    PyflakesChecker,
    PyCodeStyleChecker,
  )
122245
def iter_subclasses(class_):
    
    ensure_class(class_)

    classes = set()

    def descend(class_):
        subclasses = set(class_.__subclasses__()) - classes
        classes.update(subclasses)
        return subclasses

    result = breadth_first(class_, descend)
    next(result)  # omit ``class_`` itself
    return result
18172
def _import_plugins(self):
        
        if self.detected:
            return

        # In some cases, plugin scanning may start during a request.
        # Make sure there is only one thread scanning for plugins.
        self.scanLock.acquire()
        if self.detected:
            return  # previous threaded released + completed

        try:
            import_apps_submodule("content_plugins")
            self.detected = True
        finally:
            self.scanLock.release()
954066
def collect_plugins(self, modules=None):
        
        if modules is None:
            modules = self.get_loaded_modules()
        else:
            modules = util.return_list(modules)

        plugins = []
        for module in modules:
            module_plugins = [(item[1], item[0])
                              for item
                              in inspect.getmembers(module)
                              if item[1] and item[0] != '__builtins__']
            module_plugins, names = zip(*module_plugins)

            module_plugins = self._filter_modules(module_plugins, names)
            plugins.extend(module_plugins)
        return plugins
523984
def get_plugin_modules(plugins):
    
    if not plugins:
        raise MissingPluginNames("input plugin names are required")

    modules = []

    for plugin in plugins:
        short_name = PLUGIN_MAPPING.get(plugin.lower(), plugin.lower())
        full_path = '%s%s' % (module_prefix, short_name)
        modules.append(importlib.import_module(full_path))

    return tuple(modules)
332970
def _generate_legacy_type_checks(types=()):
    
    types = dict(types)

    def gen_type_check(pytypes):
        pytypes = _utils.flatten(pytypes)

        def type_check(checker, instance):
            if isinstance(instance, bool):
                if bool not in pytypes:
                    return False
            return isinstance(instance, pytypes)

        return type_check

    definitions = {}
    for typename, pytypes in iteritems(types):
        definitions[typename] = gen_type_check(pytypes)

    return definitions
1040570
def all_subclasses(cls):
    
    subclasses = cls.__subclasses__()
    descendants = (descendant for subclass in subclasses
                   for descendant in all_subclasses(subclass))
    return set(subclasses) | set(descendants)
1138328
def get_plugins(modules, classobj):
    
    for module in modules:
        for plugin in get_module_plugins(module, classobj):
            yield plugin
1059612
def find_plugins(self, path):
        
        ext = os.extsep+'py'
        files = []
        for (dirpath, dirnames, filenames) in os.walk(path):
            files.extend([os.path.join(dirpath, x) for x in filenames if x.endswith(ext)])
        plugins = []
        for f in files:
            try:
                mod = self.__import_file(f)
            except Exception:
                tb = traceback.format_exc()
                log.debug("Importing plugin from %s failed!\n%s" % (f, tb))
                continue
            # get all classes in the imported file
            members = inspect.getmembers(mod, lambda x: inspect.isclass(x))
            # only get classes which are defined, not imported, in mod
            classes = [m[1] for m in members if m[1].__module__ == mod.__name__]
            for c in classes:
                # if the class is derived from a supported type append it
                # we test if it is a subclass of a supported type but not a supported type itself
                # because that might be the abstract class
                if any(issubclass(c, supported) for supported in self.supportedTypes)\
                   and c not in self.supportedTypes:
                    plugins.append(c)
        return plugins
318752
def getPlugins():
		
		
		# Retrieve the list of detected entry points in the ue4cli.plugins group
		plugins = {
			entry_point.name: entry_point.load()
			for entry_point
			in pkg_resources.iter_entry_points('ue4cli.plugins')
		}
		
		# Filter out any invalid plugins
		plugins = {
			name: plugins[name]
			for name in plugins
			if
				'action' in plugins[name] and
				'description' in plugins[name] and
				'args' in plugins[name] and
				callable(plugins[name]['action']) == True and
				len(signature(plugins[name]['action']).parameters) == 2
		}
		
		return plugins
610876
def plugins(self):
        
        url = self._url('/plugins')
        return self._result(self._get(url), True)
316359
def get_methods_class(self, class_name):
        
        l = []
        for i in self.get_classes():
            for j in i.get_methods():
                if class_name == j.get_class_name():
                    l.append(j)

        return l
845767
public static function get_plugin_types_with_subplugins() {
        self::init();

        $return = array();
        foreach (self::$supportsubplugins as $type) {
            $return[$type] = self::$plugintypes[$type];
        }
        return $return;
    }
100897
def _get_parent_classes_transparent(cls, slot, page, instance=None):
        
        parent_classes = super(CascadePluginBase, cls).get_parent_classes(slot, page, instance)
        if parent_classes is None:
            if cls.get_require_parent(slot, page) is False:
                return
            parent_classes = []

        # add all plugins marked as 'transparent', since they all are potential parents
        parent_classes = set(parent_classes)
        parent_classes.update(TransparentContainer.get_plugins())
        return list(parent_classes)
616150
def get_plugin_classes(modules):
    """"""
    classes = (_ConnectionPlugin, _ContentPlugin, _ParserPlugin)
    return loader.get_plugins(modules, classes)
1188493
def _get_ctypes(self):
        
        ctypes = []
        for related_object in self.model._meta.get_all_related_objects():
            model = getattr(related_object, 'related_model', related_object.model)
            ctypes.append(ContentType.objects.get_for_model(model).pk)
            if model.__subclasses__():
                for child in model.__subclasses__():
                    ctypes.append(ContentType.objects.get_for_model(child).pk)
        return ctypes
259524
def get_methods(self):
        
        l = []
        for i in self.classes.class_def:
            for j in i.get_methods():
                l.append(j)
        return l