Passed
Push — master ( 3ac0f3...fb2dae )
by -
02:11
created

NaxsiRuleSets.__init__()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.4218
Metric Value
cc 1
dl 0
loc 4
ccs 1
cts 4
cp 0.25
crap 1.4218
rs 10
1 1
from spike.model import db
2
3
4 1
class NaxsiRuleSets(db.Model):
5 1
    __bind_key__ = 'rules'
6 1
    __tablename__ = 'naxsi_rulesets'
7
8 1
    id = db.Column(db.Integer, primary_key=True)
0 ignored issues
show
Coding Style Naming introduced by
The name id does not conform to the class attribute naming conventions (([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$).

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...
9 1
    name = db.Column(db.String(1024), nullable=False, unique=True)
10 1
    remarks = db.Column(db.Text, nullable=False)
11 1
    timestamp = db.Column(db.Integer, nullable=False)
12 1
    db.UniqueConstraint('name')
13
14 1
    def __init__(self, name, remarks, timestamp):
15
        self.name = name
16
        self.remarks = remarks
17
        self.timestamp = timestamp
0 ignored issues
show
Coding Style introduced by
Final newline missing
Loading history...