Showing 107 of 402 total issues
Function lista_proposicoes_de_mulheres
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def lista_proposicoes_de_mulheres():
camaraws = Camaraws()
prop_finder = ProposicoesFinder()
importador = ImportadorCamara([''])
importador.camara_dos_deputados = importador._gera_casa_legislativa()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function partidos_das_proposicoes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def partidos_das_proposicoes(lista_proposicoes):
for proposicao in lista_proposicoes:
if proposicao['txtSiglaPartido']:
partido = proposicao['txtSiglaPartido'].strip()
if partido not in PARTIDOS:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function votos_from_tree
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def votos_from_tree(self, vot_tree, votacao):
"""Extrai lista de votos do XML da votação e as salva no banco de dados
Argumentos:
vot_tree -- etree dos votos
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function voto
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def voto(self, opcao):
if opcao == models.SIM:
return 1
elif opcao == models.NAO:
return -1
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_casas_legislativas_com_genero
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_casas_legislativas_com_genero():
casas_legislativas = []
for casa in CasaLegislativa.objects.all():
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function jsonMatrix_gera_links_partidos_termos
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def jsonMatrix_gera_links_partidos_termos():
global matrix
matrix['links'] = []
for p in range(len(matrix['partidos'])):
partidoNome = matrix['partidos'][p]['name']
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function transform_data
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def transform_data(self):
self.csv_rows.append(LABELS)
for votacao in self.votacoes:
votos = votacao.votos()
for voto in votos:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"