Completed
Push — master ( 9b11f9...01edc4 )
by Rich
01:34
created

NamedProgressBar   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
dl 0
loc 8
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 3 1
A default_widgets() 0 2 1
1
#! /usr/bin/env python
2
#
3
# Copyright (C) 2016 Rich Lewis <[email protected]>
4
# License: 3-clause BSD
5
6
7
"""
8
# skchem.utils.progressbar
9
10
Module implementing progressbars.
11
"""
12
13
import progressbar
0 ignored issues
show
Bug introduced by
This module seems to import itself.
Loading history...
14
15
class NamedProgressBar(progressbar.ProgressBar):
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...
Bug introduced by
The Module skchem.utils.progressbar does not seem to have a member named ProgressBar.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
16
17
    def __init__(self, name=None, **kwargs):
0 ignored issues
show
introduced by
Use of super on an old style class
Loading history...
18
        super(NamedProgressBar, self).__init__(**kwargs)
19
        self.name = name
20
21
    def default_widgets(self):
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...
introduced by
Use of super on an old style class
Loading history...
22
        return [self.name, ': '] + super(NamedProgressBar, self).default_widgets()
23