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):
- 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 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.
- 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_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):
- 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_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):
- 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
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 {
- Exclude checks
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 {
- Exclude checks
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 {
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.ui-button-icon-only {
- Exclude checks
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 {
- Exclude checks
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 {
- Exclude checks
The property -moz-appearance is compatible with -webkit-appearance and should be included as well. Open
-webkit-appearance: none !important;
- Exclude checks
Don't use IDs in selectors. Open
#calendar {
- Exclude checks
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 {
- Exclude checks
Use of !important Open
z-index: 2 !important;
- Exclude checks
Use of !important Open
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif !important;
- Exclude checks
Element (div.help-block) is overqualified, just use .help-block without element name. Open
div.help-block ul.errorlist {
- Exclude checks
Element (td.field-cidade) is overqualified, just use .field-cidade without element name. Open
td.field-cidade {
- Exclude checks
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 {
- Exclude checks
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 {
- Exclude checks
Don't use IDs in selectors. Open
#left-nav li:not(.active) .fa {
- Exclude checks