core/homeassistant/helpers
J. Nick Koston 368feec712
Refactor translations to reduce dict lookups (#107425)
* Refactor translations to reduce dict lookups

All of our cache lookups used:

`cache[language][O(component)][category]`

The cache was designed as

`cache[language][component][category][flatted_key]`

The lookups are now

`cache[language][category][O(component)]`

The cache is now stored as

`cache[language][category][component][flatted_key]`

This allows the catch fetch to avoid looking up
the category each loop

* already a set, and we do not mutate
2024-01-07 22:29:27 -05:00
..
service_info Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
__init__.py Move config_per_platform and extract_domain_configs to config.py (#104989) 2023-12-04 12:48:49 +01:00
aiohttp_client.py Bump aiohttp to 3.9.1 (#104176) 2023-11-29 16:13:54 +01:00
area_registry.py Improve conversation typing (#106905) 2024-01-05 18:40:34 +01:00
check_config.py Add domain key config validation (#104242) 2023-12-05 15:07:32 +01:00
collection.py Add TypeVar defaults for DataUpdateCoordinator and EntityComponent (#95026) 2023-06-22 03:33:23 +02:00
condition.py Allow conditions to be implemented in platforms (#88509) 2023-02-23 22:30:51 -05:00
config_entry_flow.py Update Union typing (4) [Py310] (#86427) 2023-01-23 09:04:40 +01:00
config_entry_oauth2_flow.py Improve OAuth error handling in configuration flows (#103157) 2023-11-11 11:02:51 +01:00
config_validation.py Add domain key config validation (#104242) 2023-12-05 15:07:32 +01:00
data_entry_flow.py Use @require_admin decorator (#98061) 2023-08-14 15:07:20 +02:00
debounce.py Downgrade Debouncer call ignored log message (#98840) 2023-08-22 14:42:33 -05:00
deprecation.py Avoid fetching logger in check_if_deprecated_constant if there is nothing to log (#107341) 2024-01-06 10:20:30 +01:00
device_registry.py Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
discovery.py Add names to common helper tasks (#90803) 2023-04-05 08:41:15 +02:00
discovery_flow.py Rename `gather_with_concurrency` to `gather_with_limited_concurrency` (#102241) 2023-10-19 15:08:52 +02:00
dispatcher.py Reduce overhead to connect dispatcher (#105715) 2023-12-16 10:16:58 +01:00
entity.py Fix entity property cache creation arguments (#107221) 2024-01-05 09:18:25 +01:00
entity_component.py Index entities by domain for entity services (#106759) 2024-01-02 15:28:58 +01:00
entity_platform.py Index entities by domain for entity services (#106759) 2024-01-02 15:28:58 +01:00
entity_registry.py Update ReadOnlyEntityOptions typing (#103813) 2023-11-11 22:30:55 +01:00
entity_values.py Limit cache size of EntityValues (#94983) 2023-06-21 22:23:35 +02:00
entityfilter.py Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080) 2023-12-20 23:55:09 +01:00
event.py Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080) 2023-12-20 23:55:09 +01:00
frame.py Use loader.async_suggest_report_issue in frame helper (#101461) 2023-10-05 19:52:26 +02:00
group.py Move group helpers into their own module (#106924) 2024-01-04 17:34:56 +01:00
httpx_client.py Import names from typing instead of typing_extensions [3.11] (#97065) 2023-07-22 17:03:44 -05:00
icon.py Cache construction of battery icon (#102194) 2023-10-18 07:35:39 +02:00
instance_id.py Regenerate instance ID on error (#94898) 2023-06-20 11:16:51 +02:00
integration_platform.py Remove async_process_integration_platform_for_component (#100680) 2023-09-21 17:06:41 +02:00
intent.py Add HassNevermind intent (bump intents package) (#102131) 2023-10-16 19:13:26 -05:00
issue_registry.py Make the check_config script open issue_registry read only (#98545) 2023-08-18 20:15:00 +02:00
json.py Fix most sphinx documentation warnings (#101228) 2023-10-02 09:01:41 +02:00
location.py
network.py Extend `auth/providers` endpoint and add `/api/person/list` endpoint for local ip requests (#103906) 2023-11-24 17:11:54 +01:00
ratelimit.py Add first TypeVarTuple annotations (#105379) 2023-12-18 00:38:07 +01:00
recorder.py Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
reload.py Move config_per_platform and extract_domain_configs to config.py (#104989) 2023-12-04 12:48:49 +01:00
restore_state.py Refactor restore state saving to avoid a dict lookup of ATTR_RESTORED (#106854) 2024-01-02 12:48:14 +01:00
schema_config_entry_flow.py Improve decorator type annotations [core] (#104826) 2023-11-30 18:50:31 +01:00
script.py Fix changed_variables in automation traces (#106665) 2023-12-30 08:34:21 +01:00
script_variables.py
selector.py Add Valve integration (#102184) 2023-12-18 19:48:00 +01:00
sensor.py Move DeviceInfo from entity to device registry (#98149) 2023-08-10 22:04:26 -04:00
service.py Move group helpers into their own module (#106924) 2024-01-04 17:34:56 +01:00
signal.py Make hass.async_stop an untracked task (#88738) 2023-02-24 23:11:48 -05:00
significant_change.py Add significant change helper check_valid_float (#106005) 2023-12-18 21:59:30 +01:00
singleton.py Update mypy to 1.4.0 (#94987) 2023-06-21 16:12:51 +02:00
start.py
state.py Remove deprecated state.get_changed_since (#96579) 2023-07-18 09:42:48 +02:00
storage.py Remove unnnecessary pylint configs from core (#98704) 2023-08-22 23:12:12 +02:00
sun.py Fix infinite loop in sun.sun (#89723) 2023-03-14 16:27:29 -10:00
system_info.py Ensure async_get_system_info does not fail if supervisor is unavailable (#96492) 2023-07-16 11:10:07 -04:00
temperature.py
template.py Remove duplicate assignment of `median` and `statistical_mode` jinja2 filter (#106953) 2024-01-05 17:36:55 +01:00
trace.py Fix changed_variables in automation traces (#106665) 2023-12-30 08:34:21 +01:00
translation.py Refactor translations to reduce dict lookups (#107425) 2024-01-07 22:29:27 -05:00
trigger.py Update mypy to 1.7.0 (#103800) 2023-11-11 23:31:04 +01:00
trigger_template_entity.py Set TriggerBaseEntity device_class in init (#100216) 2023-09-12 19:36:56 +02:00
typing.py Add generic Event class (#97071) 2023-07-23 21:51:54 +02:00
update_coordinator.py Switch formatting from black to ruff-format (#102893) 2023-11-27 14:38:59 +01:00