Skip to content

Commit

Permalink
Deploying to gh-pages from @ 6276511 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Oct 25, 2023
1 parent 0324fd8 commit de84247
Show file tree
Hide file tree
Showing 24 changed files with 66 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ed93b6b51ec6b7ff7311befeb525705d
config: e4c81ac4b1b7ab93fb71781061fff3ca
tags: 645f666f9bcd5a90fca523b33c5a78b7
4 changes: 2 additions & 2 deletions _modules/biocutils/factor.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.factor &#8212; biocutils 0.0.4 documentation</title>
<title>biocutils.factor &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/intersect.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.intersect &#8212; biocutils 0.0.4 documentation</title>
<title>biocutils.intersect &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
29 changes: 18 additions & 11 deletions _modules/biocutils/is_list_of_type.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.is_list_of_type &#8212; biocutils 0.0.4 documentation</title>
<title>biocutils.is_list_of_type &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand All @@ -29,7 +29,7 @@
<div class="body" role="main">

<h1>Source code for biocutils.is_list_of_type</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span>
<span></span><span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Callable</span><span class="p">,</span> <span class="n">Union</span>

<span class="n">__author__</span> <span class="o">=</span> <span class="s2">&quot;jkanche&quot;</span>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s2">&quot;jkanche&quot;</span>
Expand All @@ -38,20 +38,27 @@ <h1>Source code for biocutils.is_list_of_type</h1><div class="highlight"><pre>

<div class="viewcode-block" id="is_list_of_type">
<a class="viewcode-back" href="../../api/biocutils.html#biocutils.is_list_of_type.is_list_of_type">[docs]</a>
<span class="k">def</span> <span class="nf">is_list_of_type</span><span class="p">(</span><span class="n">x</span><span class="p">:</span> <span class="n">Any</span><span class="p">,</span> <span class="n">target_type</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">is_list_of_type</span><span class="p">(</span><span class="n">x</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">],</span> <span class="n">target_type</span><span class="p">:</span> <span class="n">Callable</span><span class="p">,</span> <span class="n">ignore_none</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Checks if ``x`` is a list, and whether all elements of the list are of the same type.</span>

<span class="sd"> Args:</span>
<span class="sd"> x (Any): Any list-like object.</span>
<span class="sd"> target_type (callable): Type to check for, e.g. ``str``, ``int``.</span>
<span class="sd"> x: A list or tuple of values.</span>

<span class="sd"> target_type: Type to check for, e.g. ``str``, ``int``.</span>

<span class="sd"> ignore_none: Whether to ignore Nones when comparing to ``target_type``.</span>

<span class="sd"> Returns:</span>
<span class="sd"> bool: True if ``x`` is :py:class:`list` or :py:class:`tuple` and</span>
<span class="sd"> all elements are of the same type.</span>
<span class="sd"> True if ``x`` is a list or tuple and all elements are of the target</span>
<span class="sd"> type (or None, if ``ignore_none = True``). Otherwise, false.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">))</span> <span class="ow">and</span> <span class="nb">all</span><span class="p">(</span>
<span class="nb">isinstance</span><span class="p">(</span><span class="n">item</span><span class="p">,</span> <span class="n">target_type</span><span class="p">)</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">x</span>
<span class="p">)</span></div>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">)):</span>
<span class="k">return</span> <span class="kc">False</span>

