Go to file
dependabot[bot] 7a11f7b083
Bump ruff from 0.0.267 to 0.0.292 (#139)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.267 to 0.0.292.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>v0.0.292</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Highlights</h3>
<p><strong>This release includes full support for Python 3.12 (<a
href="https://www.python.org/downloads/release/python-3120/">out
now!</a>), including the new type parameter (<a
href="https://peps.python.org/pep-0695/">PEP 695</a>) and f-string
syntaxes (<a href="https://peps.python.org/pep-0701/">PEP
701</a>).</strong></p>
<p>PEP 701 lifts many of the restrictions on f-strings that existed in
the past, allowing for arbitrarily nested f-strings, consistent quote
style within f-strings, and more, all of which are now supported by Ruff
(thanks to <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/7376">astral-sh/ruff#7376</a>).</p>
<h3>Breaking Changes</h3>
<ul>
<li>In the formatter, <code>format.quote-style</code> no longer affects
triple-quoted strings, to align with common conventions as well as the
guidance from PEP 8 and PEP 257 (see: <a
href="https://redirect.github.com/astral-sh/ruff/pull/7680">astral-sh/ruff#7680</a>).</li>
<li><code>line-too-long</code> (<code>E501</code>) now ignores trailing
pragma comments (like <code># type: ignore</code> and <code>#
noqa</code>) when computing line length (see: <a
href="https://redirect.github.com/astral-sh/ruff/pull/7692">astral-sh/ruff#7692</a>).
This is similar to flake8-bugbear's methodology for detecting overlong
lines, and ensures that adding pragmas like <code># noqa</code> does not
introduce further lint errors.</li>
</ul>
<h3>Rules</h3>
<ul>
<li>[<code>refurb</code>] Implement <code>print-empty-string</code>
(<code>FURB105</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7617">astral-sh/ruff#7617</a></li>
<li>[<code>flake8-bandit</code>] Implement
<code>weak-cryptographic-key</code> (<code>S505</code>) by <a
href="https://github.com/mkniewallner"><code>@​mkniewallner</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7703">astral-sh/ruff#7703</a></li>
<li>[<code>refurb</code>] Implement <code>implicit-cwd</code>
(<code>FURB177</code>) by <a
href="https://github.com/danparizher"><code>@​danparizher</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/7704">astral-sh/ruff#7704</a></li>
<li><code>unnecessary-pass</code> (<code>PIE790</code>) now flags all
unnecessary <code>pass</code> statements; previously, the rule only
flagged <code>pass</code> statements that followed a docstring in a
two-statement body (see: <a
href="https://redirect.github.com/astral-sh/ruff/pull/7697">astral-sh/ruff#7697</a>).</li>
</ul>
<h3>Settings</h3>
<ul>
<li>Add <code>lint</code> section to Ruff configuration by <a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/7549">astral-sh/ruff#7549</a></li>
<li>Add <code>explicit-preview-rules</code> to toggle explicit selection
of preview rules by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7390">astral-sh/ruff#7390</a></li>
<li>Decrease PEP 593 error to a debug warning by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7745">astral-sh/ruff#7745</a></li>
<li>Write full Jupyter notebook to <code>stdout</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7748">astral-sh/ruff#7748</a></li>
<li>Extend <code>unnecessary-pass</code> (<code>PIE790</code>) to
trigger on all unnecessary <code>pass</code> statements by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7697">astral-sh/ruff#7697</a></li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Ignore blank lines between comments when counting
newlines-after-imports by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7607">astral-sh/ruff#7607</a></li>
<li>Avoid reordering mixed-indent-level comments after branches by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7609">astral-sh/ruff#7609</a></li>
<li>Avoid flagging B009 and B010 on starred expressions by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7621">astral-sh/ruff#7621</a></li>
<li>Use deletion for D215 full-line removals by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7625">astral-sh/ruff#7625</a></li>
<li>Avoid searching for bracketed comments in unparenthesized generators
by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7627">astral-sh/ruff#7627</a></li>
<li>Update return type for <code>PT022</code> autofix by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/7613">astral-sh/ruff#7613</a></li>
<li>Flag FURB105 with starred kwargs by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7630">astral-sh/ruff#7630</a></li>
<li>Don't suggest replacing <code>builtin.open()</code> with
<code>Path.open()</code> if the latter doesn't support all options by <a
href="https://github.com/konstin"><code>@​konstin</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7637">astral-sh/ruff#7637</a></li>
<li>Use 1-based cell indices consistently for Notebooks by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/7662">astral-sh/ruff#7662</a></li>
<li>Add <code>Expr::Name</code> checks to rules which use
<code>is_logger_candidate</code> by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7521">astral-sh/ruff#7521</a></li>
<li>Ensure that B006 autofixes are inserted after imports by <a
href="https://github.com/Hoxbro"><code>@​Hoxbro</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7629">astral-sh/ruff#7629</a></li>
<li>Allow named expressions in <code>__all__</code> assignments by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7673">astral-sh/ruff#7673</a></li>
<li>Include radix base prefix in large number representation by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7700">astral-sh/ruff#7700</a></li>
<li>Parenthesize multi-line attributes in B009 by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7701">astral-sh/ruff#7701</a></li>
<li>Insert necessary padding in B014 fixes by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7699">astral-sh/ruff#7699</a></li>
<li>fix(rules): improve S507 detection by <a
href="https://github.com/mkniewallner"><code>@​mkniewallner</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7661">astral-sh/ruff#7661</a></li>
<li>Ignore TODO tags in <code>commented-out-code</code> by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7523">astral-sh/ruff#7523</a></li>
<li>Track fix isolation in <code>unnecessary-pass</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7715">astral-sh/ruff#7715</a></li>
<li>Use fixed source code for parser context by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7717">astral-sh/ruff#7717</a></li>
<li>Preserve parentheses in <code>quadratic-list-summation</code> by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7719">astral-sh/ruff#7719</a></li>
<li>Compute <code>NotebookIndex</code> for <code>Diagnostics</code> on
stdin by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/7663">astral-sh/ruff#7663</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h1>Breaking Changes</h1>
<h2>0.0.288</h2>
<h3>Remove support for emoji identifiers (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7212">#7212</a>)</h3>
<p>Previously, Ruff supported the non-standard compliant emoji
identifiers e.g. <code>📦 = 1</code>.
We decided to remove this non-standard language extension, and Ruff now
reports syntax errors for emoji identifiers in your code, the same as
CPython.</p>
<h3>Improved GitLab fingerprints (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7203">#7203</a>)</h3>
<p>GitLab uses fingerprints to identify new, existing, or fixed
violations. Previously, Ruff included the violation's position in the
fingerprint. Using the location has the downside that changing any code
before the violation causes the fingerprint to change, resulting in
GitLab reporting one fixed and one new violation even though it is a
pre-existing violation.</p>
<p>Ruff now uses a more stable location-agnostic fingerprint to minimize
that existing violations incorrectly get marked as fixed and re-reported
as new violations.</p>
<p>Expect GitLab to report each pre-existing violation in your project
as fixed and a new violation in your Ruff upgrade PR.</p>
<h2>0.0.283 / 0.284</h2>
<h3>The target Python version now defaults to 3.8 instead of 3.10 (<a
href="https://redirect.github.com/astral-sh/ruff/pull/6397">#6397</a>)</h3>
<p>Previously, when a target Python version was not specified, Ruff
would use a default of Python 3.10. However, it is safer to default to
an <em>older</em> Python version to avoid assuming the availability of
new features. We now default to the oldest supported Python version
which is currently Python 3.8.</p>
<p>(We still support Python 3.7 but since <a
href="https://devguide.python.org/versions/#unsupported-versions">it has
reached EOL</a> we've decided not to make it the default here.)</p>
<p>Note this change was announced in 0.0.283 but not active until
0.0.284.</p>
<h2>0.0.277</h2>
<h3><code>.ipynb_checkpoints</code>, <code>.pyenv</code>,
<code>.pytest_cache</code>, and <code>.vscode</code> are now excluded by
default (<a
href="https://redirect.github.com/astral-sh/ruff/pull/5513">#5513</a>)</h3>
<p>Ruff maintains a list of default exclusions, which now consists of
the following patterns:</p>
<ul>
<li><code>.bzr</code></li>
<li><code>.direnv</code></li>
<li><code>.eggs</code></li>
<li><code>.git</code></li>
<li><code>.git-rewrite</code></li>
<li><code>.hg</code></li>
<li><code>.ipynb_checkpoints</code></li>
<li><code>.mypy_cache</code></li>
<li><code>.nox</code></li>
<li><code>.pants.d</code></li>
<li><code>.pyenv</code></li>
<li><code>.pytest_cache</code></li>
<li><code>.pytype</code></li>
<li><code>.ruff_cache</code></li>
<li><code>.svn</code></li>
<li><code>.tox</code></li>
<li><code>.venv</code></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c6d0bdd572"><code>c6d0bdd</code></a>
Bump Ruff version to v0.0.292 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7761">#7761</a>)</li>
<li><a
href="75f759ed55"><code>75f759e</code></a>
Upgrade LibCST to support Python 3.12 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7764">#7764</a>)</li>
<li><a
href="6b99f5e3e6"><code>6b99f5e</code></a>
Re-add formatter to GitHub release notes (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7763">#7763</a>)</li>
<li><a
href="97c092a102"><code>97c092a</code></a>
Add formatter TOML configuration to the README (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7762">#7762</a>)</li>
<li><a
href="bdf285225d"><code>bdf2852</code></a>
Enable formatting for Jupyter notebooks (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7749">#7749</a>)</li>
<li><a
href="0961f008b8"><code>0961f00</code></a>
Rename <code>FixKind</code> to <code>FixAvailability</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7658">#7658</a>)</li>
<li><a
href="ebdfcee87f"><code>ebdfcee</code></a>
Write full Jupyter notebook to <code>stdout</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7748">#7748</a>)</li>
<li><a
href="c71ff7eae1"><code>c71ff7e</code></a>
Avoid printing continuations within import identifiers (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7744">#7744</a>)</li>
<li><a
href="0df27375ba"><code>0df2737</code></a>
Bump memchr from 2.6.3 to 2.6.4 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7758">#7758</a>)</li>
<li><a
href="c82d0503a8"><code>c82d050</code></a>
Bump thiserror from 1.0.48 to 1.0.49 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7757">#7757</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.267...v0.0.292">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.0.267&new-version=0.0.292)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-08 17:38:50 +02:00
.github Bump actions/setup-python from 4.6.1 to 4.7.1 (#138) 2023-10-08 17:38:41 +02:00
.vscode Cleanup .vscode directory 2023-02-11 19:27:59 +00:00
config Use ./config for HA configuration (#102) 2023-04-22 11:36:44 +02:00
custom_components/integration_blueprint Add ruff (#88) 2023-03-01 22:01:37 +01:00
scripts Use ./config for HA configuration (#102) 2023-04-22 11:36:44 +02:00
.devcontainer.json Update .devcontainer.json: upgrade to python3.11 (#135) 2023-10-08 17:24:12 +02:00
.gitattributes Spring cleaning ☀️ (#23) 2020-04-17 19:42:59 +02:00
.gitignore Use ./config for HA configuration (#102) 2023-04-22 11:36:44 +02:00
.ruff.toml Add ruff (#88) 2023-03-01 22:01:37 +01:00
CONTRIBUTING.md Use ./config for HA configuration (#102) 2023-04-22 11:36:44 +02:00
hacs.json Update .devcontainer.json: upgrade to python3.11 (#135) 2023-10-08 17:24:12 +02:00
LICENSE Update year 2023-02-12 09:35:36 +00:00
README.md Fix path typo in README.md (#109) 2023-05-22 09:41:59 +02:00
README_EXAMPLE.md Remove my badge 2023-10-01 16:43:45 +00:00
requirements.txt Bump ruff from 0.0.267 to 0.0.292 (#139) 2023-10-08 17:38:50 +02:00

Notice

The component and platforms in this repository are not meant to be used by a user, but as a "blueprint" that custom component developers can build upon, to make more awesome stuff.

HAVE FUN! 😎

Why?

This is simple, by having custom_components look (README + structure) the same it is easier for developers to help each other and for users to start using them.

If you are a developer and you want to add things to this "blueprint" that you think more developers will have use for, please open a PR to add it :)

What?

This repository contains multiple files, here is a overview:

File Purpose  Documentation
.devcontainer.json Used for development/testing with Visual Studio Code. Documentation
.github/ISSUE_TEMPLATE/*.yml Templates for the issue tracker Documentation
.vscode/tasks.json Tasks for the devcontainer. Documentation
custom_components/integration_blueprint/* Integration files, this is where everything happens. Documentation
CONTRIBUTING.md Guidelines on how to contribute. Documentation
LICENSE The license file for the project. Documentation
README.md The file you are reading now, should contain info about the integration, installation and configuration instructions. Documentation
requirements.txt Python packages used for development/lint/testing this integration. Documentation

How?

  1. Create a new repository in GitHub, using this repository as a template by clicking the "Use this template" button in the GitHub UI.
  2. Open your new repository in Visual Studio Code devcontainer (Preferably with the "Dev Containers: Clone Repository in Named Container Volume..." option).
  3. Rename all instances of the integration_blueprint to custom_components/<your_integration_domain> (e.g. custom_components/awesome_integration).
  4. Rename all instances of the Integration Blueprint to <Your Integration Name> (e.g. Awesome Integration).
  5. Run the scripts/develop to start HA and test out your new integration.

Next steps

These are some next steps you may want to look into: