Skip to content

Commit

Permalink
deploy: 5498eec
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Sep 6, 2023
1 parent 2f8ac8c commit 6f9a529
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 1 deletion.
Binary file modified .doctrees/api/tyro/conf/_markers/index.doctree
Binary file not shown.
Binary file modified .doctrees/api/tyro/conf/index.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
5 changes: 5 additions & 0 deletions _modules/tyro/_fields/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@ <h1>Source code for tyro._fields</h1><div class="highlight"><pre>
<span class="n">_markers</span><span class="o">.</span><span class="n">Positional</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">markers</span>
<span class="c1"># Dummy dataclasses should have a single positional field.</span>
<span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="n">_strings</span><span class="o">.</span><span class="n">dummy_field_name</span>
<span class="ow">or</span> <span class="p">(</span>
<span class="c1"># Make required arguments positional.</span>
<span class="n">_markers</span><span class="o">.</span><span class="n">PositionalRequiredArgs</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">markers</span>
<span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">default</span> <span class="ow">in</span> <span class="n">MISSING_SINGLETONS</span>
<span class="p">)</span>
<span class="p">)</span></div>

<div class="viewcode-block" id="FieldDefinition.is_positional_call"><a class="viewcode-back" href="../../../api/tyro/_fields/#tyro._fields.FieldDefinition.is_positional_call">[docs]</a> <span class="k">def</span> <span class="nf">is_positional_call</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
Expand Down
3 changes: 3 additions & 0 deletions _modules/tyro/conf/_markers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ <h1>Source code for tyro.conf._markers</h1><div class="highlight"><pre>
<span class="sd">&quot;&quot;&quot;A type `T` can be annotated as `Positional[T]` if we want to parse it as a positional</span>
<span class="sd">argument.&quot;&quot;&quot;</span>

<span class="n">PositionalRequiredArgs</span> <span class="o">=</span> <span class="n">Annotated</span><span class="p">[</span><span class="n">T</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span>
<span class="sd">&quot;&quot;&quot;Make all arguments without defaults positional.&quot;&quot;&quot;</span>

<span class="c1"># Private marker. For when an argument is not only positional in the CLI, but also in</span>
<span class="c1"># the callable.</span>
<span class="n">_PositionalCall</span> <span class="o">=</span> <span class="n">Annotated</span><span class="p">[</span><span class="n">T</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span>
Expand Down
6 changes: 6 additions & 0 deletions _sources/api/tyro/conf/_markers/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ Module Contents
A type ``T`` can be annotated as ``Positional[T]`` if we want to parse it as a positional
argument.

.. py:data:: PositionalRequiredArgs
Make all arguments without defaults positional.

.. py:data:: Fixed
Expand Down
6 changes: 6 additions & 0 deletions _sources/api/tyro/conf/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ Package Contents
A type ``T`` can be annotated as ``Positional[T]`` if we want to parse it as a positional
argument.

.. py:data:: PositionalRequiredArgs
Make all arguments without defaults positional.

.. py:data:: Suppress
Expand Down
7 changes: 7 additions & 0 deletions api/tyro/conf/_markers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Permalin
argument.</p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="tyro.conf._markers.PositionalRequiredArgs">
<span class="sig-prename descclassname"><span class="pre">tyro.conf._markers.</span></span><span class="sig-name descname"><span class="pre">PositionalRequiredArgs</span></span><a class="headerlink" href="#tyro.conf._markers.PositionalRequiredArgs" title="Permalink to this definition">#</a></dt>
<dd><p>Make all arguments without defaults positional.</p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="tyro.conf._markers.Fixed">
<span class="sig-prename descclassname"><span class="pre">tyro.conf._markers.</span></span><span class="sig-name descname"><span class="pre">Fixed</span></span><a class="headerlink" href="#tyro.conf._markers.Fixed" title="Permalink to this definition">#</a></dt>
Expand Down Expand Up @@ -448,6 +454,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Permalin
<li><a class="reference internal" href="#module-contents">Module Contents</a><ul>
<li><a class="reference internal" href="#tyro.conf._markers.T">T</a></li>
<li><a class="reference internal" href="#tyro.conf._markers.Positional">Positional</a></li>
<li><a class="reference internal" href="#tyro.conf._markers.PositionalRequiredArgs">PositionalRequiredArgs</a></li>
<li><a class="reference internal" href="#tyro.conf._markers.Fixed">Fixed</a></li>
<li><a class="reference internal" href="#tyro.conf._markers.Suppress">Suppress</a></li>
<li><a class="reference internal" href="#tyro.conf._markers.SuppressFixed">SuppressFixed</a></li>
Expand Down
7 changes: 7 additions & 0 deletions api/tyro/conf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,12 @@ <h2>Package Contents<a class="headerlink" href="#package-contents" title="Permal
argument.</p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="tyro.conf.PositionalRequiredArgs">
<span class="sig-prename descclassname"><span class="pre">tyro.conf.</span></span><span class="sig-name descname"><span class="pre">PositionalRequiredArgs</span></span><a class="headerlink" href="#tyro.conf.PositionalRequiredArgs" title="Permalink to this definition">#</a></dt>
<dd><p>Make all arguments without defaults positional.</p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="tyro.conf.Suppress">
<span class="sig-prename descclassname"><span class="pre">tyro.conf.</span></span><span class="sig-name descname"><span class="pre">Suppress</span></span><a class="headerlink" href="#tyro.conf.Suppress" title="Permalink to this definition">#</a></dt>
Expand Down Expand Up @@ -530,6 +536,7 @@ <h2>Package Contents<a class="headerlink" href="#package-contents" title="Permal
<li><a class="reference internal" href="#tyro.conf.OmitArgPrefixes">OmitArgPrefixes</a></li>
<li><a class="reference internal" href="#tyro.conf.OmitSubcommandPrefixes">OmitSubcommandPrefixes</a></li>
<li><a class="reference internal" href="#tyro.conf.Positional">Positional</a></li>
<li><a class="reference internal" href="#tyro.conf.PositionalRequiredArgs">PositionalRequiredArgs</a></li>
<li><a class="reference internal" href="#tyro.conf.Suppress">Suppress</a></li>
<li><a class="reference internal" href="#tyro.conf.SuppressFixed">SuppressFixed</a></li>
<li><a class="reference internal" href="#tyro.conf.UseAppendAction">UseAppendAction</a></li>
Expand Down
6 changes: 6 additions & 0 deletions genindex/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,12 @@ <h2>P</h2>

<ul>
<li><a href="../api/tyro/conf/_markers/#tyro.conf._markers.Positional">(in module tyro.conf._markers)</a>
</li>
</ul></li>
<li><a href="../api/tyro/conf/#tyro.conf.PositionalRequiredArgs">PositionalRequiredArgs (in module tyro.conf)</a>

<ul>
<li><a href="../api/tyro/conf/_markers/#tyro.conf._markers.PositionalRequiredArgs">(in module tyro.conf._markers)</a>
</li>
</ul></li>
</ul></td>
Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 6f9a529

Please sign in to comment.