Sets up Sphinx extension.
961351
def setup(app) -> Dict[str, Any]:
    
    app.setup_extension("sphinx.ext.graphviz")
    app.add_node(
        inheritance_diagram,
        html=(html_visit_inheritance_diagram, None),
        latex=(latex_visit_inheritance_diagram, None),
        man=(skip, None),
        texinfo=(skip, None),
        text=(skip, None),
    )
    app.add_directive("inheritance-diagram", InheritanceDiagram)
    return {
        "version": uqbar.__version__,
        "parallel_read_safe": True,
        "parallel_write_safe": True,
    }
515217
def v_init_extension(ctx, stmt):
    """"""
    (prefix, identifier) = stmt.raw_keyword
    (modname, revision) = \
        prefix_to_modulename_and_revision(stmt.i_module, prefix,
                                          stmt.pos, ctx.errors)
    stmt.keyword = (modname, identifier)
    stmt.i_extension_modulename = modname
    stmt.i_extension_revision = revision
    stmt.i_extension = None
24678
def setup(self):
        """"""
        if len(self.plugins_tabs) == 0:
            self.close()
            return

        self.list.clear()
        current_path = self.current_path
        filter_text = self.filter_text

        # Get optional line or symbol to define mode and method handler
        trying_for_symbol = ('@' in self.filter_text)

        if trying_for_symbol:
            self.mode = self.SYMBOL_MODE
            self.setup_symbol_list(filter_text, current_path)
        else:
            self.mode = self.FILE_MODE
            self.setup_file_list(filter_text, current_path)

        # Set position according to size
        self.set_dialog_position()
191562
private function setup()
    {
        self::$version = '3.1.7';
        self::$src = dirname(__FILE__);
        self::$dir = dirname(dirname(__FILE__));
        self::$url = $this->getCuztomUrl(self::$src);

        // Do
        do_action('cuztom_setup');
    }
195164
def watch_docs(ctx):
    """"""
    try:
        import sphinx_autobuild  # noqa
    except ImportError:
        print('ERROR: watch task requires the sphinx_autobuild package.')
        print('Install it with:')
        print('    pip install sphinx-autobuild')
        sys.exit(1)
    docs(ctx)
    ctx.run('sphinx-autobuild {} {}'.format(docs_dir, build_dir), pty=True)
578147
def setup(app):
    
    from .patches import patch_django_for_autodoc

    # When running, make sure Django doesn't execute querysets
    patch_django_for_autodoc()

    # Generate docstrings for Django model fields
    # Register the docstring processor with sphinx
    app.connect('autodoc-process-docstring', improve_model_docstring)

    # influence skip rules
    app.connect("autodoc-skip-member", autodoc_skip)
791783
@Inject
    public void setup(ViewConfigExtension extension) {
        for (Entry<String, Set<Annotation>> e : extension.getData().entrySet()) {
            for (Annotation i : e.getValue()) {
                addAnnotationData(e.getKey(), i);
            }
        }
    }
1234786
def setup(app):
    """"""
    global _is_sphinx
    _is_sphinx = True
    app.add_config_value('no_underscore_emphasis', False, 'env')
    app.add_config_value('m2r_parse_relative_links', False, 'env')
    app.add_config_value('m2r_anonymous_references', False, 'env')
    app.add_config_value('m2r_disable_inline_math', False, 'env')
    app.add_source_parser('.md', M2RParser)
    app.add_directive('mdinclude', MdInclude)
    metadata = dict(
        version=__version__,
        parallel_read_safe=True,
        parallel_write_safe=True,
    )
    return metadata
427370
def add_directives(kb_app: kb,
                   sphinx_app: Sphinx,
                   sphinx_env: BuildEnvironment,
                   docnames=List[str],
                   ):
    

    for k, v in list(kb_app.config.resources.items()):
        sphinx_app.add_directive(k, ResourceDirective)
