Passed
Branch master (28df20)
by Markus
02:40
created

chaoswg.forms   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 17
dl 0
loc 28
rs 10
c 0
b 0
f 0
1
from flask_wtf import FlaskForm
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
from wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField
3
from wtforms.validators import InputRequired, NumberRange
4
5
6
class LoginForm(FlaskForm):
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...
7
    name = StringField(u'Username', validators=[InputRequired()])
8
    password = PasswordField(u'Password', validators=[InputRequired()])
9
10
    submit = SubmitField(u'Login')
11
12
13
class CreateTaskForm(FlaskForm):
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...
14
    task = StringField(u'Task', validators=[InputRequired()])
15
    base_points = IntegerField(u'Base Points', validators=[NumberRange(1, 13, 'Value must be between 1 and 13')])
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (113/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
16
    time_factor = FloatField(u'Time Factor', validators=[NumberRange(0.0, 3.0, 'Value must be between 0.0 and 3.0')])
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (117/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
17
    # room = StringField(u'Room', validators=[InputRequired()])
18
19
    submit = SubmitField(u'Create Task')
20
21
22
class CustomTaskForm(FlaskForm):
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...
23
    task = StringField(u'Custom Task', validators=[InputRequired()])
24
    points = IntegerField(u'Points', validators=[NumberRange(1, 13, 'Value must be between 1 and 13')])
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (103/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
25
    # room = StringField(u'Room', validators=[InputRequired()])
26
27
    submit = SubmitField(u'Do Task now')
28