Showing 175 of 271 total issues
File patch.py
has 1157 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the BSD License.
"""
esky.patch: directory diffing and patching support for esky.
File __init__.py
has 816 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the BSD License.
"""
Esky - keep frozen apps fresh
File __init__.py
has 708 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the BSD License.
"""
esky.bdist_esky: distutils command to freeze apps in esky format
Function freeze
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
def freeze(dist):
"""Freeze the given distribution data using py2app."""
includes = dist.includes
excludes = dist.excludes
options = dist.freezer_options
- 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 freeze
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring. Open
def freeze(dist):
"""Freeze the given distribution data using py2exe."""
includes = dist.includes
excludes = dist.excludes
options = dist.freezer_options
- 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 freeze
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
def freeze(dist):
"""Freeze the given distribution data using bbfreeze."""
includes = dist.includes
excludes = dist.excludes
options = dist.freezer_options
- 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 main
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
def main(args):
"""Command-line diffing and patching for esky."""
parser = optparse.OptionParser()
parser.add_option("-z","--zipped",action="store_true",dest="zipped",
help="work with zipped source/target dirs")
- 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 _prepare_version
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
def _prepare_version(self,app,version,path):
"""Prepare the requested version from downloaded data.
This method is responsible for unzipping downloaded versions, applying
patches and so-forth, and making the result available as a local
- 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 get_executables
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
def get_executables(self,normalise=True):
"""Yield a normalised Executable instance for each script to be frozen.
If "normalise" is True (the default) then the user-provided scripts
will be rewritten to decode any non-filename items specified as part
- 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 bootstrap.py
has 533 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the BSD License.
"""
esky.bootstrap: minimal bootstrapping code for esky
File finder.py
has 528 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the BSD License.
"""
esky.finder: VersionFinder implementations for esky
Function freeze
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
def freeze(dist):
"""Freeze the given distribution data using cx_Freeze."""
includes = dist.includes
excludes = dist.excludes
options = dist.freezer_options
- 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 _cleanup_actions
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
def _cleanup_actions(self):
"""Iterator giving (func,args,kwds) tuples of cleanup actions.
This encapsulates the logic of the "cleanup" method without actually
performing any of the actions, making it easy to check whether cleanup
- 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 util.py
has 490 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the BSD License.
"""
esky.util: misc utility functions for esky
Function _find_msvcrt_manifest_files
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
def _find_msvcrt_manifest_files(name):
"""Search the system for candidate MSVCRT manifest files.
This method yields (manifest_file,msvcrt_dir) tuples giving a candidate
manifest file for the given assembly name, and the directory in which
- 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 _diff_dir
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def _diff_dir(self,source,target):
"""Generate patch commands for when the target is a directory."""
# If it's not already a directoy, make it one.
if not os.path.isdir(source):
self._write_command(MAKEDIR)
- 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 run
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def run(self,pipe):
self.target.sudo_proxy = None
pipe.write(b("READY"))
try:
# Process incoming commands in a loop.
- 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 cleanup_at_exit
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def cleanup_at_exit(self):
"""Arrange for cleanup to occur after application exit.
This operates by using the atexit module to spawn a new instance of
this app, with appropriate flags that cause it to launch directly into
- 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 f_py2exe.py
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the BSD License.
"""
esky.bdist_esky.f_py2exe: bdist_esky support for py2exe
Function create_zipfile
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def create_zipfile(source,target,get_zipinfo=None,members=None,compress=None):
"""Bundle the contents of a given directory into a zipfile.
The argument 'source' names the directory to read, while 'target' names
the zipfile to be written.
- 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"