Skip to content

Commit

Permalink
deploy: 4300249
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Dec 16, 2023
1 parent 6a479e0 commit b6e97d8
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 4 deletions.
14 changes: 13 additions & 1 deletion _modules/bumpversion/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
<article role="main">
<h1>Source code for bumpversion.files</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;Methods for changing files.&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">os.path</span>
<span class="kn">import</span> <span class="nn">re</span>
<span class="kn">from</span> <span class="nn">copy</span> <span class="kn">import</span> <span class="n">deepcopy</span>
<span class="kn">from</span> <span class="nn">difflib</span> <span class="kn">import</span> <span class="n">context_diff</span>
Expand Down Expand Up @@ -347,7 +348,18 @@ <h1>Source code for bumpversion.files</h1><div class="highlight"><pre>
<div class="viewcode-block" id="ConfiguredFile.get_file_contents">
<a class="viewcode-back" href="../../reference/bumpversion/bumpversion.files.html#bumpversion.files.ConfiguredFile.get_file_contents">[docs]</a>
<span class="k">def</span> <span class="nf">get_file_contents</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the contents of the file.&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Return the contents of the file.</span>

<span class="sd"> Raises:</span>
<span class="sd"> FileNotFoundError: if the file doesn&#39;t exist</span>

<span class="sd"> Returns:</span>
<span class="sd"> The contents of the file</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">file_change</span><span class="o">.</span><span class="n">filename</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">FileNotFoundError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;File not found: &#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">file_change</span><span class="o">.</span><span class="n">filename</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">)</span>

<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">file_change</span><span class="o">.</span><span class="n">filename</span><span class="p">,</span> <span class="s2">&quot;rt&quot;</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
<span class="n">contents</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_newlines</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">newlines</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">newlines</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">)</span> <span class="k">else</span> <span class="n">f</span><span class="o">.</span><span class="n">newlines</span>
Expand Down
18 changes: 18 additions & 0 deletions _modules/bumpversion/version_part.html
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,24 @@ <h1>Source code for bumpversion.version_part</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">search</span> <span class="o">=</span> <span class="n">search</span>
<span class="bp">self</span><span class="o">.</span><span class="n">replace</span> <span class="o">=</span> <span class="n">replace</span>

<div class="viewcode-block" id="VersionConfig.__repr__">
<a class="viewcode-back" href="../../reference/bumpversion/bumpversion.version_part.html#bumpversion.version_part.VersionConfig.__repr__">[docs]</a>
<span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;&lt;bumpversion.VersionConfig:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">parse_regex</span><span class="o">.</span><span class="n">pattern</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">serialize_formats</span><span class="si">}</span><span class="s2">&gt;&quot;</span></div>


<div class="viewcode-block" id="VersionConfig.__eq__">
<a class="viewcode-back" href="../../reference/bumpversion/bumpversion.version_part.html#bumpversion.version_part.VersionConfig.__eq__">[docs]</a>
<span class="k">def</span> <span class="fm">__eq__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">:</span> <span class="n">Any</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="k">return</span> <span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">parse_regex</span><span class="o">.</span><span class="n">pattern</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">parse_regex</span><span class="o">.</span><span class="n">pattern</span>
<span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">serialize_formats</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">serialize_formats</span>
<span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">part_configs</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">part_configs</span>
<span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">search</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">search</span>
<span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">replace</span> <span class="o">==</span> <span class="n">other</span><span class="o">.</span><span class="n">replace</span>
<span class="p">)</span></div>


<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">order</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
Expand Down
2 changes: 1 addition & 1 deletion _sources/reference/bumpversion/bumpversion.cli.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
```
````

````{py:function} bump(args: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], regex: bool, no_configured_files: bool, ignore_missing_version: bool, dry_run: bool, commit: typing.Optional[bool], tag: typing.Optional[bool], sign_tags: typing.Optional[bool], tag_name: typing.Optional[str], tag_message: typing.Optional[str], message: typing.Optional[str], commit_args: typing.Optional[str], show_list: bool) -> None
````{py:function} bump(args: list, config_file: typing.Optional[str], verbose: int, allow_dirty: typing.Optional[bool], current_version: typing.Optional[str], new_version: typing.Optional[str], parse: typing.Optional[str], serialize: typing.Optional[typing.List[str]], search: typing.Optional[str], replace: typing.Optional[str], regex: typing.Optional[bool], no_configured_files: bool, ignore_missing_version: bool, dry_run: bool, commit: typing.Optional[bool], tag: typing.Optional[bool], sign_tags: typing.Optional[bool], tag_name: typing.Optional[str], tag_message: typing.Optional[str], message: typing.Optional[str], commit_args: typing.Optional[str], show_list: bool) -> None
:canonical: bumpversion.cli.bump

```{autodoc2-docstring} bumpversion.cli.bump
Expand Down
10 changes: 10 additions & 0 deletions _sources/reference/bumpversion/bumpversion.version_part.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,16 @@
```{autodoc2-docstring} bumpversion.version_part.VersionConfig.__init__
```

````{py:method} __repr__() -> str
:canonical: bumpversion.version_part.VersionConfig.__repr__

````

````{py:method} __eq__(other: typing.Any) -> bool
:canonical: bumpversion.version_part.VersionConfig.__eq__

````

````{py:property} order
:canonical: bumpversion.version_part.VersionConfig.order
:type: typing.List[str]
Expand Down
4 changes: 4 additions & 0 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ <h2>_</h2>
<li><a href="reference/bumpversion/bumpversion.version_part.html#bumpversion.version_part.Version.__eq__">__eq__() (bumpversion.version_part.Version method)</a>

<ul>
<li><a href="reference/bumpversion/bumpversion.version_part.html#bumpversion.version_part.VersionConfig.__eq__">(bumpversion.version_part.VersionConfig method)</a>
</li>
<li><a href="reference/bumpversion/bumpversion.version_part.html#bumpversion.version_part.VersionPart.__eq__">(bumpversion.version_part.VersionPart method)</a>
</li>
</ul></li>
Expand All @@ -556,6 +558,8 @@ <h2>_</h2>
<li><a href="reference/bumpversion/bumpversion.scm.html#bumpversion.scm.SourceCodeManager.__repr__">(bumpversion.scm.SourceCodeManager method)</a>
</li>
<li><a href="reference/bumpversion/bumpversion.version_part.html#bumpversion.version_part.Version.__repr__">(bumpversion.version_part.Version method)</a>
</li>
<li><a href="reference/bumpversion/bumpversion.version_part.html#bumpversion.version_part.VersionConfig.__repr__">(bumpversion.version_part.VersionConfig method)</a>
</li>
<li><a href="reference/bumpversion/bumpversion.version_part.html#bumpversion.version_part.VersionPart.__repr__">(bumpversion.version_part.VersionPart method)</a>
</li>
Expand Down
Binary file modified objects.inv
Binary file not shown.
Loading

0 comments on commit b6e97d8

Please sign in to comment.