Skip to content

Commit

Permalink
Update style (pypa#1040)
Browse files Browse the repository at this point in the history
* Update style

* Update parse.py

* Update app.py

* final update

* . 1e7f8ff
  • Loading branch information
ofek committed Nov 13, 2023
1 parent 47ae1f4 commit 623e540
Show file tree
Hide file tree
Showing 5 changed files with 769 additions and 765 deletions.
8 changes: 4 additions & 4 deletions dev/plugins/builder/reference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,13 @@
<span class=linenos data-linenos="388 "></span><span class=sd> &quot;&quot;&quot;</span>
<span class=linenos data-linenos="389 "></span> <span class=k>return</span> <span class=nb>list</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>get_version_api</span><span class=p>())</span>
<span class=linenos data-linenos="390 "></span>
<span class=linenos data-linenos="391 "></span> <span class=k>def</span> <span class=nf>get_default_build_data</span><span class=p>(</span><span class=bp>self</span><span class=p>)</span> <span class=o>-&gt;</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>]:</span>
<span class=linenos data-linenos="391 "></span> <span class=k>def</span> <span class=nf>get_default_build_data</span><span class=p>(</span><span class=bp>self</span><span class=p>)</span> <span class=o>-&gt;</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>]:</span> <span class=c1># noqa: PLR6301</span>
<span class=linenos data-linenos="392 "></span><span class=w> </span><span class=sd>&quot;&quot;&quot;</span>
<span class=linenos data-linenos="393 "></span><span class=sd> A mapping that can be modified by [build hooks](../build-hook/reference.md) to influence the behavior of builds.</span>
<span class=linenos data-linenos="394 "></span><span class=sd> &quot;&quot;&quot;</span>
<span class=linenos data-linenos="395 "></span> <span class=k>return</span> <span class=p>{}</span>
<span class=linenos data-linenos="396 "></span>
<span class=linenos data-linenos="397 "></span> <span class=k>def</span> <span class=nf>set_build_data_defaults</span><span class=p>(</span><span class=bp>self</span><span class=p>,</span> <span class=n>build_data</span><span class=p>:</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>])</span> <span class=o>-&gt;</span> <span class=kc>None</span><span class=p>:</span>
<span class=linenos data-linenos="397 "></span> <span class=k>def</span> <span class=nf>set_build_data_defaults</span><span class=p>(</span><span class=bp>self</span><span class=p>,</span> <span class=n>build_data</span><span class=p>:</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>])</span> <span class=o>-&gt;</span> <span class=kc>None</span><span class=p>:</span> <span class=c1># noqa: PLR6301</span>
<span class=linenos data-linenos="398 "></span> <span class=n>build_data</span><span class=o>.</span><span class=n>setdefault</span><span class=p>(</span><span class=s1>&#39;artifacts&#39;</span><span class=p>,</span> <span class=p>[])</span>
<span class=linenos data-linenos="399 "></span> <span class=n>build_data</span><span class=o>.</span><span class=n>setdefault</span><span class=p>(</span><span class=s1>&#39;force_include&#39;</span><span class=p>,</span> <span class=p>{})</span>
<span class=linenos data-linenos="400 "></span>
Expand All @@ -414,7 +414,7 @@
<span class=linenos data-linenos="416 "></span><span class=w> </span><span class=sd>&quot;&quot;&quot;</span>
<span class=linenos data-linenos="417 "></span><span class=sd> https://peps.python.org/pep-0427/#escaping-and-unicode</span>
<span class=linenos data-linenos="418 "></span><span class=sd> &quot;&quot;&quot;</span>
<span class=linenos data-linenos="419 "></span> <span class=k>return</span> <span class=n>re</span><span class=o>.</span><span class=n>sub</span><span class=p>(</span><span class=sa>r</span><span class=s1>&#39;[^\w\d.]+&#39;</span><span class=p>,</span> <span class=s1>&#39;_&#39;</span><span class=p>,</span> <span class=n>file_name</span><span class=p>,</span> <span class=n>re</span><span class=o>.</span><span class=n>UNICODE</span><span class=p>)</span>
<span class=linenos data-linenos="419 "></span> <span class=k>return</span> <span class=n>re</span><span class=o>.</span><span class=n>sub</span><span class=p>(</span><span class=sa>r</span><span class=s1>&#39;[^\w\d.]+&#39;</span><span class=p>,</span> <span class=s1>&#39;_&#39;</span><span class=p>,</span> <span class=n>file_name</span><span class=p>,</span> <span class=n>flags</span><span class=o>=</span><span class=n>re</span><span class=o>.</span><span class=n>UNICODE</span><span class=p>)</span>
</code></pre></div> </details> <div class="doc doc-children"> <div class="doc doc-object doc-attribute"> <h3 id=hatchling.builders.plugin.interface.BuilderInterface.PLUGIN_NAME class="doc doc-heading"> <code class="highlight language-python"><span class=n>PLUGIN_NAME</span> <span class=o>=</span> <span class=s1>&#39;&#39;</span></code> <span class="doc doc-labels"> <small class="doc doc-label doc-label-class-attribute"><code>class-attribute</code></small> <small class="doc doc-label doc-label-instance-attribute"><code>instance-attribute</code></small> </span> <a href=#hatchling.builders.plugin.interface.BuilderInterface.PLUGIN_NAME class=headerlink title="Permanent link">&para;</a></h3> <div class="doc doc-contents "> <p>The name used for selection.</p> </div> </div> <div class="doc doc-object doc-attribute"> <h3 id=hatchling.builders.plugin.interface.BuilderInterface.app class="doc doc-heading"> <code class="highlight language-python"><span class=n>app</span><span class=p>:</span> <span class=n>Application</span></code> <span class="doc doc-labels"> <small class="doc doc-label doc-label-property"><code>property</code></small> </span> <a href=#hatchling.builders.plugin.interface.BuilderInterface.app class=headerlink title="Permanent link">&para;</a></h3> <div class="doc doc-contents "> <p>An instance of <a href=../../utilities/#hatchling.bridge.app.Application>Application</a>.</p> </div> </div> <div class="doc doc-object doc-attribute"> <h3 id=hatchling.builders.plugin.interface.BuilderInterface.root class="doc doc-heading"> <code class="highlight language-python"><span class=n>root</span><span class=p>:</span> <span class=nb>str</span></code> <span class="doc doc-labels"> <small class="doc doc-label doc-label-property"><code>property</code></small> </span> <a href=#hatchling.builders.plugin.interface.BuilderInterface.root class=headerlink title="Permanent link">&para;</a></h3> <div class="doc doc-contents "> <p>The root of the project tree.</p> </div> </div> <div class="doc doc-object doc-attribute"> <h3 id=hatchling.builders.plugin.interface.BuilderInterface.build_config class="doc doc-heading"> <code class="highlight language-python"><span class=n>build_config</span><span class=p>:</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>]</span></code> <span class="doc doc-labels"> <small class="doc doc-label doc-label-property"><code>property</code></small> </span> <a href=#hatchling.builders.plugin.interface.BuilderInterface.build_config class=headerlink title="Permanent link">&para;</a></h3> <div class="doc doc-contents "> <div class="tabbed-set tabbed-alternate" data-tabs=1:2><input checked=checked id=hatchling.builders.plugin.interface.BuilderInterface.build_config--__tabbed_1_1 name=hatchling.builders.plugin.interface.BuilderInterface.build_config--__tabbed_1 type=radio><input id=hatchling.builders.plugin.interface.BuilderInterface.build_config--__tabbed_1_2 name=hatchling.builders.plugin.interface.BuilderInterface.build_config--__tabbed_1 type=radio><div class=tabbed-labels><label for=hatchling.builders.plugin.interface.BuilderInterface.build_config--__tabbed_1_1><span class=twemoji><svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 16 16"><path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"/></svg></span> pyproject.toml</label><label for=hatchling.builders.plugin.interface.BuilderInterface.build_config--__tabbed_1_2><span class=twemoji><svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 16 16"><path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"/></svg></span> hatch.toml</label></div> <div class=tabbed-content> <div class=tabbed-block> <div class=highlight><pre><span></span><code><span class=k>[tool.hatch.build]</span>
</code></pre></div> </div> <div class=tabbed-block> <div class=highlight><pre><span></span><code><span class=k>[build]</span>
</code></pre></div> </div> </div> </div> </div> </div> <div class="doc doc-object doc-attribute"> <h3 id=hatchling.builders.plugin.interface.BuilderInterface.target_config class="doc doc-heading"> <code class="highlight language-python"><span class=n>target_config</span><span class=p>:</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>]</span></code> <span class="doc doc-labels"> <small class="doc doc-label doc-label-property"><code>property</code></small> </span> <a href=#hatchling.builders.plugin.interface.BuilderInterface.target_config class=headerlink title="Permanent link">&para;</a></h3> <div class="doc doc-contents "> <div class="tabbed-set tabbed-alternate" data-tabs=1:2><input checked=checked id=hatchling.builders.plugin.interface.BuilderInterface.target_config--__tabbed_1_1 name=hatchling.builders.plugin.interface.BuilderInterface.target_config--__tabbed_1 type=radio><input id=hatchling.builders.plugin.interface.BuilderInterface.target_config--__tabbed_1_2 name=hatchling.builders.plugin.interface.BuilderInterface.target_config--__tabbed_1 type=radio><div class=tabbed-labels><label for=hatchling.builders.plugin.interface.BuilderInterface.target_config--__tabbed_1_1><span class=twemoji><svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 16 16"><path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"/></svg></span> pyproject.toml</label><label for=hatchling.builders.plugin.interface.BuilderInterface.target_config--__tabbed_1_2><span class=twemoji><svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 16 16"><path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"/></svg></span> hatch.toml</label></div> <div class=tabbed-content> <div class=tabbed-block> <div class=highlight><pre><span></span><code><span class=k>[tool.hatch.build.targets.&lt;PLUGIN_NAME&gt;]</span>
Expand Down Expand Up @@ -459,7 +459,7 @@
<span class=linenos data-linenos="174 "></span><span class=sd> &quot;&quot;&quot;</span>
<span class=linenos data-linenos="175 "></span> <span class=k>yield from</span> <span class=bp>self</span><span class=o>.</span><span class=n>recurse_selected_project_files</span><span class=p>()</span>
<span class=linenos data-linenos="176 "></span> <span class=k>yield from</span> <span class=bp>self</span><span class=o>.</span><span class=n>recurse_forced_files</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>config</span><span class=o>.</span><span class=n>get_force_include</span><span class=p>())</span>
</code></pre></div> </details> </div> </div> <div class="doc doc-object doc-function"> <h3 id=hatchling.builders.plugin.interface.BuilderInterface.get_default_build_data class="doc doc-heading"> <code class="highlight language-python"><span class=n>get_default_build_data</span><span class=p>()</span> <span class=o>-&gt;</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>]</span></code> <a href=#hatchling.builders.plugin.interface.BuilderInterface.get_default_build_data class=headerlink title="Permanent link">&para;</a></h3> <div class="doc doc-contents "> <p>A mapping that can be modified by <a href=../../build-hook/reference/ >build hooks</a> to influence the behavior of builds.</p> <details class=quote> <summary>Source code in <code>backend/src/hatchling/builders/plugin/interface.py</code></summary> <div class=highlight><pre><span></span><code><span class=linenos data-linenos="391 "></span><span class=k>def</span> <span class=nf>get_default_build_data</span><span class=p>(</span><span class=bp>self</span><span class=p>)</span> <span class=o>-&gt;</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>]:</span>
</code></pre></div> </details> </div> </div> <div class="doc doc-object doc-function"> <h3 id=hatchling.builders.plugin.interface.BuilderInterface.get_default_build_data class="doc doc-heading"> <code class="highlight language-python"><span class=n>get_default_build_data</span><span class=p>()</span> <span class=o>-&gt;</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>]</span></code> <a href=#hatchling.builders.plugin.interface.BuilderInterface.get_default_build_data class=headerlink title="Permanent link">&para;</a></h3> <div class="doc doc-contents "> <p>A mapping that can be modified by <a href=../../build-hook/reference/ >build hooks</a> to influence the behavior of builds.</p> <details class=quote> <summary>Source code in <code>backend/src/hatchling/builders/plugin/interface.py</code></summary> <div class=highlight><pre><span></span><code><span class=linenos data-linenos="391 "></span><span class=k>def</span> <span class=nf>get_default_build_data</span><span class=p>(</span><span class=bp>self</span><span class=p>)</span> <span class=o>-&gt;</span> <span class=nb>dict</span><span class=p>[</span><span class=nb>str</span><span class=p>,</span> <span class=n>Any</span><span class=p>]:</span> <span class=c1># noqa: PLR6301</span>
<span class=linenos data-linenos="392 "></span><span class=w> </span><span class=sd>&quot;&quot;&quot;</span>
<span class=linenos data-linenos="393 "></span><span class=sd> A mapping that can be modified by [build hooks](../build-hook/reference.md) to influence the behavior of builds.</span>
<span class=linenos data-linenos="394 "></span><span class=sd> &quot;&quot;&quot;</span>
Expand Down
Loading

0 comments on commit 623e540

Please sign in to comment.