Skip to content

Commit

Permalink
Merge pull request #554 from jwillemsen/jwi-precommit
Browse files Browse the repository at this point in the history
Removed reorder-python-imports, it conflicts with black, see https://…
  • Loading branch information
CJNE authored Aug 18, 2024
2 parents 4ee043a + 2c3576f commit 19e37a9
Show file tree
Hide file tree
Showing 22 changed files with 19 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ pip==24.0
pre-commit==3.6.2
black==24.2.0
flake8==7.0.0
reorder-python-imports==3.12.0
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install Python modules
run: |
pip install --constraint=.github/workflows/constraints.txt pre-commit black flake8 reorder-python-imports
pip install --constraint=.github/workflows/constraints.txt pre-commit black flake8
- name: Run pre-commit on all files
run: |
Expand Down
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ repos:
language: system
types: [python]
require_serial: true
- id: reorder-python-imports
name: Reorder python imports
entry: reorder-python-imports
language: system
types: [python]
args: [--application-directories=custom_components]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions custom_components/myenergi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
For more details about this integration, please refer to
https://github.com/cjne/myenergi
"""

import asyncio
import logging
from datetime import timedelta
Expand Down
1 change: 1 addition & 0 deletions custom_components/myenergi/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sensor platform for myenergi."""

import operator

from homeassistant.components.binary_sensor import BinarySensorEntity
Expand Down
1 change: 1 addition & 0 deletions custom_components/myenergi/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Adds config flow for myenergi."""

import logging
import traceback

Expand Down
1 change: 1 addition & 0 deletions custom_components/myenergi/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constants for myenergi."""

# Base component constants
NAME = "myenergi"
DOMAIN = "myenergi"
Expand Down
1 change: 1 addition & 0 deletions custom_components/myenergi/diagnostics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Diagnostics support for Daikin Diagnostics."""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions custom_components/myenergi/entity.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""MyenergiEntity class"""

import logging

from homeassistant.helpers.entity import EntityCategory
Expand Down
1 change: 1 addition & 0 deletions custom_components/myenergi/number.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sensor platform for myenergi."""

from homeassistant.components.number import NumberEntity
from homeassistant.helpers.entity import EntityCategory

Expand Down
1 change: 1 addition & 0 deletions custom_components/myenergi/select.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sensor platform for myenergi."""

import voluptuous as vol
from homeassistant.components.select import SelectEntity
from homeassistant.helpers import entity_platform
Expand Down
1 change: 1 addition & 0 deletions custom_components/myenergi/sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sensor platform for myenergi."""

import operator

from homeassistant.components.sensor import SensorDeviceClass
Expand Down
1 change: 0 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pre-commit==3.6.2
black==24.2.0
flake8==7.0.0
reorder-python-imports==3.12.0
homeassistant
pymyenergi
pytest
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for myenergi integration."""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Global fixtures for myenergi integration."""

from typing import Any
from unittest.mock import patch

Expand Down
1 change: 1 addition & 0 deletions tests/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constants for myenergi tests."""

from custom_components.myenergi.const import (
CONF_PASSWORD,
)
Expand Down
1 change: 1 addition & 0 deletions tests/test_config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test myenergi config flow."""

from unittest.mock import patch

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test myenergi setup process."""

import pytest
from custom_components.myenergi import (
async_reload_entry,
Expand Down
1 change: 1 addition & 0 deletions tests/test_number.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test myenergi sensor."""

from unittest.mock import MagicMock

from homeassistant.components.number import DOMAIN as NUMBER_DOMAIN
Expand Down
1 change: 1 addition & 0 deletions tests/test_select.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test myenergi sensor."""

from unittest.mock import MagicMock

from homeassistant.components.select import DOMAIN as SELECT_DOMAIN
Expand Down
1 change: 1 addition & 0 deletions tests/test_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test myenergi sensor."""

from homeassistant.core import HomeAssistant

from . import setup_mock_myenergi_config_entry
Expand Down
1 change: 1 addition & 0 deletions tests/test_services.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test myenergi sensor."""

from unittest.mock import MagicMock

from homeassistant.const import ATTR_ENTITY_ID
Expand Down

0 comments on commit 19e37a9

Please sign in to comment.