Showing 5,781 of 10,536 total issues
Consider simplifying this complex logical expression. Open
Open
if "non_working_days_subtotals" not in report['base_period'].keys() or \
report['base_period']['non_working_days_subtotals'] is None or \
len(report['base_period']['non_working_days_subtotals']) == 0 or \
"working_days_subtotals" not in report['base_period'].keys() or \
report['base_period']['working_days_subtotals'] is None or \
Function generate_excel
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_excel(report,
name,
base_period_start_datetime_local,
base_period_end_datetime_local,
reporting_start_datetime_local,
Function generate_excel
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_excel(report,
name,
base_period_start_datetime_local,
base_period_end_datetime_local,
reporting_start_datetime_local,
Consider simplifying this complex logical expression. Open
Open
if "non_working_days_subtotals" not in report['base_period'].keys() or \
report['base_period']['non_working_days_subtotals'] is None or \
len(report['base_period']['non_working_days_subtotals']) == 0 or \
"working_days_subtotals" not in report['base_period'].keys() or \
report['base_period']['working_days_subtotals'] is None or \
Consider simplifying this complex logical expression. Open
Open
if "non_working_days_subtotals" not in report['base_period'].keys() or \
report['base_period']['non_working_days_subtotals'] is None or \
len(report['base_period']['non_working_days_subtotals']) == 0 or \
"working_days_subtotals" not in report['base_period'].keys() or \
report['base_period']['working_days_subtotals'] is None or \
Consider simplifying this complex logical expression. Open
Open
if "non_working_days_subtotals" not in report['base_period'].keys() or \
report['base_period']['non_working_days_subtotals'] is None or \
len(report['base_period']['non_working_days_subtotals']) == 0 or \
"working_days_subtotals" not in report['base_period'].keys() or \
report['base_period']['working_days_subtotals'] is None or \
Function generate_excel
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_excel(report,
name,
base_period_start_datetime_local,
base_period_end_datetime_local,
reporting_start_datetime_local,
Function on_post
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function on_post
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def on_post(req, resp):
"""Handles POST requests"""
admin_control(req)
try:
raw_json = req.stream.read().decode('utf-8')
Function ArrayType
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ArrayType(type, mode) {
var _this = this;
// Wrap non-array value as array
function arrayWrap(val) {
return isArray(val) ? val : isDefined(val) ? [val] : [];
Function base64EncodeOutputStream
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var base64EncodeOutputStream = function() {
var _buffer = 0;
var _buflen = 0;
var _length = 0;
Function Rejection
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Rejection = /** @class */ (function () {
function Rejection(type, message, detail) {
/** @internal */
this.$id = id++;
this.type = type;
Function __buildButtons
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, __buildButtons: function(buttonsArray, container) {
var i,
ns = this.$ns,
handler = this.$handler,
callback = this.$callback;
Function buildDayTableBodyHTML
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildDayTableBodyHTML() {
var headerClass = tm + "-widget-header"; // TODO: make these when updateOptions() called
var contentClass = tm + "-widget-content";
var date;
var today = clearTime(new Date());
Function drawLabels
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawLabels() {
var currentAngle = startAngle;
var radius = options.series.pie.label.radius > 1 ? options.series.pie.label.radius : maxRadius * options.series.pie.label.radius;
Function setFocus
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setFocus: function(config){
var bbox,
itemBbox,
newBbox,
codes,
Function drop
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.drop = function(a) {
if (a && a.sourceCtrl) {
a.sourceCtrl.suppressProcess = !0;
a.sourceCtrl.suspendLayout();
b.suspendLayout();
Function editSpace
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.editSpace = function (space) {
var modalInstance = $uibModal.open({
windowClass: "animated fadeIn",
templateUrl: 'views/settings/space/space.model.html',
controller: 'ModalEditSpaceCtrl',
Function addVirtualMeter
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.addVirtualMeter = function() {
var modalInstance = $uibModal.open({
templateUrl: 'views/settings/meter/virtualmeter.model.html',
controller: 'ModalAddVirtualMeterCtrl',
windowClass: 'animated fadeIn',
Function saveChange
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const saveChange = async (oldValue, newValue, row, column) => {
let isResponseOK = false;
if (newValue == null || newValue === '' || newValue < 0 || oldValue === newValue) {
row.daily_value = oldValue;
return;