Skip to content

Commit

Permalink
Deployed 93860be to development with MkDocs 1.6.1 and mike 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Jan 10, 2025
1 parent 7302857 commit 849f626
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 45 deletions.
55 changes: 44 additions & 11 deletions development/changelog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<div data-md-component="skip">


<a href="#0182-2025-01-02" class="md-skip">
<a href="#exec-1--upcomming-changes" class="md-skip">
Skip to content
</a>

Expand Down Expand Up @@ -843,18 +843,27 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#changed" class="md-nav__link">
<a href="#exec-1--fixed" class="md-nav__link">
<span class="md-ellipsis">
Changed
Fixed
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#fixed" class="md-nav__link">
<a href="#exec-1--added" class="md-nav__link">
<span class="md-ellipsis">
Fixed
Added
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#exec-1--changed" class="md-nav__link">
<span class="md-ellipsis">
Changed
</span>
</a>

Expand Down Expand Up @@ -895,18 +904,27 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#changed" class="md-nav__link">
<a href="#exec-1--fixed" class="md-nav__link">
<span class="md-ellipsis">
Changed
Fixed
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#fixed" class="md-nav__link">
<a href="#exec-1--added" class="md-nav__link">
<span class="md-ellipsis">
Fixed
Added
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#exec-1--changed" class="md-nav__link">
<span class="md-ellipsis">
Changed
</span>
</a>

Expand All @@ -930,6 +948,21 @@



