forked from platformio/platformio-core
ManifetPatrser fixes (#3080)
* Skip broken examples declaration * Allow dots in keywords * Allow "+" in keywords
This commit is contained in:
1 parent
8febdc19ea
commit
76865a1730
3 files changed
+5
-3
No files matched your search
@@ -56,7 +56,7 @@ class ManifestModel(DataModel):
|
||||
)
|
||||
description = DataField(max_length=1000, required=True)
|
||||
keywords = DataField(
|
||||
type=ListOfType(DataField(max_length=255, regex=r"^[a-z\d\- ]+$")),
|
||||
type=ListOfType(DataField(max_length=255, regex=r"^[a-z\d\-\+\. ]+$")),
|
||||
required=True,
|
||||
)
|
||||
authors = DataField(type=ListOfType(AuthorModel), required=True)
|
||||
|
||||
@@ -149,7 +149,7 @@ class BaseManifestParser(object):
|
||||
or not isinstance(examples, list)
|
||||
or not all(isinstance(v, dict) for v in examples)
|
||||
):
|
||||
data["examples"] = None
|
||||
examples = None
|
||||
if not examples and self.package_dir:
|
||||
data["examples"] = self.parse_examples_from_dir(self.package_dir)
|
||||
if "examples" in data and not data["examples"]:
|
||||
|
||||
Reference in new issue
Block a user