Showing 729 of 1,315 total issues
Function OnMotion
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
def OnMotion(self, event):
""" Motion manager.
"""
### current cursor
- 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 PluginsGUI.py
has 689 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
# PluginGUI.py ---
# --------------------------------
Function directConnect
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
def directConnect(self):
"""
Direct connect this kernel's model
"""
if self.directConnected:
- 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 Components.py
has 670 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
# Components.py ---
# --------------------------------
File DEVS.py
has 668 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: Latin-1 -*-
"""
Classes and tools for DEVS model specification
"""
File PreferencesGUI.py
has 625 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
# PreferencesGUI.py ---
# --------------------------------
File WizardGUI.py
has 618 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
# WizardGUI.py ---
# --------------------------------
Function run
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
def run(self):
tokens = tokenize.generate_tokens(self.getline)
for _token in tokens:
self.tokeneater(*_token)
# Remove trailing empty lines.
- 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 DEVS.py
has 607 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: Latin-1 -*-
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
# DEVS.py --- Classes and Tools for DEVS Model Specification
# --------------------------------
# Copyright (c) 2013
Function whichgen
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
def whichgen(command, path=None, verbose=0, exts=None):
"""Return a generator of full paths to the given command.
"command" is a the name of the executable to search for.
"path" is an optional alternate path list to search. The default it
- 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
BaseSimulator
has 67 functions (exceeds 20 allowed). Consider refactoring. Open
class BaseSimulator(Solver):
"""
The BaseSimulator class, this is the core of the complete simulation and
is exported with Pyro as the representation of a server.
"""
Function simulator_factory
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
def simulator_factory(model, strategy, prof, ntl, verbose, dynamic_structure_flag, real_time_flag):
""" Preventing direct creation for Simulator
disallow direct access to the classes
"""
- 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 simulator.py
has 565 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: Latin-1 -*-
"""
Main simulator class to be used as an interface to the user
"""
Function guessDelimiter
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
def guessDelimiter(input, textQualifier = '"'):
"""
PROTOTYPE:
guessDelimiter(input, textQualifier = '\"')
DESCRIPTION:
- 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 allocate
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
def allocate(self, models, edges, nrnodes, totalActivities):
"""
Calculate allocations for the nodes, using the information provided.
:param models: the models to allocte
- 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 BuildZipPackage
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
def BuildZipPackage(self) -> None:
"""
"""
### create the outfn zip file
- 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 directConnect
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
def directConnect(componentSet, local):
"""
Perform direct connection on this CoupledDEVS model
:param componentSet: the iterable to direct connect
- 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 SimulationGUI.py
has 543 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
# SimulationGUI.py ---
# --------------------------------
ShapeCanvas
has 62 functions (exceeds 20 allowed). Consider refactoring. Open
class ShapeCanvas(wx.ScrolledWindow, Abstractable, Subject):
""" ShapeCanvas class.
"""
ID = 0
File simconfig.py
has 536 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Module with the specific aim of creating a more simple configuration interface for the simulator.
"""
from . import middleware
from .util import DEVSException