Passed
Push — main ( ddff4b...7b3fbc )
by Douglas
04:33
created

ReifiedExporter.reify()   A

Complexity

Conditions 2

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
"""
2
Tool to export reified mandos triples.
3
"""
4
from typing import Sequence, Generator
5
6
from mandos.model.hits import AbstractHit, Triple
7
8
9
class ReifiedExporter:
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
10
    def reify(self, hits: Sequence[AbstractHit]) -> Generator[Triple, None, None]:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
11
        for h in hits:
0 ignored issues
show
Coding Style Naming introduced by
Variable name "h" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
12
            yield from h.reify()
13
14
15
__all__ = ["ReifiedExporter"]
16