Skip to content

Commit

Permalink
Update typehints and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Aug 17, 2024
1 parent 29b6548 commit 12c03fd
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 19 deletions.
19 changes: 11 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h1>Welcome to NCTL’s documentation!<a class="headerlink" href="#welcome-to-nc
<span id="ngrok-tunnel"></span><h1>Ngrok Tunnel<a class="headerlink" href="#module-nctl.ngrok" title="Permalink to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="nctl.ngrok.distribution_handler">
<span class="sig-prename descclassname"><span class="pre">nctl.ngrok.</span></span><span class="sig-name descname"><span class="pre">distribution_handler</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">public_url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">env_dump</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#nctl.ngrok.distribution_handler" title="Permalink to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">nctl.ngrok.</span></span><span class="sig-name descname"><span class="pre">distribution_handler</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">public_url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">env_dump</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#nctl.ngrok.distribution_handler" title="Permalink to this definition"></a></dt>
<dd><p>Updates the cloudfront distribution in a dedicated process.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
Expand Down Expand Up @@ -100,7 +100,7 @@ <h1>Welcome to NCTL’s documentation!<a class="headerlink" href="#welcome-to-nc
<span id="aws-cloudfront"></span><h1>AWS CloudFront<a class="headerlink" href="#module-nctl.aws" title="Permalink to this heading"></a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="nctl.aws.CloudFront">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">nctl.aws.</span></span><span class="sig-name descname"><span class="pre">CloudFront</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">env_dump</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nctl.aws.CloudFront" title="Permalink to this definition"></a></dt>
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">nctl.aws.</span></span><span class="sig-name descname"><span class="pre">CloudFront</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">env_dump</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#nctl.aws.CloudFront" title="Permalink to this definition"></a></dt>
<dd><p>Initiates CloudFront object to get and update a cloudfront distribution.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">CloudFront</span>
</pre></div>
Expand Down Expand Up @@ -138,11 +138,14 @@ <h1>Welcome to NCTL’s documentation!<a class="headerlink" href="#welcome-to-nc

<dl class="py method">
<dt class="sig sig-object py" id="nctl.aws.CloudFront.update_distribution">
<span class="sig-name descname"><span class="pre">update_distribution</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">current_config</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">origin_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#nctl.aws.CloudFront.update_distribution" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">update_distribution</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">current_config</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">origin_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#nctl.aws.CloudFront.update_distribution" title="Permalink to this definition"></a></dt>
<dd><p>Updates the origin host of a cloudfront distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>origin_name</strong> – Origin name that has to be replaced with.</p>
<dd class="field-odd"><ul class="simple">
<li><p><strong>current_config</strong> – Current configuration as in CloudFront.</p></li>
<li><p><strong>origin_name</strong> – Origin name that has to be replaced with.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
Expand All @@ -160,11 +163,11 @@ <h1>Welcome to NCTL’s documentation!<a class="headerlink" href="#welcome-to-nc

<dl class="py method">
<dt class="sig sig-object py" id="nctl.aws.CloudFront.store_config">
<span class="sig-name descname"><span class="pre">store_config</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">configuration</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#nctl.aws.CloudFront.store_config" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">store_config</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">configuration</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#nctl.aws.CloudFront.store_config" title="Permalink to this definition"></a></dt>
<dd><p>Stores the cloudfront distribution config in a YAML file locally.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>last_response</strong>Last known response from AWS.</p>
<dd class="field-odd"><p><strong>configuration</strong>CloudFront distribution configuration.</p>
</dd>
</dl>
</dd></dl>
Expand Down Expand Up @@ -198,7 +201,7 @@ <h1>Logger<a class="headerlink" href="#logger" title="Permalink to this heading"

<dl class="py attribute">
<dt class="sig sig-object py" id="nctl.logger.LogConfig.log_config">
<span class="sig-name descname"><span class="pre">log_config</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Path</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#nctl.logger.LogConfig.log_config" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">log_config</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Path</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#nctl.logger.LogConfig.log_config" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py class">
Expand Down Expand Up @@ -352,7 +355,7 @@ <h1>Models<a class="headerlink" href="#models" title="Permalink to this heading"

<dl class="py attribute">
<dt class="sig sig-object py" id="nctl.models.EnvConfig.log_config">
<span class="sig-name descname"><span class="pre">log_config</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Path</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#nctl.models.EnvConfig.log_config" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">log_config</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Path</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#nctl.models.EnvConfig.log_config" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
Expand Down
Loading

0 comments on commit 12c03fd

Please sign in to comment.