<span class="k">if</span> <span class="ow">not</span> <span class="n">ignore_none</span><span class="p">:</span>
<span class="k">return</span> <span class="nb">all</span><span class="p">(</span><span class="nb">isinstance</span><span class="p">(</span><span class="n">item</span><span class="p">,</span> <span class="n">target_type</span><span class="p">)</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">x</span><span class="p">)</span>

<span class="k">return</span> <span class="nb">all</span><span class="p">((</span><span class="nb">isinstance</span><span class="p">(</span><span class="n">item</span><span class="p">,</span> <span class="n">target_type</span><span class="p">)</span> <span class="ow">or</span> <span class="n">item</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">)</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">x</span><span class="p">)</span></div>

</pre></div>

Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/map_to_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.map_to_index &#8212; biocutils 0.0.4 documentation</title>
<title>biocutils.map_to_index &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/match.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.match &#8212; biocutils 0.0.4 documentation</title>
<title>biocutils.match &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/package_utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.package_utils &#8212; biocutils 0.0.4 documentation</title>
<title>biocutils.package_utils &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/subset.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.subset &#8212; biocutils 0.0.4 documentation</title>
<title>biocutils.subset &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/union.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.union &#8212; biocutils 0.0.4 documentation</title>
<title>biocutils.union &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; biocutils 0.0.4 documentation</title>
<title>Overview: module code &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=233b9934" />
<script src="../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../_static/documentation_options.js?v=282f96c0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
Expand Down
2 changes: 1 addition & 1 deletion _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '0.0.4',
VERSION: '0.0.5',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
18 changes: 8 additions & 10 deletions api/biocutils.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<title>biocutils package &#8212; biocutils 0.0.4 documentation</title>
<title>biocutils package &#8212; biocutils 0.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=233b9934" />
<script src="../_static/documentation_options.js?v=8c5712d9"></script>
<script src="../_static/documentation_options.js?v=282f96c0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
Expand Down Expand Up @@ -95,21 +95,19 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<span id="biocutils-is-list-of-type-module"></span><h2>biocutils.is_list_of_type module<a class="headerlink" href="#module-biocutils.is_list_of_type" title="Link to this heading"></a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="biocutils.is_list_of_type.is_list_of_type">
<span class="sig-prename descclassname"><span class="pre">biocutils.is_list_of_type.</span></span><span class="sig-name descname"><span class="pre">is_list_of_type</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3.9/library/typing.html#typing.Any" title="(in Python v3.9)"><span class="pre">Any</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_type</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3.9/library/functions.html#bool" title="(in Python v3.9)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/biocutils/is_list_of_type.html#is_list_of_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#biocutils.is_list_of_type.is_list_of_type" title="Link to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">biocutils.is_list_of_type.</span></span><span class="sig-name descname"><span class="pre">is_list_of_type</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3.9/library/stdtypes.html#list" title="(in Python v3.9)"><span class="pre">list</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3.9/library/stdtypes.html#tuple" title="(in Python v3.9)"><span class="pre">tuple</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_type</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3.9/library/typing.html#typing.Callable" title="(in Python v3.9)"><span class="pre">Callable</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">ignore_none</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3.9/library/functions.html#bool" title="(in Python v3.9)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3.9/library/functions.html#bool" title="(in Python v3.9)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/biocutils/is_list_of_type.html#is_list_of_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#biocutils.is_list_of_type.is_list_of_type" title="Link to this definition"></a></dt>
<dd><p>Checks if <code class="docutils literal notranslate"><span class="pre">x</span></code> is a list, and whether all elements of the list are of the same type.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<em>Any</em>) – Any list-like object.</p></li>
<li><p><strong>target_type</strong> (<em>callable</em>) – Type to check for, e.g. <code class="docutils literal notranslate"><span class="pre">str</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>.</p></li>
<li><p><strong>x</strong> – A list or tuple of values.</p></li>
<li><p><strong>target_type</strong> – Type to check for, e.g. <code class="docutils literal notranslate"><span class="pre">str</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>.</p></li>
<li><p><strong>ignore_none</strong> – Whether to ignore Nones when comparing to <code class="docutils literal notranslate"><span class="pre">target_type</span></code>.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>True if <code class="docutils literal notranslate"><span class="pre">x</span></code> is <a class="reference external" href="https://docs.python.org/3.9/library/stdtypes.html#list" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></a> or <a class="reference external" href="https://docs.python.org/3.9/library/stdtypes.html#tuple" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a> and
all elements are of the same type.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.9/library/functions.html#bool" title="(in Python v3.9)">bool</a></p>
<dd class="field-even"><p>True if <code class="docutils literal notranslate"><span class="pre">x</span></code> is a list or tuple and all elements are of the target
type (or None, if <code class="docutils literal notranslate"><span class="pre">ignore_none</span> <span class="pre">=</span> <span class="pre">True</span></code>). Otherwise, false.</p>
</dd>
</dl>
</dd></dl>
Expand Down
Loading

0 comments on commit de84247

Please sign in to comment.