Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/fix: Add Ruff and Pre-commit Configuration, Resolve Undefined Name #158

Merged
merged 19 commits into from
Mar 8, 2024
Merged

feat/fix: Add Ruff and Pre-commit Configuration, Resolve Undefined Name #158

merged 19 commits into from
Mar 8, 2024

Conversation

Pastucha
Copy link
Contributor

@Pastucha Pastucha commented Mar 6, 2024

Changes made:

1. Resolved Undefined Name issue in binary_sensor module:
    Fixed bug related to undefined object 'Box' in binary_sensor modules.
    Fixes to allow correct use of 'Box' in appropriate places.

2. Updated requirements_tests.txt file:
    Added Ruff and Pre-commit versions to requirements_tests.txt file.

3 .Updated workflow ci-test.yml:
    Added steps to workflow ci-test.yml, which include:
        Upgrading the actions/checkout action version to v4.
        Adding chartboost/ruff-action@v1 to checkout and format code using Ruff.

4. Adding a .pre-commit-config.yaml file:
    Created a new .pre-commit-config.yaml configuration file.
    Added configuration for pre-commit-hooks, black and astral-sh/ruff-pre-commit.
    Specified specific versions of pre-commit-hooks, black and Ruff to ensure consistency of tools.

5. Removing files from a badly spooled commit.

Pastucha and others added 13 commits March 6, 2024 11:39
Enables automatic code quality checks for new MRs in blebox_uniapi.

Added a code quality gateway, initially using tools such as Ruff in checkout and formatting mode. Combined this with pre-commit configuration, allowing changes to be automatically applied when committing via git. Also updated the workflow in GitHub Actions to run these verification tools during automated testing.
@Pastucha Pastucha requested a review from swistakm March 6, 2024 13:00
.ruffrc Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Show resolved Hide resolved
blebox_uniapi/binary_sensor.py Outdated Show resolved Hide resolved
Pastucha and others added 3 commits March 7, 2024 11:56
Remove unnecessary .ruffrc, skip the use of black, fixing binary_sensor.py with using TYPE_CHECKING insteed of pass the whole class.
@Pastucha Pastucha requested a review from swistakm March 7, 2024 13:04
@swistakm swistakm merged commit 15b755c into blebox:master Mar 8, 2024
2 checks passed
@swistakm
Copy link
Contributor

Released in new library version (2.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants