Skip to content

Commit

Permalink
deploy: f68cf7f
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelCurrin committed Dec 15, 2023
1 parent c8eb7dc commit 0991030
Show file tree
Hide file tree
Showing 18 changed files with 190 additions and 167 deletions.
2 changes: 1 addition & 1 deletion assets/main.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cheatsheets/go/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/go/code/">
Expand Down Expand Up @@ -318,8 +319,6 @@ <h2>Topics</h2>





<a href="/dev-cheatsheets/cheatsheets/go/commands/">
<div>

Expand Down Expand Up @@ -869,6 +868,7 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/go/manage-packages/">
Expand Down
2 changes: 1 addition & 1 deletion cheatsheets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,6 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/python/">
Expand Down Expand Up @@ -1150,6 +1149,7 @@ <h2>Topics</h2>




<a href="/dev-cheatsheets/cheatsheets/rust/">
<div>

Expand Down
4 changes: 2 additions & 2 deletions cheatsheets/javascript/deno/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/javascript/deno/cli/">
Expand Down Expand Up @@ -814,8 +815,6 @@ <h2>Topics</h2>








Expand Down Expand Up @@ -880,6 +879,7 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/javascript/deno/package-list/">
Expand Down
2 changes: 1 addition & 1 deletion cheatsheets/javascript/general/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/javascript/general/modules/">
Expand Down Expand Up @@ -961,7 +962,6 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/javascript/general/promises/">
Expand Down
4 changes: 2 additions & 2 deletions cheatsheets/jekyll/cli/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ <h2>Topics</h2>








Expand Down Expand Up @@ -1410,8 +1412,6 @@ <h2>Topics</h2>








Expand Down
4 changes: 2 additions & 2 deletions cheatsheets/jekyll/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ <h2>Topics</h2>








Expand Down Expand Up @@ -299,8 +301,6 @@ <h2>Topics</h2>








Expand Down
2 changes: 1 addition & 1 deletion cheatsheets/other/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/other/cli/">
Expand Down Expand Up @@ -955,6 +954,7 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/other/regex/">
Expand Down
2 changes: 1 addition & 1 deletion cheatsheets/package-managers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,7 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/package-managers/python/">
Expand Down Expand Up @@ -1447,7 +1448,6 @@ <h2>Topics</h2>






</div>
Expand Down
2 changes: 1 addition & 1 deletion cheatsheets/package-managers/javascript/npm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/package-managers/javascript/npm/commands/">
Expand Down Expand Up @@ -1423,7 +1424,6 @@ <h2>Topics</h2>






</div>
Expand Down
2 changes: 1 addition & 1 deletion cheatsheets/python/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ <h2>Topics</h2>




<a href="/dev-cheatsheets/cheatsheets/python/linting/">
<div>

Expand Down Expand Up @@ -964,7 +965,6 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/python/project-administration/">
Expand Down
2 changes: 1 addition & 1 deletion cheatsheets/python/project-administration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/python/project-administration/linting/">
Expand Down Expand Up @@ -1408,6 +1407,7 @@ <h2>Topics</h2>






</div>
Expand Down
13 changes: 12 additions & 1 deletion cheatsheets/python/type-checks/data-structures/dictionary.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ <h2 id="benefits">Benefits</h2>
<li>Fields are only null when allowed to be.</li>
</ul>

<h2 id="using-plain-dict">Using plain Dict</h2>
<h2 id="use-a-plain-dict">Use a plain dict</h2>

<p>Here we create a type using a dictionary.</p>

Expand Down Expand Up @@ -264,6 +264,17 @@ <h3 id="ways-to-use-the-type">Ways to use the type</h3>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">Movie</span> <span class="o">=</span> <span class="nc">TypedDict</span><span class="p">(</span><span class="sh">'</span><span class="s">Movie</span><span class="sh">'</span><span class="p">,</span> <span class="p">{</span><span class="sh">'</span><span class="s">name</span><span class="sh">'</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="sh">'</span><span class="s">year</span><span class="sh">'</span><span class="p">:</span> <span class="nb">int</span><span class="p">})</span>
</code></pre></div></div>

