Showing 9,525 of 13,510 total issues
File zipfile.py
has 1111 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Read and write ZIP files.
"""
import struct, os, time, sys, shutil
import binascii, cStringIO, stat
File zipfile.py
has 1111 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Read and write ZIP files.
"""
import struct, os, time, sys, shutil
import binascii, cStringIO, stat
File ast.py
has 1104 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Python abstract syntax node definitions
This file is automatically generated by Tools/compiler/astgen.py
"""
from compiler.consts import CO_VARARGS, CO_VARKEYWORDS
File ast.py
has 1104 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Python abstract syntax node definitions
This file is automatically generated by Tools/compiler/astgen.py
"""
from compiler.consts import CO_VARARGS, CO_VARKEYWORDS
Function PreprocessConditionalStatement
has a Cognitive Complexity of 138 (exceeds 5 allowed). Consider refactoring. Open
def PreprocessConditionalStatement(self):
# IfList is a stack of if branches with elements of list [Pos, CondSatisfied, BranchDetermined]
IfList = []
while self.__GetNextToken():
if self.__Token == 'DEFINE':
- 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 FvImage.py
has 1085 lines of code (exceeds 250 allowed). Consider refactoring. Open
## @file
# Parse FV image
#
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
Function AddToBuffer
has a Cognitive Complexity of 135 (exceeds 5 allowed). Consider refactoring. Open
def AddToBuffer(self, Buffer, BaseAddress, BlockSizeList, ErasePolarity, ImageBinDict, vtfDict = None, MacroDict = {}):
Size = self.Size
GenFdsGlobalVariable.InfLogger('\nGenerate Region at Offset 0x%X' % self.Offset)
GenFdsGlobalVariable.InfLogger(" Region Size = 0x%X" %Size)
GenFdsGlobalVariable.SharpCounter = 0
- 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 libpython.py
has 1078 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/python
'''
From gdb 7 onwards, gdb's build can be configured --with-python, allowing gdb
to be extended with Python code e.g. for library-specific data visualizations,
such as for the C++ STL types. Documentation on this API can be seen at:
File pdb.py
has 1064 lines of code (exceeds 250 allowed). Consider refactoring. Open
#! /usr/bin/env python
"""A Python debugger."""
# (See pdb.doc for documentation.)
File pdb.py
has 1064 lines of code (exceeds 250 allowed). Consider refactoring. Open
#! /usr/bin/env python
"""A Python debugger."""
# (See pdb.doc for documentation.)
File platform.py
has 1060 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
""" This module tries to retrieve as much platform-identifying data as
possible. It makes this information available via function APIs.
File platform.py
has 1060 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
""" This module tries to retrieve as much platform-identifying data as
possible. It makes this information available via function APIs.
Function constant
has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring. Open
def constant(self, ):
constant_StartIndex = self.input.index()
try:
try:
- 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 constant
has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring. Open
def constant(self, ):
constant_StartIndex = self.input.index()
try:
try:
- 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 asdl_c.py
has 1043 lines of code (exceeds 250 allowed). Consider refactoring. Open
#! /usr/bin/env python
"""Generate C code from an ASDL description."""
# TO DO
# handle fields that have a type but no name
Function __EvaluateConditional
has a Cognitive Complexity of 129 (exceeds 5 allowed). Consider refactoring. Open
def __EvaluateConditional(self, Name, Line, Op = None, Value = None):
FileLineTuple = GetRealFileLine(self.FileName, Line)
if Name in InputMacroDict:
MacroValue = InputMacroDict[Name]
- 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 msi.py
has 1038 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Python MSI Generator
# (C) 2003 Martin v. Loewis
# See "FOO" in comments refers to MSDN sections with the title FOO.
import msilib, schema, sequence, os, glob, time, re, shutil, zipfile
from msilib import Feature, CAB, Directory, Dialog, Binary, add_data
File imaplib.py
has 1037 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""IMAP4 client.
Based on RFC 2060.
Public class: IMAP4
File imaplib.py
has 1037 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""IMAP4 client.
Based on RFC 2060.
Public class: IMAP4
Function CycleReferenceCheck
has a Cognitive Complexity of 127 (exceeds 5 allowed). Consider refactoring. Open
def CycleReferenceCheck(self):
#
# Check the cycle between FV and FD image
#
MaxLength = len (self.Profile.FvDict)
- 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"