mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 22:48:10 +01:00
Bump black from 22.12.0 to 23.1.0 (#4375)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
045489e6d7
commit
b7ab00b699
11 changed files with 3 additions and 11 deletions
|
@ -3,7 +3,7 @@
|
|||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: 22.12.0
|
||||
rev: 23.1.0
|
||||
hooks:
|
||||
- id: black
|
||||
args:
|
||||
|
|
|
@ -80,7 +80,7 @@ async def to_code(config):
|
|||
|
||||
cg.add(var.set_address(config[CONF_MAC_ADDRESS].as_hex))
|
||||
|
||||
for (config_key, setter) in [
|
||||
for config_key, setter in [
|
||||
(CONF_TEMPERATURE, var.set_temperature),
|
||||
(CONF_HUMIDITY, var.set_humidity),
|
||||
(CONF_BATTERY_VOLTAGE, var.set_battery_voltage),
|
||||
|
|
|
@ -240,7 +240,6 @@ async def to_code(config):
|
|||
|
||||
# Called by writer.py
|
||||
def copy_files():
|
||||
|
||||
dir = os.path.dirname(__file__)
|
||||
post_build_file = os.path.join(dir, "post_build.py.script")
|
||||
copy_file_if_changed(
|
||||
|
|
|
@ -52,7 +52,6 @@ CONFIG_SCHEMA = (
|
|||
|
||||
|
||||
async def to_code(config):
|
||||
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await cg.register_component(var, config)
|
||||
await spi.register_spi_device(var, config)
|
||||
|
|
|
@ -92,7 +92,6 @@ CONFIG_SWITCH_COMPONENT_SCHEMA = CONFIG_SENSOR_COMPONENT_SCHEMA.extend(
|
|||
|
||||
|
||||
async def setup_component_core_(var, config, arg):
|
||||
|
||||
if CONF_VARIABLE_NAME in config:
|
||||
cg.add(var.set_variable_name(config[CONF_VARIABLE_NAME]))
|
||||
elif CONF_COMPONENT_NAME in config:
|
||||
|
|
|
@ -69,7 +69,6 @@ CONFIG_SCHEMA = cv.All(
|
|||
|
||||
|
||||
async def to_code(config):
|
||||
|
||||
hub = await cg.get_variable(config[CONF_NEXTION_ID])
|
||||
var = cg.new_Pvariable(config[CONF_ID], hub)
|
||||
await cg.register_component(var, config)
|
||||
|
|
|
@ -122,7 +122,6 @@ async def to_code(config):
|
|||
cg.add(var.set_standard_units(config[CONF_STANDARD_UNITS]))
|
||||
|
||||
for key, funcName in TYPES.items():
|
||||
|
||||
if key in config:
|
||||
sens = await sensor.new_sensor(config[key])
|
||||
cg.add(getattr(var, funcName)(sens))
|
||||
|
|
|
@ -62,7 +62,6 @@ def assign_declare_id(value):
|
|||
|
||||
|
||||
def parameters_to_template(args):
|
||||
|
||||
template_args = []
|
||||
func_args = []
|
||||
script_arg_names = []
|
||||
|
|
|
@ -98,7 +98,6 @@ async def to_code(config):
|
|||
cg.add(var.set_heater_duty_value(config[CONF_HEATER_MAX_DUTY]))
|
||||
|
||||
for key, funcName in TYPES.items():
|
||||
|
||||
if key in config:
|
||||
sens = await sensor.new_sensor(config[key])
|
||||
cg.add(getattr(var, funcName)(sens))
|
||||
|
|
|
@ -977,7 +977,6 @@ class LogoutHandler(BaseHandler):
|
|||
class SecretKeysRequestHandler(BaseHandler):
|
||||
@authenticated
|
||||
def get(self):
|
||||
|
||||
filename = None
|
||||
|
||||
for secret_filename in const.SECRETS_FILES:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
pylint==2.15.10
|
||||
flake8==6.0.0 # also change in .pre-commit-config.yaml when updating
|
||||
black==22.12.0 # also change in .pre-commit-config.yaml when updating
|
||||
black==23.1.0 # also change in .pre-commit-config.yaml when updating
|
||||
pyupgrade==3.3.1 # also change in .pre-commit-config.yaml when updating
|
||||
pre-commit
|
||||
|
||||
|
|
Loading…
Reference in a new issue