Showing 56 of 193 total issues
File TTF.py
has 1411 lines of code (exceeds 250 allowed). Consider refactoring. Open
import os
import sys
import math
import mmap
import random
Function __init__
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, filename, simpleParsing = False):
font_handle = open(filename,'rb')
self.filename = filename
self.fontOffsetTable = FontOffsetTable(font_handle)
self.fontOffsetTableLength = font_handle.tell()
- 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 hostagent.py
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
import os
import imp
import sys
File native_glyf.py
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
# awful
import sys
sys.path.append('../')
File native_ben.py
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
# awful
import sys
sys.path.append('../')
File windows_h.py
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
# generated by 'xml2py'
#
# $Id: windows_h.py 194 2007-04-05 15:31:53Z cameron $
#
Function __init__
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, handle, header):
self.bytecodeStartFileOffset = None
self.bytecodeEndFileOffset = 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
File native.py
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
# awful
import sys
sys.path.append('../')
Function fuzzBufferBenFuzz
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def fuzzBufferBenFuzz(buf, fuzzFactor2):
buf = list(buf)
# a] mutations
- 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 broker_calls.py
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
shdocvw_calls = [
"CShdocvwBroker::QueryInterface(_GUID const &,void * *)",
"CInternetShortcutPropertyStore::AddRef(void)",
"CShdocvwBroker::Release(void)",
Function gen_funcs
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def gen_funcs():
for i in iface_dict.keys():
print "\n\nFUNCTIONS FOR %s \n\n" %i
- 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 fuzzBytecode
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def fuzzBytecode(self, fileInMemory):
print '[DD] Start fuzz GLYPH'
if self.glyph.bytecodeStartFileOffset is None or self.glyph.bytecodeEndFileOffset is 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
File serveragent.py
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
import os
import sys
import time
Function shortName
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def shortName(font):
try:
for record in font['name'].names:
- 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 shortName
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def shortName(font):
name = "default"
family = "default"
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 rebuildFont
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
def rebuildFont(self, tag, newTagTable, originalFontBuffer):
assert len(originalFontBuffer) % 4 == 0, 'File must be 4 byte aligned'
assert len(newTagTable) % 4 == 0, 'New table must be 4 byte aligned'
Function shortName
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def shortName(font):
name = ""
family = ""
for record in font['name'].names:
- 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 shortNameMine
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def shortNameMine(fontPath):
try:
font = TTF.TTFont(fontPath, simpleParsing=True)
- 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 __init__
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, handle, header):
self.endPtsOfCountour = []
for i in range(0, header.numberOfCountours):
self.endPtsOfCountour.append( unpack('>H', handle.read(2))[0] )
# LOGGER.debug('\tend of countours: {}'.format(self.endPtsOfCountour[-1]) )
- 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 gen_funcs
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def gen_funcs():
for i in iface_dict.keys():
print "\n\nFUNCTIONS FOR %s \n\n" %i
- 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"