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:
dependabot[bot] 2023-02-10 07:40:04 +13:00 committed by GitHub
parent 045489e6d7
commit b7ab00b699
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 3 additions and 11 deletions

View file

@ -3,7 +3,7 @@
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
repos: repos:
- repo: https://github.com/ambv/black - repo: https://github.com/ambv/black
rev: 22.12.0 rev: 23.1.0
hooks: hooks:
- id: black - id: black
args: args:

View file

@ -80,7 +80,7 @@ async def to_code(config):
cg.add(var.set_address(config[CONF_MAC_ADDRESS].as_hex)) 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_TEMPERATURE, var.set_temperature),
(CONF_HUMIDITY, var.set_humidity), (CONF_HUMIDITY, var.set_humidity),
(CONF_BATTERY_VOLTAGE, var.set_battery_voltage), (CONF_BATTERY_VOLTAGE, var.set_battery_voltage),

View file

@ -240,7 +240,6 @@ async def to_code(config):
# Called by writer.py # Called by writer.py
def copy_files(): def copy_files():
dir = os.path.dirname(__file__) dir = os.path.dirname(__file__)
post_build_file = os.path.join(dir, "post_build.py.script") post_build_file = os.path.join(dir, "post_build.py.script")
copy_file_if_changed( copy_file_if_changed(

View file

@ -52,7 +52,6 @@ CONFIG_SCHEMA = (
async def to_code(config): async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID]) var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config) await cg.register_component(var, config)
await spi.register_spi_device(var, config) await spi.register_spi_device(var, config)

View file

@ -92,7 +92,6 @@ CONFIG_SWITCH_COMPONENT_SCHEMA = CONFIG_SENSOR_COMPONENT_SCHEMA.extend(
async def setup_component_core_(var, config, arg): async def setup_component_core_(var, config, arg):
if CONF_VARIABLE_NAME in config: if CONF_VARIABLE_NAME in config:
cg.add(var.set_variable_name(config[CONF_VARIABLE_NAME])) cg.add(var.set_variable_name(config[CONF_VARIABLE_NAME]))
elif CONF_COMPONENT_NAME in config: elif CONF_COMPONENT_NAME in config:

View file

@ -69,7 +69,6 @@ CONFIG_SCHEMA = cv.All(
async def to_code(config): async def to_code(config):
hub = await cg.get_variable(config[CONF_NEXTION_ID]) hub = await cg.get_variable(config[CONF_NEXTION_ID])
var = cg.new_Pvariable(config[CONF_ID], hub) var = cg.new_Pvariable(config[CONF_ID], hub)
await cg.register_component(var, config) await cg.register_component(var, config)

View file

@ -122,7 +122,6 @@ async def to_code(config):
cg.add(var.set_standard_units(config[CONF_STANDARD_UNITS])) cg.add(var.set_standard_units(config[CONF_STANDARD_UNITS]))
for key, funcName in TYPES.items(): for key, funcName in TYPES.items():
if key in config: if key in config:
sens = await sensor.new_sensor(config[key]) sens = await sensor.new_sensor(config[key])
cg.add(getattr(var, funcName)(sens)) cg.add(getattr(var, funcName)(sens))

View file

@ -62,7 +62,6 @@ def assign_declare_id(value):
def parameters_to_template(args): def parameters_to_template(args):
template_args = [] template_args = []
func_args = [] func_args = []
script_arg_names = [] script_arg_names = []

View file

@ -98,7 +98,6 @@ async def to_code(config):
cg.add(var.set_heater_duty_value(config[CONF_HEATER_MAX_DUTY])) cg.add(var.set_heater_duty_value(config[CONF_HEATER_MAX_DUTY]))
for key, funcName in TYPES.items(): for key, funcName in TYPES.items():
if key in config: if key in config:
sens = await sensor.new_sensor(config[key]) sens = await sensor.new_sensor(config[key])
cg.add(getattr(var, funcName)(sens)) cg.add(getattr(var, funcName)(sens))

View file

@ -977,7 +977,6 @@ class LogoutHandler(BaseHandler):
class SecretKeysRequestHandler(BaseHandler): class SecretKeysRequestHandler(BaseHandler):
@authenticated @authenticated
def get(self): def get(self):
filename = None filename = None
for secret_filename in const.SECRETS_FILES: for secret_filename in const.SECRETS_FILES:

View file

@ -1,6 +1,6 @@
pylint==2.15.10 pylint==2.15.10
flake8==6.0.0 # also change in .pre-commit-config.yaml when updating 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 pyupgrade==3.3.1 # also change in .pre-commit-config.yaml when updating
pre-commit pre-commit