<p><h1 id="exec-1--upcomming-changes">upcomming changes<a class="headerlink" href="#exec-1--upcomming-changes" title="Permanent link">&para;</a></h1>
<h2 id="exec-1--fixed">Fixed<a class="headerlink" href="#exec-1--fixed" title="Permanent link">&para;</a></h2>
<ul>
<li>Load default config values even if <code>[tool.inline-snapshot]</code> is missing.
This makes the documented default shortcuts <code>--review</code> and <code>--fix</code> work.</li>
</ul>
<h2 id="exec-1--added">Added<a class="headerlink" href="#exec-1--added" title="Permanent link">&para;</a></h2>
<ul>
<li>You can now specify which tool you want to use to format your code by setting a <code>format-command</code> in your <a href="https://15r10nk.github.io/inline-snapshot/latest/configuration/#format-command">configuration</a>.</li>
</ul>
<h2 id="exec-1--changed">Changed<a class="headerlink" href="#exec-1--changed" title="Permanent link">&para;</a></h2>
<ul>
<li><strong>BREAKING-CHANGE</strong> you have to install <code>inline-snapshot[black]</code> now if you want to format your code like in the previous versions. This option is not required if you use a <code>format-command</code>.</li>
</ul>
</p>
<p><a id='changelog-0.18.2'></a></p>
<h1 id="0182-2025-01-02">0.18.2 — 2025-01-02<a class="headerlink" href="#0182-2025-01-02" title="Permanent link">&para;</a></h1>
<h2 id="changed">Changed<a class="headerlink" href="#changed" title="Permanent link">&para;</a></h2>
Expand All @@ -938,7 +971,7 @@ <h2 id="changed">Changed<a class="headerlink" href="#changed" title="Permanent l
</ul>
<h2 id="fixed">Fixed<a class="headerlink" href="#fixed" title="Permanent link">&para;</a></h2>
<ul>
<li>use '.model_fields' on pydantic model class and not instance. This fixes a deprecation warning in the upcomming pydantic v2.11 (#169)</li>
<li>use '.model_fields' on pydantic model class and not instance. This fixes a deprecation warning in the upcoming pydantic v2.11 (#169)</li>
</ul>
<p><a id='changelog-0.18.1'></a></p>
<h1 id="0181-2024-12-22">0.18.1 — 2024-12-22<a class="headerlink" href="#0181-2024-12-22" title="Permanent link">&para;</a></h1>
Expand Down Expand Up @@ -1252,7 +1285,7 @@ <h3 id="feat_7">Feat<a class="headerlink" href="#feat_7" title="Permanent link">
<h2 id="v052-2023-11-13">v0.5.2 (2023-11-13)<a class="headerlink" href="#v052-2023-11-13" title="Permanent link">&para;</a></h2>
<h3 id="fix_9">Fix<a class="headerlink" href="#fix_9" title="Permanent link">&para;</a></h3>
<ul>
<li>remove upper bound from dependencies in pyproject.toml</li>
<li>remove upper bound from dependency in pyproject.toml</li>
</ul>
<h2 id="v051-2023-10-20">v0.5.1 (2023-10-20)<a class="headerlink" href="#v051-2023-10-20" title="Permanent link">&para;</a></h2>
<h3 id="fix_10">Fix<a class="headerlink" href="#fix_10" title="Permanent link">&para;</a></h3>
Expand Down
20 changes: 18 additions & 2 deletions development/code_generation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -954,10 +954,20 @@ <h1>Code generation</h1>
</div>
</li>
<li>
<p>The code is formatted with black.</p>
<p>The new code fragments are formatted with black if it is installed.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Black is an optional dependency since inline-snapshot v0.19.0.
You can install it with:
<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>pip<span class="w"> </span>install<span class="w"> </span>inline-snapshot<span class="o">[</span>black<span class="o">]</span>
</code></pre></div></p>
</div>
</li>
<li>
<p>The whole file is formatted with black if it was formatted before.</p>
<p>The whole file is formatted</p>
<ul>
<li>
<p>with black if it was formatted with black before.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The black formatting of the whole file could not work for the following reasons:</p>
Expand All @@ -966,9 +976,15 @@ <h1>Code generation</h1>
<strong>Solution:</strong> configure black in a <a href="https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file">configuration file</a></li>
<li>inline-snapshot uses a different black version.<br>
<strong>Solution:</strong> specify which black version inline-snapshot should use by adding black with a specific version to your dependencies.</li>
<li>black is not installed. Black is an optional dependency since inline-snapshot v0.19.0</li>
</ol>
</div>
</li>
<li>
<p>or with the <a class="autorefs autorefs-internal" href="../configuration/#format-command">format-command</a> if you defined one.</p>
</li>
</ul>
</li>
</ol>


Expand Down
20 changes: 16 additions & 4 deletions development/configuration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -855,10 +855,11 @@ <h1>Configuration</h1>
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="k">[tool.inline-snapshot]</span>
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="n">hash-length</span><span class="o">=</span><span class="mi">15</span>
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="n">default-flags</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;short-report&quot;</span><span class="p">]</span>
<a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a>
<a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="k">[tool.inline-snapshot.shortcuts]</span>
<a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="n">review</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;review&quot;</span><span class="p">]</span>
<a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a><span class="n">fix</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;create&quot;</span><span class="p">,</span><span class="s2">&quot;fix&quot;</span><span class="p">]</span>
<a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="n">format-command</span><span class="o">=</span><span class="s2">&quot;&quot;</span>
<a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a>
<a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="k">[tool.inline-snapshot.shortcuts]</span>
<a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a><span class="n">review</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;review&quot;</span><span class="p">]</span>
<a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a><span class="n">fix</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;create&quot;</span><span class="p">,</span><span class="s2">&quot;fix&quot;</span><span class="p">]</span>
</code></pre></div>
<ul>
<li><strong>hash-length:</strong> specifies the length of the hash used by <code>external()</code> in the code representation.
Expand All @@ -878,6 +879,17 @@ <h1>Configuration</h1>
where <code>&lt;pytest_config_dir&gt;</code> is replaced by the directory containing the Pytest configuration file, if any.
External snapshots will be stored in the <code>external</code> subfolder of the storage directory.</p>
</li>
<li>
<p><strong>format-command:<a href="" id="format-command"></a></strong> allows you to specify a custom command which is used to format the python code after code is changed.
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="k">[tool.inline-snapshot]</span>
<a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="n">format-command</span><span class="o">=</span><span class="s2">&quot;ruff format --stdin-filename {filename}&quot;</span>
</code></pre></div>
The placeholder <code>{filename}</code> can be used to specify the filename if it is needed to find the correct formatting options for this file.</p>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>The command should <strong>not</strong> format the file on disk. The current file content (with the new code changes) is passed to <em>stdin</em> and the formatted content should be written to <em>stdout</em>.</p>
</div>
</li>
</ul>


Expand Down
Loading

0 comments on commit 849f626

Please sign in to comment.