diff --git a/angrmanagement/plugins/plugin_description.py b/angrmanagement/plugins/plugin_description.py index 41719ec180..08b54e8e7b 100644 --- a/angrmanagement/plugins/plugin_description.py +++ b/angrmanagement/plugins/plugin_description.py @@ -1,14 +1,17 @@ import pathlib from dataclasses import field -from typing import Dict, List, Optional +from typing import ClassVar, Dict, List, Optional, Type import marshmallow.validate import tomlkit +from marshmallow import Schema from marshmallow_dataclass import dataclass @dataclass class MetadataDescription: + Schema: ClassVar[Type[Schema]] = Schema # placate mypy + version: int = field(metadata={"validate": marshmallow.validate.OneOf([0])}) @@ -18,6 +21,8 @@ class PackageDescription: Describes a plugin package. """ + Schema: ClassVar[Type[Schema]] = Schema # placate mypy + name: str = field() version: str = field() platforms: List[str] = field(default_factory=lambda: ["any"]) @@ -33,6 +38,8 @@ class PluginDescription: Describes an angr management plugin. Can be generated from plugin.toml. """ + Schema: ClassVar[Type[Schema]] = Schema # placate mypy + name: str = field() entrypoint: str = field() platforms: Optional[List[str]] = field(default=None) @@ -46,6 +53,8 @@ class PluginConfigFileDescription: Describes a plugin config file. """ + Schema: ClassVar[Type[Schema]] = Schema # placate mypy + metadata: MetadataDescription = field() package: PackageDescription = field() plugins: Dict[str, PluginDescription] = field(default_factory=dict) diff --git a/angrmanagement/py.typed b/angrmanagement/py.typed new file mode 100644 index 0000000000..99d7bf6058 --- /dev/null +++ b/angrmanagement/py.typed @@ -0,0 +1 @@ +PARTIAL diff --git a/setup.cfg b/setup.cfg index fa44b1a1fa..98402edc70 100644 --- a/setup.cfg +++ b/setup.cfg @@ -50,6 +50,7 @@ pyinstaller = [options.package_data] angrmanagement = + py.typed resources/fonts/*.ttf resources/images/* resources/themes/**/*