Data.generate_example()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 2
rs 9.4285
c 1
b 0
f 0
1 1
import csv
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
3
4 1
class Data(object):
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
5
6 1
    FILENAME = 'osmerge.csv'
7
8 1
    HEADER_ID = '_id'
9 1
    HEADER_SHOW = '_show'
10 1
    HEADER = [HEADER_ID, HEADER_SHOW]
11
12 1
    @classmethod
13
    def generate_example(cls):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
14 1
        with open(cls.FILENAME, 'w', newline='') as csvfile:
15 1
            writer = csv.writer(csvfile)
16
            writer.writerow(cls.HEADER)
17