maco 1.2.14__py3-none-any.whl → 1.2.16__py3-none-any.whl

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.
tests/extractors/basic.py CHANGED
@@ -1,5 +1,7 @@
1
+ """Basic extractor."""
2
+
1
3
  from io import BytesIO
2
- from typing import List, Optional
4
+ from typing import List
3
5
 
4
6
  from maco import extractor, model, yara
5
7
 
@@ -21,7 +23,13 @@ class Basic(extractor.Extractor):
21
23
  }
22
24
  """
23
25
 
24
- def run(self, stream: BytesIO, matches: List[yara.Match]) -> Optional[model.ExtractorModel]:
26
+ def run(self, stream: BytesIO, matches: List[yara.Match]) -> model.ExtractorModel:
27
+ """Run the extractor.
28
+
29
+ Returns:
30
+ (model.ExtractorModel): Results from extractor
31
+
32
+ """
25
33
  # use a custom model that inherits from ExtractorModel
26
34
  # this model defines what can go in the 'other' dict
27
35
  tmp = model.ExtractorModel(family="basic")
@@ -1,5 +1,7 @@
1
+ """Basic longer extractor."""
2
+
1
3
  from io import BytesIO
2
- from typing import List, Optional
4
+ from typing import List
3
5
 
4
6
  from maco import extractor, model, yara
5
7
 
@@ -21,7 +23,12 @@ class BasicLonger(extractor.Extractor):
21
23
  }
22
24
  """
23
25
 
24
- def run(self, stream: BytesIO, matches: List[yara.Match]) -> Optional[model.ExtractorModel]:
26
+ def run(self, stream: BytesIO, matches: List[yara.Match]) -> model.ExtractorModel:
27
+ """Run the extractor.
28
+
29
+ Returns:
30
+ (model.ExtractorModel): Results from extractor
31
+ """
25
32
  # use a custom model that inherits from ExtractorModel
26
33
  # this model defines what can go in the 'other' dict
27
34
  tmp = model.ExtractorModel(family="basic_longer")
@@ -1,3 +1,5 @@
1
+ """Simple extractor for testing module and submodule with the same name."""
2
+
1
3
  from maco import extractor
2
4
 
3
5
 
File without changes