Showing 9,525 of 13,510 total issues
Function gui
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def gui():
"""Graphical interface (starts web server and pops up a control window)."""
class GUI:
def __init__(self, window, port=7464):
self.window = window
- 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 unified_diff
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def unified_diff(a, b, fromfile='', tofile='', fromfiledate='',
tofiledate='', n=3, lineterm='\n'):
r"""
Compare two sequences of lines; generate the delta as a unified diff.
- 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 gettarinfo
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
- 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 link
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def link(self,
target_desc,
objects,
output_filename,
output_dir=None,
- 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 getcomments
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def getcomments(object):
"""Get lines of comments immediately preceding an object's source code.
Returns None when source can't be found.
"""
- 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 _fix
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def _fix(self, context):
"""Round if it is necessary to keep self within prec precision.
Rounds and fixes the exponent. Does not raise on a sNaN.
- 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 __add__
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def __add__(self, other, context=None):
"""Returns self + other.
-INF + INF (or the reverse) cause InvalidOperation errors.
"""
- 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 ModuleObject.py
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
## @file
# This file is used to define a class object to describe a module
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
File ssl.py
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Wrapper module for _ssl, providing some additional facilities
# implemented in Python. Written by Bill Janssen.
"""\
This module provides some more Pythonic support for SSL.
File ssl.py
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Wrapper module for _ssl, providing some additional facilities
# implemented in Python. Written by Bill Janssen.
"""\
This module provides some more Pythonic support for SSL.
File ftpmirror.py
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
#! /usr/bin/env python
"""Mirror a remote ftp subtree into a local directory tree.
usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat]
File tokenize.py
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Tokenization help for Python programs.
generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens. It accepts a readline-like method which is called
repeatedly to get the next line of input (or "" for EOF). It generates
File symbols.py
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Module symbol-table generator"""
from compiler import ast
from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICT, \
SC_FREE, SC_CELL, SC_UNKNOWN
File tokenize.py
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Tokenization help for Python programs.
generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens. It accepts a readline-like method which is called
repeatedly to get the next line of input (or "" for EOF). It generates
File symbols.py
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Module symbol-table generator"""
from compiler import ast
from compiler.consts import SC_LOCAL, SC_GLOBAL_IMPLICIT, SC_GLOBAL_EXPLICT, \
SC_FREE, SC_CELL, SC_UNKNOWN
Consider simplifying this complex logical expression. Open
if LA93 == IDENTIFIER:
LA93 = self.input.LA(2)
if LA93 == 62:
LA93_44 = self.input.LA(3)
Consider simplifying this complex logical expression. Open
if LA89 == IDENTIFIER:
LA89 = self.input.LA(2)
if LA89 == 62:
LA89_45 = self.input.LA(3)
Consider simplifying this complex logical expression. Open
if LA93 == IDENTIFIER:
LA93 = self.input.LA(2)
if LA93 == 62:
LA93_44 = self.input.LA(3)
Consider simplifying this complex logical expression. Open
if LA89 == IDENTIFIER:
LA89 = self.input.LA(2)
if LA89 == 62:
LA89_45 = self.input.LA(3)