Gustavosdo/summum

View on GitHub

Showing 438 of 438 total issues

Function get_readonly_fields has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def get_readonly_fields(self, request, obj=None):
        u""" Define todos os campos da venda como somente leitura caso o registro seja salvo no BD """

        if obj:
            if obj.pedido == 'N' or obj.status or (obj.pedido == 'S' and obj.status_pedido):
Severity: Minor
Found in estagio/venda/admin.py - About 25 mins to fix

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 prazo_entre_parcelas has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def prazo_entre_parcelas(self, data):
        """
        Método que define o prazo entre data baseado na parametrização da forma de pagamento.
        Permite trabalhar com data com prazos semanais e mensais.

Severity: Minor
Found in estagio/contas_receber/models/conta_receber.py - About 25 mins to fix

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_readonly_fields has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def get_readonly_fields(self, request, obj=None):
        u""" Define todos os campos da inline como somente leitura caso o registro seja salvo no BD """

        if obj:
            if obj.pedido == 'N' or obj.status or (obj.pedido == 'S' and obj.status_pedido):
Severity: Minor
Found in estagio/venda/admin.py - About 25 mins to fix

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_readonly_fields has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def get_readonly_fields(self, request, obj=None):
        u""" Define todos os campos da inline como somente leitura caso o registro seja salvo no BD """

        if obj:
            if obj.pedido == 'N' or obj.status or (obj.pedido == 'S' and obj.status_pedido):
Severity: Minor
Found in estagio/compra/admin.py - About 25 mins to fix

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

Element (ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all) is overqualified, just use .ui-corner-all without element name.
Open

ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all {

Adjoining classes: ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all
Open

ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all {

Element (ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all) is overqualified, just use .ui-menu without element name.
Open

ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all {

Rule doesn't have all its properties in alphabetical order.
Open

.ui-button-icon-only {

Adjoining classes: ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all
Open

ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all {

Element (ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all) is overqualified, just use .ui-corner-all without element name.
Open

ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all {

The property -moz-appearance is compatible with -webkit-appearance and should be included as well.
Open

    -webkit-appearance: none !important;

Don't use IDs in selectors.
Open

#calendar {
Severity: Minor
Found in estagio/static/css/dashboard.css by csslint

Element (ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all) is overqualified, just use .ui-widget-content without element name.
Open

ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all {

Use of !important
Open

    z-index: 2 !important;

Use of !important
Open

    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif !important;

Element (div.help-block) is overqualified, just use .help-block without element name.
Open

div.help-block ul.errorlist {
Severity: Minor
Found in estagio/static/css/main.css by csslint

Element (td.field-cidade) is overqualified, just use .field-cidade without element name.
Open

td.field-cidade {

Element (ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all) is overqualified, just use .ui-autocomplete without element name.
Open

ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all {

Element (ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all) is overqualified, just use .ui-menu without element name.
Open

ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all {

Don't use IDs in selectors.
Open

#left-nav li:not(.active) .fa {
Severity: Minor
Found in estagio/static/css/main.css by csslint
Severity
Category
Status
Source
Language