Showing 5,781 of 10,536 total issues
Consider simplifying this complex logical expression. Open
Open
if (
!a.getTemplateUrl() &&
a.longestItem &&
0 < a.currentList.length
) {
Consider simplifying this complex logical expression. Open
Open
if (meter_list is None or len(meter_list) == 0) and \
(virtual_meter_list is None or len(virtual_meter_list) == 0) and \
(offline_meter_list is None or len(offline_meter_list) == 0) and \
(equipment_list is None or len(equipment_list) == 0):
print("This is an empty combined equipment ")
Consider simplifying this complex logical expression. Open
Open
if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
(energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
(energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
(energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
# There isn't any energy data
Consider simplifying this complex logical expression. Open
Open
if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
(energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
(energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
(energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
# There isn't any energy data
Consider simplifying this complex logical expression. Open
Open
if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
(energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
(energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
(energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
# There isn't any energy data
Consider simplifying this complex logical expression. Open
Open
if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
(energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
(energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
(energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
# There isn't any energy data
Consider simplifying this complex logical expression. Open
Open
if (meter_list is None or len(meter_list) == 0) and \
(virtual_meter_list is None or len(virtual_meter_list) == 0) and \
(offline_meter_list is None or len(offline_meter_list) == 0) and \
(equipment_list is None or len(equipment_list) == 0):
print("This is an empty shopfloor ")
Consider simplifying this complex logical expression. Open
Open
if (meter_list is None or len(meter_list) == 0) and \
(virtual_meter_list is None or len(virtual_meter_list) == 0) and \
(offline_meter_list is None or len(offline_meter_list) == 0) and \
(equipment_list is None or len(equipment_list) == 0):
print("This is an empty combined equipment ")
Consider simplifying this complex logical expression. Open
Open
if (meter_list is None or len(meter_list) == 0) and \
(virtual_meter_list is None or len(virtual_meter_list) == 0) and \
(offline_meter_list is None or len(offline_meter_list) == 0) and \
(equipment_list is None or len(equipment_list) == 0):
print("This is an empty shopfloor ")
Consider simplifying this complex logical expression. Open
Open
if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
(energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
(energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0) and \
(energy_equipment_hourly is None or len(energy_equipment_hourly) == 0):
# There isn't any energy data
Consider simplifying this complex logical expression. Open
Open
if (meter_list is None or len(meter_list) == 0) and \
(virtual_meter_list is None or len(virtual_meter_list) == 0) and \
(offline_meter_list is None or len(offline_meter_list) == 0) and \
(equipment_list is None or len(equipment_list) == 0):
print("This is an empty combined equipment ")
Consider simplifying this complex logical expression. Open
Open
if 'host' not in server.keys() \
or 'port' not in server.keys() \
or server['host'] is None \
or server['port'] is None \
or len(server['host']) == 0 \
Function sync
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ViewService.prototype.sync = function () {
var _this = this;
var uiViewsByFqn = this._uiViews.map(function (uiv) { return [uiv.fqn, uiv]; }).reduce(applyPairs, {});
// Return a weighted depth value for a uiView.
// The depth is the nesting depth of ui-views (based on FQN; times 10,000)
Function getInertBodyElement
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getInertBodyElement /* function(html: string): HTMLBodyElement */ = (function(window, document) {
if (isDOMParserAvailable()) {
return getInertBodyElement_DOMParser;
}
Function updateTotalUploadProgress
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function updateTotalUploadProgress() {
var totalUploadProgress;
var totalBytesSent = 0;
var totalBytes = 0;
var activeFiles = this.getActiveFiles();
Function showPreview
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, showPreview: function() {
var options = this.$options,
container = this.$textarea,
afterContainer = container.next(),
replacementContainer = $('<div/>',{'class':'md-preview','data-provider':'markdown-preview'}),
Function updateEvent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateEvent(event) { // update an existing event
var i, len = cache.length, e,
defaultEventEnd = getView().defaultEventEnd, // getView???
startDelta = event.start - event._start,
endDelta = event.end ?
Function getExistingFallback
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function getExistingFallback() {
var getFallback = function getFallback(elements) {
var _iteratorNormalCompletion12 = true;
var _didIteratorError12 = false;
var _iteratorError12 = undefined;
Function distributeHeight
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function distributeHeight(els, availableHeight, shouldRedistribute) {
// *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,
// and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.
Function getSkinCss
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getSkinCss(event, opt) {
var source = event.source || {};
var eventColor = event.color;
var sourceColor = source.color;
var optionColor = opt('eventColor');