mirror of
https://github.com/esphome/esphome.git
synced 2024-11-08 09:40:53 +01:00
commit
6d3c7f035d
@ -1,6 +1,6 @@
|
||||
"""Constants used by esphome."""
|
||||
|
||||
__version__ = "2023.12.0"
|
||||
__version__ = "2023.12.1"
|
||||
|
||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||
VALID_SUBSTITUTIONS_CHARACTERS = (
|
||||
|
@ -357,7 +357,7 @@ def snake_case(value):
|
||||
return value.replace(" ", "_").lower()
|
||||
|
||||
|
||||
_DISALLOWED_CHARS = re.compile(r"[^a-zA-Z0-9_]")
|
||||
_DISALLOWED_CHARS = re.compile(r"[^a-zA-Z0-9-_]")
|
||||
|
||||
|
||||
def sanitize(value):
|
||||
|
@ -261,6 +261,7 @@ def test_snake_case(text, expected):
|
||||
('!"§$%&/()=?foo_bar', "___________foo_bar"),
|
||||
('foo_!"§$%&/()=?bar', "foo____________bar"),
|
||||
('foo_bar!"§$%&/()=?', "foo_bar___________"),
|
||||
('foo-bar!"§$%&/()=?', "foo-bar___________"),
|
||||
),
|
||||
)
|
||||
def test_sanitize(text, expected):
|
||||
|
Loading…
Reference in New Issue
Block a user