| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,100 +20,101 @@ | |||
| 20 | 20 | # If your extensions are in another directory, add it here. If the directory | |
| 21 | 21 | # is relative to the documentation root, use os.path.abspath to make it | |
| 22 | 22 | # absolute, like shown here. | |
| 23 | - #sys.path.append(os.path.abspath('.')) | ||
| 24 | - sys.path.insert(0, os.path.abspath('../..')) | ||
| 23 | + # sys.path.append(os.path.abspath('.')) | ||
| 24 | + sys.path.insert(0, os.path.abspath("../..")) | ||
| 25 | 25 | ||
| 26 | 26 | # General configuration | |
| 27 | 27 | # --------------------- | |
| 28 | 28 | ||
| 29 | 29 | # Add any Sphinx extension module names here, as strings. They can be extensions | |
| 30 | 30 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | |
| 31 | - extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest'] | ||
| 31 | + extensions = ["sphinx.ext.autodoc", "sphinx.ext.doctest"] | ||
| 32 | 32 | ||
| 33 | 33 | # Add any paths that contain templates here, relative to this directory. | |
| 34 | 34 | templates_path = [] | |
| 35 | 35 | ||
| 36 | 36 | # The suffix of source filenames. | |
| 37 | - source_suffix = '.rst' | ||
| 37 | + source_suffix = ".rst" | ||
| 38 | 38 | ||
| 39 | 39 | # The encoding of source files. | |
| 40 | - #source_encoding = 'utf-8' | ||
| 40 | + # source_encoding = 'utf-8' | ||
| 41 | 41 | ||
| 42 | 42 | # The master toctree document. | |
| 43 | - master_doc = 'index' | ||
| 43 | + master_doc = "index" | ||
| 44 | 44 | ||
| 45 | 45 | # General information about the project. | |
| 46 | - project = 'GitPython' | ||
| 47 | - copyright = 'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel' | ||
| 46 | + project = "GitPython" | ||
| 47 | + copyright = ( | ||
| 48 | + "Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel" | ||
| 49 | + ) | ||
| 48 | 50 | ||
| 49 | 51 | # The version info for the project you're documenting, acts as replacement for | |
| 50 | 52 | # |version| and |release|, also used in various other places throughout the | |
| 51 | 53 | # built documents. | |
| 52 | 54 | # | |
| 53 | 55 | # The short X.Y version. | |
| 54 | - with open(os.path.join(os.path.dirname(__file__), "..", "..", 'VERSION')) as fd: | ||
| 56 | + with open(os.path.join(os.path.dirname(__file__), "..", "..", "VERSION")) as fd: | ||
| 55 | 57 | VERSION = fd.readline().strip() | |
| 56 | 58 | version = VERSION | |
| 57 | 59 | # The full version, including alpha/beta/rc tags. | |
| 58 | 60 | release = VERSION | |
| 59 | 61 | ||
| 60 | 62 | # The language for content autogenerated by Sphinx. Refer to documentation | |
| 61 | 63 | # for a list of supported languages. | |
| 62 | - #language = None | ||
| 64 | + # language = None | ||
| 63 | 65 | ||
| 64 | 66 | # There are two options for replacing |today|: either, you set today to some | |
| 65 | 67 | # non-false value, then it is used: | |
| 66 | - #today = '' | ||
| 68 | + # today = '' | ||
| 67 | 69 | # Else, today_fmt is used as the format for a strftime call. | |
| 68 | - #today_fmt = '%B %d, %Y' | ||
| 70 | + # today_fmt = '%B %d, %Y' | ||
| 69 | 71 | ||
| 70 | 72 | # List of documents that shouldn't be included in the build. | |
| 71 | - #unused_docs = [] | ||
| 73 | + # unused_docs = [] | ||
| 72 | 74 | ||
| 73 | 75 | # List of directories, relative to source directory, that shouldn't be searched | |
| 74 | 76 | # for source files. | |
| 75 | - exclude_trees = ['build'] | ||
| 77 | + exclude_trees = ["build"] | ||
| 76 | 78 | ||
| 77 | 79 | # The reST default role (used for this markup: `text`) to use for all documents. | |
| 78 | - #default_role = None | ||
| 80 | + # default_role = None | ||
| 79 | 81 | ||
| 80 | 82 | # If true, '()' will be appended to :func: etc. cross-reference text. | |
| 81 | - #add_function_parentheses = True | ||
| 83 | + # add_function_parentheses = True | ||
| 82 | 84 | ||
| 83 | 85 | # If true, the current module name will be prepended to all description | |
| 84 | 86 | # unit titles (such as .. function::). | |
| 85 | - #add_module_names = True | ||
| 87 | + # add_module_names = True | ||
| 86 | 88 | ||
| 87 | 89 | # If true, sectionauthor and moduleauthor directives will be shown in the | |
| 88 | 90 | # output. They are ignored by default. | |
| 89 | - #show_authors = False | ||
| 91 | + # show_authors = False | ||
| 90 | 92 | ||
| 91 | 93 | # The name of the Pygments (syntax highlighting) style to use. | |
| 92 | - pygments_style = 'sphinx' | ||
| 94 | + pygments_style = "sphinx" | ||
| 93 | 95 | ||
| 94 | 96 | ||
| 95 | 97 | # Options for HTML output | |
| 96 | 98 | # ----------------------- | |
| 97 | 99 | ||
| 98 | - html_theme = 'sphinx_rtd_theme' | ||
| 99 | - html_theme_options = { | ||
| 100 | - } | ||
| 100 | + html_theme = "sphinx_rtd_theme" | ||
| 101 | + html_theme_options = {} | ||
| 101 | 102 | ||
| 102 | 103 | # The name for this set of Sphinx documents. If None, it defaults to | |
| 103 | 104 | # "<project> v<release> documentation". | |
| 104 | - #html_title = None | ||
| 105 | + # html_title = None | ||
| 105 | 106 | ||
| 106 | 107 | # A shorter title for the navigation bar. Default is the same as html_title. | |
| 107 | - #html_short_title = None | ||
| 108 | + # html_short_title = None | ||
| 108 | 109 | ||
| 109 | 110 | # The name of an image file (relative to this directory) to place at the top | |
| 110 | 111 | # of the sidebar. | |
| 111 | - #html_logo = None | ||
| 112 | + # html_logo = None | ||
| 112 | 113 | ||
| 113 | 114 | # The name of an image file (within the static path) to use as favicon of the | |
| 114 | 115 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 | |
| 115 | 116 | # pixels large. | |
| 116 | - #html_favicon = None | ||
| 117 | + # html_favicon = None | ||
| 117 | 118 | ||
| 118 | 119 | # Add any paths that contain custom static files (such as style sheets) here, | |
| 119 | 120 | # relative to this directory. They are copied after the builtin static files, | |
@@ -122,72 +123,71 @@ | |||
| 122 | 123 | ||
| 123 | 124 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | |
| 124 | 125 | # using the given strftime format. | |
| 125 | - #html_last_updated_fmt = '%b %d, %Y' | ||
| 126 | + # html_last_updated_fmt = '%b %d, %Y' | ||
| 126 | 127 | ||
| 127 | 128 | # If true, SmartyPants will be used to convert quotes and dashes to | |
| 128 | 129 | # typographically correct entities. | |
| 129 | - #html_use_smartypants = True | ||
| 130 | + # html_use_smartypants = True | ||
| 130 | 131 | ||
| 131 | 132 | # Custom sidebar templates, maps document names to template names. | |
| 132 | - #html_sidebars = {} | ||
| 133 | + # html_sidebars = {} | ||
| 133 | 134 | ||
| 134 | 135 | # Additional templates that should be rendered to pages, maps page names to | |
| 135 | 136 | # template names. | |
| 136 | - #html_additional_pages = {} | ||
| 137 | + # html_additional_pages = {} | ||
| 137 | 138 | ||
| 138 | 139 | # If false, no module index is generated. | |
| 139 | - #html_use_modindex = True | ||
| 140 | + # html_use_modindex = True | ||
| 140 | 141 | ||
| 141 | 142 | # If false, no index is generated. | |
| 142 | - #html_use_index = True | ||
| 143 | + # html_use_index = True | ||
| 143 | 144 | ||
| 144 | 145 | # If true, the index is split into individual pages for each letter. | |
| 145 | - #html_split_index = False | ||
| 146 | + # html_split_index = False | ||
| 146 | 147 | ||
| 147 | 148 | # If true, the reST sources are included in the HTML build as _sources/<name>. | |
| 148 | - #html_copy_source = True | ||
| 149 | + # html_copy_source = True | ||
| 149 | 150 | ||
| 150 | 151 | # If true, an OpenSearch description file will be output, and all pages will | |
| 151 | 152 | # contain a <link> tag referring to it. The value of this option must be the | |
| 152 | 153 | # base URL from which the finished HTML is served. | |
| 153 | - #html_use_opensearch = '' | ||
| 154 | + # html_use_opensearch = '' | ||
| 154 | 155 | ||
| 155 | 156 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). | |
| 156 | - #html_file_suffix = '' | ||
| 157 | + # html_file_suffix = '' | ||
| 157 | 158 | ||
| 158 | 159 | # Output file base name for HTML help builder. | |
| 159 | - htmlhelp_basename = 'gitpythondoc' | ||
| 160 | + htmlhelp_basename = "gitpythondoc" | ||
| 160 | 161 | ||
| 161 | 162 | ||
| 162 | 163 | # Options for LaTeX output | |
| 163 | 164 | # ------------------------ | |
| 164 | 165 | ||
| 165 | 166 | # The paper size ('letter' or 'a4'). | |
| 166 | - #latex_paper_size = 'letter' | ||
| 167 | + # latex_paper_size = 'letter' | ||
| 167 | 168 | ||
| 168 | 169 | # The font size ('10pt', '11pt' or '12pt'). | |
| 169 | - #latex_font_size = '10pt' | ||
| 170 | + # latex_font_size = '10pt' | ||
| 170 | 171 | ||
| 171 | 172 | # Grouping the document tree into LaTeX files. List of tuples | |
| 172 | 173 | # (source start file, target name, title, author, document class [howto/manual]). | |
| 173 | 174 | latex_documents = [ | |
| 174 | - ('index', 'GitPython.tex', r'GitPython Documentation', | ||
| 175 | - r'Michael Trier', 'manual'), | ||
| 175 | + ("index", "GitPython.tex", r"GitPython Documentation", r"Michael Trier", "manual"), | ||
| 176 | 176 | ] | |
| 177 | 177 | ||
| 178 | 178 | # The name of an image file (relative to this directory) to place at the top of | |
| 179 | 179 | # the title page. | |
| 180 | - #latex_logo = None | ||
| 180 | + # latex_logo = None | ||
| 181 | 181 | ||
| 182 | 182 | # For "manual" documents, if this is true, then toplevel headings are parts, | |
| 183 | 183 | # not chapters. | |
| 184 | - #latex_use_parts = False | ||
| 184 | + # latex_use_parts = False | ||
| 185 | 185 | ||
| 186 | 186 | # Additional stuff for the LaTeX preamble. | |
| 187 | - #latex_preamble = '' | ||
| 187 | + # latex_preamble = '' | ||
| 188 | 188 | ||
| 189 | 189 | # Documents to append as an appendix to all manuals. | |
| 190 | - #latex_appendices = [] | ||
| 190 | + # latex_appendices = [] | ||
| 191 | 191 | ||
| 192 | 192 | # If false, no module index is generated. | |
| 193 | - #latex_use_modindex = True | ||
| 193 | + # latex_use_modindex = True | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,8 +4,8 @@ | |||
| 4 | 4 | # This module is part of GitPython and is released under | |
| 5 | 5 | # the BSD License: http://www.opensource.org/licenses/bsd-license.php | |
| 6 | 6 | # flake8: noqa | |
| 7 | - #@PydevCodeAnalysisIgnore | ||
| 8 | - from git.exc import * # @NoMove @IgnorePep8 | ||
| 7 | + # @PydevCodeAnalysisIgnore | ||
| 8 | + from git.exc import * # @NoMove @IgnorePep8 | ||
| 9 | 9 | import inspect | |
| 10 | 10 | import os | |
| 11 | 11 | import sys | |
@@ -14,57 +14,61 @@ | |||
| 14 | 14 | from typing import Optional | |
| 15 | 15 | from git.types import PathLike | |
| 16 | 16 | ||
| 17 | - __version__ = 'git' | ||
| 17 | + __version__ = "git" | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | - #{ Initialization | ||
| 20 | + # { Initialization | ||
| 21 | 21 | def _init_externals() -> None: | |
| 22 | 22 | """Initialize external projects by putting them into the path""" | |
| 23 | - if __version__ == 'git' and 'PYOXIDIZER' not in os.environ: | ||
| 24 | - sys.path.insert(1, osp.join(osp.dirname(__file__), 'ext', 'gitdb')) | ||
| 23 | + if __version__ == "git" and "PYOXIDIZER" not in os.environ: | ||
| 24 | + sys.path.insert(1, osp.join(osp.dirname(__file__), "ext", "gitdb")) | ||
| 25 | 25 | ||
| 26 | 26 | try: | |
| 27 | 27 | import gitdb | |
| 28 | 28 | except ImportError as e: | |
| 29 | 29 | raise ImportError("'gitdb' could not be found in your PYTHONPATH") from e | |
| 30 | 30 | # END verify import | |
| 31 | 31 | ||
| 32 | - #} END initialization | ||
| 32 | + | ||
| 33 | + # } END initialization | ||
| 33 | 34 | ||
| 34 | 35 | ||
| 35 | 36 | ################# | |
| 36 | 37 | _init_externals() | |
| 37 | 38 | ################# | |
| 38 | 39 | ||
| 39 | - #{ Imports | ||
| 40 | + # { Imports | ||
| 40 | 41 | ||
| 41 | 42 | try: | |
| 42 | 43 | from git.config import GitConfigParser # @NoMove @IgnorePep8 | |
| 43 | - from git.objects import * # @NoMove @IgnorePep8 | ||
| 44 | - from git.refs import * # @NoMove @IgnorePep8 | ||
| 45 | - from git.diff import * # @NoMove @IgnorePep8 | ||
| 46 | - from git.db import * # @NoMove @IgnorePep8 | ||
| 47 | - from git.cmd import Git # @NoMove @IgnorePep8 | ||
| 48 | - from git.repo import Repo # @NoMove @IgnorePep8 | ||
| 49 | - from git.remote import * # @NoMove @IgnorePep8 | ||
| 50 | - from git.index import * # @NoMove @IgnorePep8 | ||
| 51 | - from git.util import ( # @NoMove @IgnorePep8 | ||
| 44 | + from git.objects import * # @NoMove @IgnorePep8 | ||
| 45 | + from git.refs import * # @NoMove @IgnorePep8 | ||
| 46 | + from git.diff import * # @NoMove @IgnorePep8 | ||
| 47 | + from git.db import * # @NoMove @IgnorePep8 | ||
| 48 | + from git.cmd import Git # @NoMove @IgnorePep8 | ||
| 49 | + from git.repo import Repo # @NoMove @IgnorePep8 | ||
| 50 | + from git.remote import * # @NoMove @IgnorePep8 | ||
| 51 | + from git.index import * # @NoMove @IgnorePep8 | ||
| 52 | + from git.util import ( # @NoMove @IgnorePep8 | ||
| 52 | 53 | LockFile, | |
| 53 | 54 | BlockingLockFile, | |
| 54 | 55 | Stats, | |
| 55 | 56 | Actor, | |
| 56 | 57 | rmtree, | |
| 57 | 58 | ) | |
| 58 | 59 | except GitError as exc: | |
| 59 | - raise ImportError('%s: %s' % (exc.__class__.__name__, exc)) from exc | ||
| 60 | + raise ImportError("%s: %s" % (exc.__class__.__name__, exc)) from exc | ||
| 60 | 61 | ||
| 61 | - #} END imports | ||
| 62 | + # } END imports | ||
| 62 | 63 | ||
| 63 | - __all__ = [name for name, obj in locals().items() | ||
| 64 | - if not (name.startswith('_') or inspect.ismodule(obj))] | ||
| 64 | + __all__ = [ | ||
| 65 | + name | ||
| 66 | + for name, obj in locals().items() | ||
| 67 | + if not (name.startswith("_") or inspect.ismodule(obj)) | ||
| 68 | + ] | ||
| 65 | 69 | ||
| 66 | 70 | ||
| 67 | - #{ Initialize git executable path | ||
| 71 | + # { Initialize git executable path | ||
| 68 | 72 | GIT_OK = None | |
| 69 | 73 | ||
| 70 | 74 | ||
@@ -79,12 +83,14 @@ def refresh(path: Optional[PathLike] = None) -> None: | |||
| 79 | 83 | return | |
| 80 | 84 | ||
| 81 | 85 | GIT_OK = True | |
| 82 | - #} END initialize git executable path | ||
| 86 | + | ||
| 87 | + | ||
| 88 | + # } END initialize git executable path | ||
| 83 | 89 | ||
| 84 | 90 | ||
| 85 | 91 | ################# | |
| 86 | 92 | try: | |
| 87 | 93 | refresh() | |
| 88 | 94 | except Exception as exc: | |
| 89 | - raise ImportError('Failed to initialize: {0}'.format(exc)) from exc | ||
| 95 | + raise ImportError("Failed to initialize: {0}".format(exc)) from exc | ||
| 90 | 96 | ################# | |
| Back | FazBrowse Home | New Git URL |
0 commit comments