mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Bump ruff in pre-commit to 0.12.0 (#9121)
This commit is contained in:
		| @@ -4,7 +4,7 @@ | |||||||
| repos: | repos: | ||||||
|   - repo: https://github.com/astral-sh/ruff-pre-commit |   - repo: https://github.com/astral-sh/ruff-pre-commit | ||||||
|     # Ruff version. |     # Ruff version. | ||||||
|     rev: v0.11.10 |     rev: v0.12.0 | ||||||
|     hooks: |     hooks: | ||||||
|       # Run the linter. |       # Run the linter. | ||||||
|       - id: ruff |       - id: ruff | ||||||
|   | |||||||
| @@ -12,8 +12,8 @@ from esphome.const import ( | |||||||
|     CONF_OVERSAMPLING, |     CONF_OVERSAMPLING, | ||||||
|     CONF_PRESSURE, |     CONF_PRESSURE, | ||||||
|     CONF_TEMPERATURE, |     CONF_TEMPERATURE, | ||||||
|     DEVICE_CLASS_HUMIDITY, |  | ||||||
|     DEVICE_CLASS_ATMOSPHERIC_PRESSURE, |     DEVICE_CLASS_ATMOSPHERIC_PRESSURE, | ||||||
|  |     DEVICE_CLASS_HUMIDITY, | ||||||
|     DEVICE_CLASS_TEMPERATURE, |     DEVICE_CLASS_TEMPERATURE, | ||||||
|     ICON_GAS_CYLINDER, |     ICON_GAS_CYLINDER, | ||||||
|     STATE_CLASS_MEASUREMENT, |     STATE_CLASS_MEASUREMENT, | ||||||
|   | |||||||
| @@ -120,10 +120,12 @@ select = [ | |||||||
|  |  | ||||||
| ignore = [ | ignore = [ | ||||||
|   "E501", # line too long |   "E501", # line too long | ||||||
|  |   "PLC0415", # `import` should be at the top-level of a file | ||||||
|   "PLR0911", # Too many return statements ({returns} > {max_returns}) |   "PLR0911", # Too many return statements ({returns} > {max_returns}) | ||||||
|   "PLR0912", # Too many branches ({branches} > {max_branches}) |   "PLR0912", # Too many branches ({branches} > {max_branches}) | ||||||
|   "PLR0913", # Too many arguments to function call ({c_args} > {max_args}) |   "PLR0913", # Too many arguments to function call ({c_args} > {max_args}) | ||||||
|   "PLR0915", # Too many statements ({statements} > {max_statements}) |   "PLR0915", # Too many statements ({statements} > {max_statements}) | ||||||
|  |   "PLW1641", # Object does not implement `__hash__` method | ||||||
|   "PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable |   "PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable | ||||||
|   "PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target |   "PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target | ||||||
|   "UP038", # https://github.com/astral-sh/ruff/issues/7871 https://github.com/astral-sh/ruff/pull/16681 |   "UP038", # https://github.com/astral-sh/ruff/issues/7871 https://github.com/astral-sh/ruff/pull/16681 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user