17715
protected function setUp()
	{
		if (isset($this->configurator->tags[$this->tagName]))
		{
			return;
		}

		$tag = $this->configurator->tags->add($this->tagName);
		foreach (['seq', 'tseq'] as $attrName)
		{
			$tag->attributes->add($attrName)->filterChain->append(
				$this->configurator->attributeFilters['#identifier']
			);
		}
		$tag->template = '<img alt="{.}" class="emoji" draggable="false" src="https://twemoji.maxcdn.com/2/svg/{@tseq}.svg"/>';
	}
1245657
def start(self):
        
        _log.debug('starting %s', self)
        self.started = True

        with _log_time('started %s', self):
            self.extensions.all.setup()
            self.extensions.all.start()
1167753
def setup(app):
    """"""
    import sphinx
    from .parser import CommonMarkParser

    if sphinx.version_info >= (1, 8):
        app.add_source_suffix('.md', 'markdown')
        app.add_source_parser(CommonMarkParser)
    elif sphinx.version_info >= (1, 4):
        app.add_source_parser('.md', CommonMarkParser)

    return {'version': __version__, 'parallel_read_safe': True}
418161
def setup(cls) -> None:
        """"""
        cls.prepare()
        setuptools.setup(
            name=cls.name, version=cls.version, description=cls.description,
            long_description=cls.long_description, url=cls.url, download_url=cls.download_url,
            author=cls.author, author_email=cls.author_email,
            maintainer=cls.try_fields('maintainer', 'author'),
            maintainer_email=cls.try_fields('maintainer_email', 'author_email'),
            license=cls.license_str, classifiers=cls.classifiers, keywords=cls.keywords,
            packages=cls.packages, package_dir={'': cls.root_directory},
            include_package_data=True,
            package_data=cls.package_data, exclude_package_data=cls.exclude_package_data,
            install_requires=cls.install_requires, extras_require=cls.extras_require,
            python_requires=cls.python_requires,
            entry_points=cls.entry_points, test_suite=cls.test_suite)
480864
public function boot()
    {
        $finder = $this->app->make('orchestra.extension.finder');

        foreach ($this->extensions as $name => $path) {
            if (\is_numeric($name)) {
                $finder->addPath($path);
            } else {
                $finder->registerExtension($name, $path);
            }
        }
    }
1330020
def install_docs(instance, clear_target):
    """"""

    _check_root()

    def make_docs():
        """Trigger a Sphinx make command to build the documentation."""
        log("Generating HTML documentation")

        try:
            build = Popen(
                [
                    'make',
                    'html'
                ],
                cwd='docs/'
            )

            build.wait()
        except Exception as e:
            log("Problem during documentation building: ", e, type(e),
                exc=True, lvl=error)
            return False
        return True

    make_docs()

    # If these need changes, make sure they are watertight and don't remove
    # wanted stuff!
    target = os.path.join('/var/lib/hfos', instance, 'frontend/docs')
    source = 'docs/build/html'

    log("Updating documentation directory:", target)

    if not os.path.exists(os.path.join(os.path.curdir, source)):
        log(
            "Documentation not existing yet. Run python setup.py "
            "build_sphinx first.", lvl=error)
        return

    if os.path.exists(target):
        log("Path already exists: " + target)
        if clear_target:
            log("Cleaning up " + target, lvl=warn)
            shutil.rmtree(target)

    log("Copying docs to " + target)
    copy_tree(source, target)
    log("Done: Install Docs")
99300
private function setupExtensionAdapter()
    {
        $extension = $this->createTemplatingExtensionAdapter();

        $extension->addHelperCollection('template', $this->getDefaultTemplateHelperCollection());
        $extension->addHelperCollection('view', $this->getDefaultViewHelperCollection());

        if (isset($this->options[self::OPTION_HELPERS])) {
            $viewHelperCollection = $this->createViewHelperCollection();
            $viewHelperCollection->addHelpers($this->options[self::OPTION_HELPERS]);

            $extension->addHelperCollection('component', $viewHelperCollection);
        }

        $this->templateEngine->setExtensionAdapter($extension);
    }
246080
public function setup() {

		if ( isset( $this->struct['description'] ) ) {
			$this->set_data( $this->struct['description'] );
		}

		$this->set_attributes();
		$this->set_dismissable();
		$this->set_state();

	}