Passed
Pull Request — main (#248)
by Yohann
01:31
created

tests.utils.test_convertion   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A TestSnowflake.test_remove_none() 0 4 1
1
# Copyright Pincer 2021-Present
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
# Full MIT License can be found in `LICENSE` at the project root.
3
4
from pincer.utils.conversion import remove_none
5
6
7
class TestSnowflake:
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
8
9
    def test_remove_none(self):
0 ignored issues
show
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...
introduced by
Missing function or method docstring
Loading history...
10
        assert remove_none([None, 1]) == [1]
11
        assert remove_none({None, 1}) == {1}
12
        assert remove_none({'a': 1, 'b': None}) == {'a': 1}
13