-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This doesn't use hologram, as it needs more permissive schemas than what hologram provides. Added some unit tests
- Loading branch information
Jacob Beck
committed
Jul 22, 2020
1 parent
88e26da
commit a976e54
Showing
11 changed files
with
615 additions
and
119 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from dataclasses import dataclass, field | ||
from hologram import JsonSchemaMixin | ||
|
||
from typing import List, Dict, Any, Union | ||
|
||
|
||
@dataclass | ||
class SelectorDefinition(JsonSchemaMixin): | ||
name: str | ||
definition: Union[str, Dict[str, Any]] | ||
|
||
|
||
@dataclass | ||
class SelectorFile(JsonSchemaMixin): | ||
selectors: List[SelectorDefinition] | ||
version: int = 2 | ||
|
||
|
||
@dataclass | ||
class SelectorCollection: | ||
packages: Dict[str, List[SelectorFile]] = field(default_factory=dict) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.