mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-21 05:23:27 +02:00
Bump black from 21.12b0 to 22.1.0 (#3147)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -49,8 +49,8 @@ def validate_config(config):
|
||||
if current_gain == 0.0 or voltage_gain == 0.0:
|
||||
raise cv.Invalid("The gains can't be zero")
|
||||
|
||||
max_energy = (0.25 * 0.25 / 3600 / (2 ** -4)) / (voltage_gain * current_gain)
|
||||
min_energy = (0.25 * 0.25 / 3600 / (2 ** 18)) / (voltage_gain * current_gain)
|
||||
max_energy = (0.25 * 0.25 / 3600 / (2**-4)) / (voltage_gain * current_gain)
|
||||
min_energy = (0.25 * 0.25 / 3600 / (2**18)) / (voltage_gain * current_gain)
|
||||
mech_min_energy = (0.25 * 0.25 / 3600 / 7.8) / (voltage_gain * current_gain)
|
||||
if pulse_energy < min_energy or pulse_energy > max_energy:
|
||||
raise cv.Invalid(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FLASH_SIZE_1_MB = 2 ** 20
|
||||
FLASH_SIZE_1_MB = 2**20
|
||||
FLASH_SIZE_512_KB = FLASH_SIZE_1_MB // 2
|
||||
FLASH_SIZE_2_MB = 2 * FLASH_SIZE_1_MB
|
||||
FLASH_SIZE_4_MB = 4 * FLASH_SIZE_1_MB
|
||||
|
||||
@@ -13,12 +13,12 @@ DEPENDENCIES = ["esp32"]
|
||||
|
||||
|
||||
def calc_max_frequency(bit_depth):
|
||||
return 80e6 / (2 ** bit_depth)
|
||||
return 80e6 / (2**bit_depth)
|
||||
|
||||
|
||||
def calc_min_frequency(bit_depth):
|
||||
max_div_num = ((2 ** 20) - 1) / 256.0
|
||||
return 80e6 / (max_div_num * (2 ** bit_depth))
|
||||
max_div_num = ((2**20) - 1) / 256.0
|
||||
return 80e6 / (max_div_num * (2**bit_depth))
|
||||
|
||||
|
||||
def validate_frequency(value):
|
||||
|
||||
Reference in New Issue
Block a user