Return a mapping of data from an iterable of TOML text ``lines``. For example:: >>> lines = ['[advisory]', 'id = "RUST1"', '', '[versions]', 'patch = [">= 1"]'] >>> data_from_toml_lines(lines) {'advisory': {'id': 'RUST1'}, 'versions': {'patch': ['>= 1']}}
(lines)
| 214 | |
| 215 | |
| 216 | def data_from_toml_lines(lines): |
| 217 | """ |
| 218 | Return a mapping of data from an iterable of TOML text ``lines``. |
| 219 | |
| 220 | For example:: |
| 221 | |
| 222 | >>> lines = ['[advisory]', 'id = "RUST1"', '', '[versions]', 'patch = [">= 1"]'] |
| 223 | >>> data_from_toml_lines(lines) |
| 224 | {'advisory': {'id': 'RUST1'}, 'versions': {'patch': ['>= 1']}} |
| 225 | """ |
| 226 | return toml.loads("\n".join(lines)) |
| 227 | |
| 228 | |
| 229 | def get_advisory_data(location): |