mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	[zeroconf] Ruff formatting (#8338)
This commit is contained in:
		| @@ -166,7 +166,7 @@ class DashboardImportDiscovery: | |||||||
| class EsphomeZeroconf(Zeroconf): | class EsphomeZeroconf(Zeroconf): | ||||||
|     def resolve_host(self, host: str, timeout: float = 3.0) -> list[str] | None: |     def resolve_host(self, host: str, timeout: float = 3.0) -> list[str] | None: | ||||||
|         """Resolve a host name to an IP address.""" |         """Resolve a host name to an IP address.""" | ||||||
|         info = AddressResolver(f'{host.partition(".")[0]}.local.') |         info = AddressResolver(f"{host.partition('.')[0]}.local.") | ||||||
|         if ( |         if ( | ||||||
|             info.load_from_cache(self) |             info.load_from_cache(self) | ||||||
|             or (timeout and info.request(self, timeout * 1000)) |             or (timeout and info.request(self, timeout * 1000)) | ||||||
| @@ -180,7 +180,7 @@ class AsyncEsphomeZeroconf(AsyncZeroconf): | |||||||
|         self, host: str, timeout: float = 3.0 |         self, host: str, timeout: float = 3.0 | ||||||
|     ) -> list[str] | None: |     ) -> list[str] | None: | ||||||
|         """Resolve a host name to an IP address.""" |         """Resolve a host name to an IP address.""" | ||||||
|         info = AddressResolver(f'{host.partition(".")[0]}.local.') |         info = AddressResolver(f"{host.partition('.')[0]}.local.") | ||||||
|         if ( |         if ( | ||||||
|             info.load_from_cache(self.zeroconf) |             info.load_from_cache(self.zeroconf) | ||||||
|             or (timeout and await info.async_request(self.zeroconf, timeout * 1000)) |             or (timeout and await info.async_request(self.zeroconf, timeout * 1000)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user