snakemake-interface-common 1.4.0__tar.gz → 1.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/PKG-INFO +1 -1
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/pyproject.toml +1 -1
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/snakemake_interface_common/_common.py +4 -2
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/snakemake_interface_common/plugin_registry/plugin.py +2 -2
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/LICENSE +0 -0
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/README.md +0 -0
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/snakemake_interface_common/__init__.py +0 -0
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/snakemake_interface_common/exceptions.py +0 -0
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/snakemake_interface_common/plugin_registry/__init__.py +0 -0
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/snakemake_interface_common/plugin_registry/attribute_types.py +0 -0
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/snakemake_interface_common/rules.py +0 -0
- {snakemake_interface_common-1.4.0 → snakemake_interface_common-1.4.2}/snakemake_interface_common/settings.py +0 -0
|
@@ -4,8 +4,7 @@ __email__ = "johannes.koester@uni-due.de"
|
|
|
4
4
|
__license__ = "MIT"
|
|
5
5
|
|
|
6
6
|
from dataclasses import MISSING, Field
|
|
7
|
-
from typing import Any, Dict, List,
|
|
8
|
-
from argparse_dataclass import _handle_bool_type
|
|
7
|
+
from typing import Any, Dict, List, Tuple
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
# In Python 3.10, we can use types.NoneType
|
|
@@ -22,6 +21,9 @@ def dataclass_field_to_argument_args(
|
|
|
22
21
|
|
|
23
22
|
Returns pair of (args, kwargs) to be passed to ArgumentParser.add_argument.
|
|
24
23
|
"""
|
|
24
|
+
from argparse_dataclass import _handle_bool_type
|
|
25
|
+
from typing import Literal, Union, get_args, get_origin
|
|
26
|
+
|
|
25
27
|
args = field.metadata.get("args", [f"--{field.name.replace('_', '-')}"])
|
|
26
28
|
positional = not args[0].startswith("-")
|
|
27
29
|
kwargs = {
|
|
@@ -4,7 +4,7 @@ __email__ = "johannes.koester@uni-due.de"
|
|
|
4
4
|
__license__ = "MIT"
|
|
5
5
|
|
|
6
6
|
from abc import ABC, abstractmethod
|
|
7
|
-
from
|
|
7
|
+
from dataclasses import fields
|
|
8
8
|
from dataclasses import MISSING, Field, dataclass
|
|
9
9
|
from typing import Any, Type
|
|
10
10
|
import copy
|
|
@@ -57,7 +57,7 @@ class PluginBase(ABC):
|
|
|
57
57
|
argparser."""
|
|
58
58
|
|
|
59
59
|
# Cut out early if we don't have custom parameters to add
|
|
60
|
-
if not self.
|
|
60
|
+
if not self.has_settings_cls():
|
|
61
61
|
return
|
|
62
62
|
|
|
63
63
|
# Convenience handle
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|