mirror of
https://github.com/ludeeus/integration_blueprint.git
synced 2024-03-28 09:28:48 +00:00
7a11f7b083
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=" |
||
---|---|---|
.github | ||
.vscode | ||
config | ||
custom_components/integration_blueprint | ||
scripts | ||
.devcontainer.json | ||
.gitattributes | ||
.gitignore | ||
.ruff.toml | ||
CONTRIBUTING.md | ||
hacs.json | ||
LICENSE | ||
README.md | ||
README_EXAMPLE.md | ||
requirements.txt |
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?
- Create a new repository in GitHub, using this repository as a template by clicking the "Use this template" button in the GitHub UI.
- Open your new repository in Visual Studio Code devcontainer (Preferably with the "
Dev Containers: Clone Repository in Named Container Volume...
" option). - Rename all instances of the
integration_blueprint
tocustom_components/<your_integration_domain>
(e.g.custom_components/awesome_integration
). - Rename all instances of the
Integration Blueprint
to<Your Integration Name>
(e.g.Awesome Integration
). - 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:
- Add tests to your integration,
pytest-homeassistant-custom-component
can help you get started. - Add brand images (logo/icon) to https://github.com/home-assistant/brands.
- Create your first release.
- Share your integration on the Home Assistant Forum.
- Submit your integration to the HACS.