mirror of
https://github.com/dw-0/kiauh.git
synced 2026-04-01 23:35:13 +05:00
Merge commit 'a17171b88e982c8343761bf07c5a4373acdbd205' into feat/obico-for-v6
This commit is contained in:
@@ -85,7 +85,7 @@ class DuplicateOptionError(Exception):
|
||||
class SimpleConfigParser:
|
||||
"""A customized config parser targeted at handling Klipper style config files"""
|
||||
|
||||
_SECTION_RE = re.compile(r"\s*\[(\w+ ?\w+)]\s*([#;].*)?$")
|
||||
_SECTION_RE = re.compile(r"\s*\[(\w+\s?[\w\-]+)]\s*([#;].*)?$")
|
||||
_OPTION_RE = re.compile(r"^\s*(\w+)\s*[:=]\s*([^=:].*)\s*([#;].*)?$")
|
||||
_MLOPTION_RE = re.compile(r"^\s*(\w+)\s*[:=]\s*([#;].*)?$")
|
||||
_COMMENT_RE = re.compile(r"^\s*([#;].*)?$")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
testcases = [
|
||||
("[example_section]", True),
|
||||
("[update_manager moonraker-obico]", True),
|
||||
("[example_section two]", True),
|
||||
("not_a_valid_section", False),
|
||||
("section: invalid", False),
|
||||
|
||||
Reference in New Issue
Block a user