GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — feature/solicitar_postagem_rev... ( 5cb383...906fc0 )
by Flávio
03:00
created

Pessoa.__init__()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
# -*- coding: utf-8 -*-
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
# The MIT License (MIT)
5
#
6
# Copyright (c) 2016 Trocafone
7
#
8
# Permission is hereby granted, free of charge, to any person obtaining a copy
9
# of this software and associated documentation files (the "Software"), to deal
10
# in the Software without restriction, including without limitation the rights
11
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
# copies of the Software, and to permit persons to whom the Software is
13
# furnished to do so, subject to the following conditions:
14
#
15
# The above copyright notice and this permission notice shall be included in
16
# all copies or substantial portions of the Software.
17
#
18
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
# SOFTWARE.
25
#
26
###############################################################################
27
28
from . import EntityBase
0 ignored issues
show
Bug introduced by
The name EntityBase does not seem to exist in module correios_lib.entities.requests.
Loading history...
29
from voluptuous import Schema
1 ignored issue
show
Configuration introduced by
The import voluptuous could not be resolved.

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
30
31
32
class Pessoa(EntityBase):
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...
33
    def __init__(self, nome="", logradouro="", numero="", complemento="",
0 ignored issues
show
Coding Style Naming introduced by
The name uf does not conform to the argument naming conventions ([a-z_][a-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...
best-practice introduced by
Too many arguments (13/5)
Loading history...
introduced by
Use of super on an old style class
Loading history...
Unused Code introduced by
The argument complemento seems to be unused.
Loading history...
Unused Code introduced by
The argument nome seems to be unused.
Loading history...
Unused Code introduced by
The argument logradouro seems to be unused.
Loading history...
Unused Code introduced by
The argument numero seems to be unused.
Loading history...
34
                 bairro="", referencia="", cidade="", uf="", cep="", ddd="",
0 ignored issues
show
Unused Code introduced by
The argument referencia seems to be unused.
Loading history...
Unused Code introduced by
The argument bairro seems to be unused.
Loading history...
Unused Code introduced by
The argument cep seems to be unused.
Loading history...
Unused Code introduced by
The argument cidade seems to be unused.
Loading history...
Unused Code introduced by
The argument uf seems to be unused.
Loading history...
Unused Code introduced by
The argument ddd seems to be unused.
Loading history...
35
                 telefone="", email=""):
0 ignored issues
show
Unused Code introduced by
The argument telefone seems to be unused.
Loading history...
Unused Code introduced by
The argument email seems to be unused.
Loading history...
36
        super(Pessoa, self).__init__(locals())
37
38
    def get_schema(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...
39
        self.schema = Schema({
0 ignored issues
show
Coding Style introduced by
The attribute schema was defined outside __init__.

It is generally a good practice to initialize all attributes to default values in the __init__ method:

class Foo:
    def __init__(self, x=None):
        self.x = x
Loading history...
40
            'nome': str,
41
            'logradouro': str,
42
            'numero': str,
43
            'complemento': str,
44
            'bairro': str,
45
            'referencia': str,
46
            'cidade': str,
47
            'uf': str,
48
            'cep': str,
49
            'ddd': str,
50
            'telefone': str,
51
            'email': str
52
        })
53
54
55
class RequestSolicitarPostagemReversa(EntityBase):
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...
56
57
    def __init__(self, cod_administrativo, codigo_servico, cartao,
0 ignored issues
show
best-practice introduced by
Too many arguments (6/5)
Loading history...
58
                 destinatario, coletas_solicitadas):
59
        pass
60