Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 22, 2024
1 parent 2c4a0a7 commit 6ec3aae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion _modules/kerchunk/combine.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,11 @@ <h1>Source code for kerchunk.combine</h1><div class="highlight"><pre>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">selector</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
<span class="n">o</span> <span class="o">=</span> <span class="n">selector</span><span class="p">[</span><span class="n">index</span><span class="p">]</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">selector</span><span class="p">,</span> <span class="n">re</span><span class="o">.</span><span class="n">Pattern</span><span class="p">):</span>
<span class="n">o</span> <span class="o">=</span> <span class="n">selector</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="n">fn</span><span class="p">)</span><span class="o">.</span><span class="n">groups</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">regex_groups_o</span> <span class="o">=</span> <span class="n">selector</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="n">fn</span><span class="p">)</span><span class="o">.</span><span class="n">groups</span><span class="p">()</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">regex_groups_o</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">o</span> <span class="o">=</span> <span class="n">selector</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="n">fn</span><span class="p">)</span><span class="o">.</span><span class="n">group</span><span class="p">()</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">o</span> <span class="o">=</span> <span class="n">regex_groups_o</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="k">elif</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">selector</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span>
<span class="c1"># constant, should be int or float</span>
<span class="n">o</span> <span class="o">=</span> <span class="n">selector</span>
Expand Down

0 comments on commit 6ec3aae

Please sign in to comment.