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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snakemake-interface-common
3
- Version: 1.4.0
3
+ Version: 1.4.2
4
4
  Summary: Common functions and classes for Snakemake and its plugins
5
5
  Author: Johannes Koester
6
6
  Author-email: johannes.koester@uni-due.de
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "snakemake-interface-common"
3
- version = "1.4.0"
3
+ version = "1.4.2"
4
4
  description = "Common functions and classes for Snakemake and its plugins"
5
5
  authors = ["Johannes Koester <johannes.koester@uni-due.de>"]
6
6
  readme = "README.md"
@@ -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, Literal, Tuple, Union, get_args, get_origin
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 argparse_dataclass import fields
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.has_executor_settings():
60
+ if not self.has_settings_cls():
61
61
  return
62
62
 
63
63
  # Convenience handle