Lines Matching +full:line +full:- +full:name
1 # SPDX-License-Identifier: GPL-2.0
18 name: str
21 def __str__(self) -> str:
23 return f'# CONFIG_{self.name} is not set'
24 return f'CONFIG_{self.name}={self.value}'
34 def __init__(self) -> None:
37 def __eq__(self, other: Any) -> bool:
42 def __repr__(self) -> str:
45 def as_entries(self) -> Iterable[KconfigEntry]:
46 for name, value in self._entries.items():
47 yield KconfigEntry(name, value)
49 def add_entry(self, name: str, value: str) -> None:
50 self._entries[name] = value
52 def is_subset_of(self, other: 'Kconfig') -> bool:
53 for name, value in self._entries.items():
54 b = other._entries.get(name)
63 def conflicting_options(self, other: 'Kconfig') -> List[Tuple[KconfigEntry, KconfigEntry]]:
65 for name, value in self._entries.items():
66 b = other._entries.get(name)
68 pair = (KconfigEntry(name, value), KconfigEntry(name, b))
72 def merge_in_entries(self, other: 'Kconfig') -> None:
73 for name, value in other._entries.items():
74 self._entries[name] = value
76 def write_to_file(self, path: str) -> None:
81 def parse_file(path: str) -> Kconfig:
85 def parse_from_string(blob: str) -> Kconfig:
90 for line in blob.split('\n'):
91 line = line.strip()
92 if not line:
95 match = config_matcher.match(line)
100 empty_match = is_not_set_matcher.match(line)
105 if line[0] == '#':
107 raise KconfigParseError('Failed to parse: ' + line)