<p>A nested example:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">FooBar</span> <span class="o">=</span> <span class="nc">TypedDict</span><span class="p">(</span>
<span class="sh">"</span><span class="s">FooBar</span><span class="sh">"</span><span class="p">,</span>
<span class="p">{</span>
<span class="sh">"</span><span class="s">Id</span><span class="sh">"</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="sh">"</span><span class="s">Status</span><span class="sh">"</span><span class="p">:</span> <span class="nc">TypedDict</span><span class="p">(</span><span class="sh">"</span><span class="s">Status</span><span class="sh">"</span><span class="p">,</span> <span class="p">{</span><span class="sh">"</span><span class="s">Id</span><span class="sh">"</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span> <span class="sh">"</span><span class="s">Name</span><span class="sh">"</span><span class="p">:</span> <span class="nb">str</span><span class="p">}),</span>
<span class="p">},</span>
<span class="p">)</span>
</code></pre></div></div>

<p>The 4 approaches are:</p>

<h4 id="annotation">Annotation</h4>
Expand Down
14 changes: 13 additions & 1 deletion cheatsheets/python/type-checks/data-structures/dictionary.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ So you can validate that a dictionary passed around meets the following:
- Fields are only null when allowed to be.


## Using plain Dict
## Use a plain dict

Here we create a type using a dictionary.

Expand Down Expand Up @@ -99,6 +99,18 @@ Here are using a `Movie` type, defined as follows:
Movie = TypedDict('Movie', {'name': str, 'year': int})
```

A nested example:

```python
FooBar = TypedDict(
"FooBar",
{
"Id": str,
"Status": TypedDict("Status", {"Id": int, "Name": str}),
},
)
```

The 4 approaches are:

#### Annotation
Expand Down
4 changes: 2 additions & 2 deletions cheatsheets/shell/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,6 @@ <h2>Topics</h2>








Expand Down Expand Up @@ -343,6 +341,8 @@ <h2>Topics</h2>








Expand Down
4 changes: 2 additions & 2 deletions cheatsheets/terraform/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ <h2>Topics</h2>








Expand Down Expand Up @@ -300,6 +298,7 @@ <h2>Topics</h2>






<a href="/dev-cheatsheets/cheatsheets/terraform/code/">
Expand Down Expand Up @@ -1409,6 +1408,7 @@ <h2>Topics</h2>






</div>
Expand Down
2 changes: 1 addition & 1 deletion feed.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.2">Jekyll</generator><link href="https://michaelcurrin.github.io/dev-cheatsheets/feed.xml" rel="self" type="application/atom+xml" /><link href="https://michaelcurrin.github.io/dev-cheatsheets/" rel="alternate" type="text/html" /><updated>2023-12-10T16:40:27+00:00</updated><id>https://michaelcurrin.github.io/dev-cheatsheets/feed.xml</id><title type="html">Dev Cheatsheets</title><subtitle>A collection of code snippets and CLI guides for quick and easy reference while coding</subtitle><author><name>Michael Currin</name></author></feed>
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.2">Jekyll</generator><link href="https://michaelcurrin.github.io/dev-cheatsheets/feed.xml" rel="self" type="application/atom+xml" /><link href="https://michaelcurrin.github.io/dev-cheatsheets/" rel="alternate" type="text/html" /><updated>2023-12-15T15:34:11+00:00</updated><id>https://michaelcurrin.github.io/dev-cheatsheets/feed.xml</id><title type="html">Dev Cheatsheets</title><subtitle>A collection of code snippets and CLI guides for quick and easy reference while coding</subtitle><author><name>Michael Currin</name></author></feed>
Loading

0 comments on commit 0991030

Please sign in to comment.