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 — master ( 7d41d1...923e60 )
by Flávio
8s
created

RequestSolicitarRange   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
dl 0
loc 9
ccs 2
cts 3
cp 0.6667
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_schema() 0 7 1
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 1
from correios_lib.base import EntityBase
29 1
from correios_lib.entities import *
0 ignored issues
show
Coding Style introduced by
The usage of wildcard imports like correios_lib.entities should generally be avoided.
Loading history...
Unused Code introduced by
Objeto was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
Produto was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
CEP was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
Email was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
Remetente was imported with wildcard, but is not used.
Loading history...
30 1
from voluptuous import *
0 ignored issues
show
Coding Style introduced by
The usage of wildcard imports like voluptuous should generally be avoided.
Loading history...
31
32
33 1
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...
34
35 1
    def get_schema(self):
36 1
        return Schema({
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Schema'
Loading history...
37
            Required('codAdministrativo'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
38
            Required('codigo_servico'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
39
            Required('cartao'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
40
            Required('destinatario'): Destinatario,
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
41
            Required('coletas_solicitadas'): [Coleta]
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
42
        })
43
44
45 1
class RequestCancelarPedido(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...
46
47 1
    def get_schema(self):
48
        return Schema({
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Schema'
Loading history...
49
            Required('codAdministrativo'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
50
            Required('numeroPedido'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
51
            Required('tipo'): Any('C', 'A')
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Any'
Loading history...
52
        })
53
54
55 1
class RequestAcompanharPedido(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 1
    def get_schema(self):
58 1
        return Schema({
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Schema'
Loading history...
59
            Required('codAdministrativo'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
60
            Required('tipoBusca'): Any('H', 'U'),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Any'
Loading history...
61
            Required('numeroPedido'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
62
            Required('tipoSolicitacao'): Any('C', 'A')
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Any'
Loading history...
63
        })
64
65
66 1
class RequestAcompanharPedidoPorData(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...
67
68 1
    def get_schema(self):
69
        return Schema({
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Schema'
Loading history...
70
            Required('codAdministrativo'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
71
            Required('tipoSolicitacao'): Any('C', 'A'),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Any'
Loading history...
72
            Required('data'): Date
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
73
        })
74
75
76 1
class RequestSolicitarRange(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...
77
78 1
    def get_schema(self):
79
        return Schema({
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Schema'
Loading history...
80
            Required('codAdministrativo'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
81
            Required('tipo'): Any('AP', 'LR'),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Any'
Loading history...
82
            Optional('servico'): Any('LR', 'LS', 'LV'),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Optional'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Any'
Loading history...
83
            Required('quantidade'): All(
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'All'
Loading history...
84
                Coerce(int), Range(min=1, max=100000)
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Range'
Loading history...
85
            )
86
        })
87
88
89 1
class RequestCalcularDigitoVerificador(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...
90
91 1
    def get_schema(self):
92
        return Schema({
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Schema'
Loading history...
93
            Required('numero'): Coerce(int),
0 ignored issues
show
Comprehensibility Best Practice introduced by
Undefined variable 'Required'
Loading history...
Comprehensibility Best Practice introduced by
Undefined variable 'Coerce'
Loading history...
94
        })
95