Showing 5,781 of 10,536 total issues
Function generate_excel
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
def generate_excel(report,
name,
base_period_start_datetime_local,
base_period_end_datetime_local,
reporting_start_datetime_local,
- 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 generate_excel
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
def generate_excel(report,
name,
base_period_start_datetime_local,
base_period_end_datetime_local,
reporting_start_datetime_local,
- 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 generate_excel
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
def generate_excel(report,
name,
base_period_start_datetime_local,
base_period_end_datetime_local,
reporting_start_datetime_local,
- 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
File tenantsaving.py
has 747 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File tenantplan.py
has 747 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File virtualpowerplant.py
has 747 lines of code (exceeds 250 allowed). Consider refactoring. Open
import uuid
from datetime import datetime, timedelta
import falcon
import mysql.connector
import simplejson as json
Function on_get
has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring. Open
def on_get(req, resp, id_):
if 'API-KEY' not in req.headers or \
not isinstance(req.headers['API-KEY'], str) or \
len(str.strip(req.headers['API-KEY'])) == 0:
access_control(req)
- 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
File shopfloorsaving.py
has 744 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File shopfloorplan.py
has 744 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File storeload.py
has 744 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File storeplan.py
has 743 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import uuid
from decimal import Decimal
File storesaving.py
has 743 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import uuid
from decimal import Decimal
File windfarm.py
has 742 lines of code (exceeds 250 allowed). Consider refactoring. Open
import uuid
from datetime import datetime, timedelta
import falcon
import mysql.connector
import simplejson as json
File shopfloorload.py
has 739 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File photovoltaicpowerstation.py
has 738 lines of code (exceeds 250 allowed). Consider refactoring. Open
import uuid
from datetime import datetime, timedelta
import falcon
import mysql.connector
import simplejson as json
File datasource.py
has 733 lines of code (exceeds 250 allowed). Consider refactoring. Open
import uuid
from datetime import datetime, timezone, timedelta
import falcon
import mysql.connector
import simplejson as json
Function on_get
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
def on_get(req, resp, id_):
if 'API-KEY' not in req.headers or \
not isinstance(req.headers['API-KEY'], str) or \
len(str.strip(req.headers['API-KEY'])) == 0:
access_control(req)
- 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
File tenantstatistics.py
has 732 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import re
import uuid
File spacestatistics.py
has 730 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
from core.utilities import get_translation
import os
import uuid
import openpyxl.utils.cell as format_cell
Function on_get
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
def on_get(req, resp):
if 'API-KEY' not in req.headers or \
not isinstance(req.headers['API-KEY'], str) or \
len(str.strip(req.headers['API-KEY'])) == 0:
access_control(req)
- 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"