Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Sep 6, 2024
1 parent 9150280 commit 03c2cef
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/gasbuddy/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@
cash=True,
icon="mdi:gas-station",
suggested_display_precision=2,
),
),
}
3 changes: 2 additions & 1 deletion custom_components/gasbuddy/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

from homeassistant.components.sensor import SensorEntityDescription


@dataclass
class GasBuddySensorEntityDescription(SensorEntityDescription):
"""Class describing OpenEVSE select entities."""

cash: bool | None = None
cash: bool | None = None
50 changes: 50 additions & 0 deletions pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[MASTER]
ignore=tests
# Use a conservative default here; 2 should speed up most setups and not hurt
# any too bad. Override on command line as appropriate.
jobs=2
persistent=no

[BASIC]
good-names=id,i,j,k,ex,Run,_,fp
max-attributes=15
argument-naming-style=snake_case
attr-naming-style=snake_case

[MESSAGES CONTROL]
# Reasons disabled:
# locally-disabled - it spams too much
# too-many-* - are not enforced for the sake of readability
# too-few-* - same as too-many-*
# import-outside-toplevel - TODO
disable=
duplicate-code,
fixme,
import-outside-toplevel,
locally-disabled,
too-few-public-methods,
too-many-arguments,
too-many-public-methods,
too-many-instance-attributes,
too-many-branches,
too-many-statements,
broad-except,
too-many-lines,
too-many-locals,
unexpected-keyword-arg,
abstract-method,

[REFACTORING]

# Maximum number of nested blocks for function / method body
max-nested-blocks=8

[REPORTS]
score=no

[TYPECHECK]
# For attrs
ignored-classes=_CountingAttr

[FORMAT]
expected-line-ending-format=LF
2 changes: 1 addition & 1 deletion tests/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def test_sensors(hass, mock_gasbuddy):
assert state.state == "3.45"
state = hass.states.get("sensor.gas_station_premium_gas_cash")
assert state
assert state.state == "3.35"
assert state.state == "3.35"


async def test_sensors_no_uom(hass, mock_gasbuddy):
Expand Down

0 comments on commit 03c2cef

Please sign in to comment.