Skip to content

Sourcery refactored develop branch#1

Open
sourcery-ai[bot] wants to merge 1 commit into
developfrom
sourcery/develop
Open

Sourcery refactored develop branch#1
sourcery-ai[bot] wants to merge 1 commit into
developfrom
sourcery/develop

Conversation

@sourcery-ai

@sourcery-ai sourcery-ai Bot commented Jul 11, 2020

Copy link
Copy Markdown

Branch develop refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the develop branch, then run:

git fetch origin sourcery/develop
git merge --ff-only FETCH_HEAD
git reset HEAD^

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery timed out performing refactorings.

Due to GitHub API limits, only the first 60 comments can be shown.

Comment thread setup.py
)
for res in args:
yield res
yield from args

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_args refactored with the following changes:

  • Replace yield inside for loop with yield from (yield-from)

Comment thread setup.py
Comment on lines +179 to -182
script_text = runner_script_template
for group in "console_scripts", "gui_scripts":
for name, _ep in dist.get_entry_map(group).items():
script_text = runner_script_template

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_script_args refactored with the following changes:

  • Hoist statements out of for/while loops (hoist-statement-from-loop)

Comment thread lib/hints.py
Comment on lines -40 to +43
if path.startswith(path_entry):
if best is None or len(path_entry) > len(best):
best = path_entry
if path.startswith(path_entry) and (
best is None or len(path_entry) > len(best)
):
best = path_entry

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _normalizePath refactored with the following changes:

  • Merge nested if conditions (merge-nested-ifs)

Comment thread nuitka/Builtins.py

builtin_names, builtin_warnings = _getBuiltinNames()
builtin_named_values = dict((getattr(builtins, x), x) for x in builtin_names)
builtin_named_values = {getattr(builtins, x): x for x in builtin_names}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 119-119 refactored with the following changes:

  • Replace list(), dict() or set() with comprehension (collection-builtin-to-comprehension)

Comment thread nuitka/Builtins.py
Comment on lines -132 to -136
result = []
result = [
builtin_name
for builtin_name in builtin_names
if isinstance(getattr(builtins, builtin_name), type)
]

for builtin_name in builtin_names:
if isinstance(getattr(builtins, builtin_name), type):
result.append(builtin_name)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getBuiltinTypeNames refactored with the following changes:

  • Convert for loop into list comprehension (list-comprehension)

Comment thread nuitka/Options.py
Comment on lines -255 to +249
return sum([_splitShellPattern(x) for x in options.recurse_extra_files], [])
return sum((_splitShellPattern(x) for x in options.recurse_extra_files), [])

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getShallFollowExtraFilePatterns refactored with the following changes:

  • Replace unneeded comprehension with generator (comprehension-to-generator)

Comment thread nuitka/Options.py
Comment on lines -261 to +255
return sum([_splitShellPattern(x) for x in options.include_modules], [])
return sum((_splitShellPattern(x) for x in options.include_modules), [])

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getMustIncludeModules refactored with the following changes:

  • Replace unneeded comprehension with generator (comprehension-to-generator)

Comment thread nuitka/Options.py
Comment on lines -267 to +261
return sum([_splitShellPattern(x) for x in options.include_packages], [])
return sum((_splitShellPattern(x) for x in options.include_packages), [])

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getMustIncludePackages refactored with the following changes:

  • Replace unneeded comprehension with generator (comprehension-to-generator)

Comment thread nuitka/Options.py
Comment on lines -375 to +369
and not Utils.getOS() == "Darwin"
and Utils.getOS() != "Darwin"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function shallUseStaticLibPython refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

Comment thread nuitka/PythonVersions.py
return False
else:
return True
return python_version >= 353

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function needsDuplicateArgumentColOffset refactored with the following changes:

  • Simplify conditional into return statement (return-identity)

Comment thread nuitka/PythonVersions.py
if (
isPythonDebug() or hasattr(sys, "getobjects")
) and not abiflags.startswith("d"):
abiflags = "d" + abiflags

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getPythonABI refactored with the following changes:

  • Merge nested if conditions (merge-nested-ifs)

result = self._clone(self.line)

return result
return self._clone(self.line)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function SourceCodeReference.atInternal refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

Comment thread nuitka/Variables.py
Comment on lines -124 to +130
user.isExpressionGeneratorObjectBody()
or user.isExpressionCoroutineObjectBody()
or user.isExpressionAsyncgenObjectBody()
):
if self.owner is user.getParentVariableProvider():
return
(
user.isExpressionGeneratorObjectBody()
or user.isExpressionCoroutineObjectBody()
or user.isExpressionAsyncgenObjectBody()
)
) and self.owner is user.getParentVariableProvider():
return

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Variable.addVariableUser refactored with the following changes:

  • Merge nested if conditions (merge-nested-ifs)

Comment thread nuitka/__past__.py
Comment on lines +72 to -79
from cStringIO import StringIO # pylint: disable=I0021,import-error
else:
from urllib.request import ( # pylint: disable=I0021,import-error,no-name-in-module
urlretrieve,
)

if str is bytes:
from cStringIO import StringIO # pylint: disable=I0021,import-error
else:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 77-79 refactored with the following changes:

  • Merge repeated if statements into single if (merge-repeated-ifs)

Comment thread nuitka/__past__.py
Comment on lines -88 to +86
cls.__ne__ = lambda self, other: not self == other
cls.__ne__ = lambda self, other: self != other

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function total_ordering refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

Comment on lines -958 to +951
if is_String(c) and not '\n' in c:
if is_String(c) and '\n' not in c:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function LazyAction.get_parent_class refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

Comment on lines -963 to +956
if env:
c = env.get(self.var, '')
else:
c = ''
c = env.get(self.var, '') if env else ''

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function LazyAction._generate_cache refactored with the following changes:

  • Replace if statement with if expression (assign-if-exp)

Comment on lines -1253 to +1243
action = Action(ac, strfunction=ac.strfunction)
return action
return Action(ac, strfunction=ac.strfunction)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function ActionFactory.__call__ refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

matchsuf = [S for S in suffixes if path[-len(S):] == S]
if matchsuf:
suf = max([(len(_f),_f) for _f in matchsuf])[1]
suf = max((len(_f),_f) for _f in matchsuf)[1]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function match_splitext refactored with the following changes:

  • Replace unneeded comprehension with generator (comprehension-to-generator)

result = BuilderBase(**kw)

if not composite is None:
if composite is not None:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Builder refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

raise UserError("Multiple ways to build the same target were specified for: %s" % t)
if t.has_explicit_builder():
if not t.env is None and not t.env is env:
if t.env is not None and t.env is not env:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function _node_errors refactored with the following changes:

  • Merge nested if conditions (merge-nested-ifs)
  • Simplify logical expression using De Morgan identities (de-morgan)

Comment on lines -420 to +419
if not chdir is _null:
if chdir is not _null:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function BuilderBase.__init__ refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

Comment on lines -456 to +455
if env:
suffixes = self.src_suffixes(env)
else:
suffixes = []
suffixes = self.src_suffixes(env) if env else []

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function BuilderBase.splitext refactored with the following changes:

  • Replace if statement with if expression (assign-if-exp)

Comment on lines -636 to +632
if suff and not suff[0] in [ '.', '_', '$' ]:
if suff and suff[0] not in ['.', '_', '$']:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function BuilderBase.adjust_suffix refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)


def is_enabled(self):
return (cache_enabled and not self.path is None)
return cache_enabled and self.path is not None

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function CacheDir.is_enabled refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

Comment on lines -959 to +960
if platform is None:
platform = SCons.Platform.Platform()
if platform is None:
platform = SCons.Platform.Platform()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Base.__init__ refactored with the following changes:

  • Hoist conditional out of nested conditional (hoist-if-from-if)
  • Replace assignment with augmented assignment (aug-assign)

Comment on lines -1336 to +1338
self._dict[key] = dk + val
else:
dk = [x for x in dk if x not in val]
self._dict[key] = dk + val
self._dict[key] = dk + val

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Base.AppendUnique refactored with the following changes:

  • Hoist repeated code outside conditional statement (hoist-statement-from-if)
  • Replace if statement with if expression (assign-if-exp)
  • Simplify logical expression using De Morgan identities (de-morgan)

Comment on lines -1514 to +1510
if key:
dict = self.Dictionary(key)
else:
dict = self.Dictionary()
dict = self.Dictionary(key) if key else self.Dictionary()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Base.Dump refactored with the following changes:

  • Replace if statement with if expression (assign-if-exp)

Comment on lines -1723 to +1716
if not val in dk:
if val not in dk:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Base.PrependUnique refactored with the following changes:

  • Simplify logical expression using De Morgan identities (de-morgan)

Comment on lines -1834 to +1827
for executor in uniq.keys():
for executor in uniq:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Base.AddPreAction refactored with the following changes:

  • Remove unnecessary call to keys() (remove-dict-keys)

@sourcery-ai

sourcery-ai Bot commented Jul 11, 2020

Copy link
Copy Markdown
Author

Sourcery Code Quality Report (beta)

✅ Merging this PR will increase code quality in the affected files by 0.01 out of 10.

Before After Change
Quality 8.73 8.74 0.01
Complexity 3.63 3.54 -0.08
Method Length 46.91 46.64 -0.26
Lines 74690 74059 -631
Changed files Quality Before Quality After Quality Change
setup.py 8.15 8.18 0.03 ⬆️
lib/hints.py 7.53 7.58 0.05 ⬆️
nuitka/Builtins.py 8.41 8.46 0.05 ⬆️
nuitka/Constants.py 7.75 7.95 0.2 ⬆️
nuitka/ModuleRegistry.py 9.31 9.34 0.02 ⬆️
nuitka/Options.py 9.53 9.53 0.0
nuitka/PythonVersions.py 8.88 8.91 0.03 ⬆️
nuitka/SourceCodeReferences.py 9.38 9.38 0.0
nuitka/Variables.py 9.4 9.4 0.0
nuitka/past.py 8.95 9.05 0.1 ⬆️
nuitka/build/SconsInterface.py 7.93 7.95 0.02 ⬆️
nuitka/build/inline_copy/appdirs/appdirs.py 7.79 7.8 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Action.py 8.77 8.78 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Builder.py 8.36 8.37 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/CacheDir.py 8.7 8.7 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Conftest.py 7.74 7.76 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Debug.py 8.94 8.95 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Defaults.py 8.56 8.58 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Environment.py 8.56 8.56 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Executor.py 9.35 9.36 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Job.py 8.83 8.84 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/PathList.py 8.89 8.9 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/SConf.py 8.99 9.01 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/SConsign.py 9.28 9.28 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Subst.py 9.17 9.18 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Taskmaster.py 8.74 8.74 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Util.py 9.19 9.2 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/cpp.py 9.08 9.09 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Node/FS.py 9.03 9.04 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Node/Python.py 9.58 9.59 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Node/init.py 9.17 9.18 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Platform/init.py 8.58 8.59 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Platform/aix.py 8.36 8.37 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Platform/win32.py 8.54 8.55 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Scanner/C.py 9.31 9.32 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Scanner/Prog.py 7.77 7.83 0.06 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Scanner/RC.py 9.63 9.66 0.04 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Scanner/init.py 9.09 9.09 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Script/Interactive.py 8.82 8.83 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Script/Main.py 8.89 8.89 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Script/SConsOptions.py 8.59 8.62 0.03 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Script/SConscript.py 8.85 8.86 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/GettextCommon.py 8.77 8.79 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/PharLapCommon.py 8.55 8.6 0.04 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/cc.py 8.57 8.59 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/filesystem.py 9.4 9.41 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/g++.py 8.57 8.67 0.1 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/install.py 8.49 8.5 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/intelc.py 7.2 7.27 0.06 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/mingw.py 7.92 7.92 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/msginit.py 9.07 9.09 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/mslink.py 8.55 8.55 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/msvc.py 8.44 8.45 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/msvs.py 7.57 7.59 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/rmic.py 8.31 8.34 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/sunc++.py 7.68 7.71 0.03 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/xgettext.py 8.15 8.16 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/MSCommon/common.py 8.19 8.19 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/MSCommon/sdk.py 8.45 8.45 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/MSCommon/vc.py 8.38 8.38 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/MSCommon/vs.py 8.74 8.77 0.03 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/docbook/init.py 7.63 7.64 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Variables/BoolVariable.py 9.28 9.28 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Variables/EnumVariable.py 8.72 8.73 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Variables/ListVariable.py 9.43 9.44 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Variables/init.py 8.65 8.7 0.05 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/compat/init.py 8.98 9.01 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/compat/_scons_builtins.py 9.47 9.61 0.14 ⬆️
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/compat/_scons_hashlib.py 9.67 9.67 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/compat/_scons_sets.py 9.31 9.31 0.0
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/compat/_scons_subprocess.py 8.14 8.15 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Action.py 8.63 8.64 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Builder.py 8.32 8.33 0.0
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/CacheDir.py 8.35 8.35 0.0
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Conftest.py 7.81 7.82 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Debug.py 8.88 8.89 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Defaults.py 8.3 8.32 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Environment.py 8.55 8.55 0.0
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Executor.py 9.39 9.4 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Job.py 8.74 8.75 0.0
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/PathList.py 8.88 8.89 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/SConf.py 8.89 8.91 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Subst.py 8.67 8.68 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Taskmaster.py 8.22 8.23 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Util.py 9.1 9.1 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/cpp.py 9.08 9.08 0.0
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/dblite.py 8.99 9.0 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Node/FS.py 8.97 8.97 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Node/Python.py 9.42 9.42 0.0
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Node/init.py 9.14 9.15 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Platform/init.py 8.45 8.45 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Platform/aix.py 8.36 8.37 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Platform/virtualenv.py 9.42 9.42 0.0
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Platform/win32.py 8.2 8.22 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Scanner/C.py 9.29 9.3 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Scanner/Prog.py 7.89 7.91 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Scanner/RC.py 9.58 9.6 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Scanner/init.py 9.08 9.09 0.0
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Script/Interactive.py 8.7 8.71 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Script/Main.py 8.5 8.51 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Script/SConsOptions.py 8.24 8.25 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Script/SConscript.py 8.46 8.49 0.03 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/GettextCommon.py 8.88 8.9 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/init.py 8.66 8.66 0.0
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/cc.py 8.57 8.59 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/clangxx.py 8.02 8.09 0.07 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/filesystem.py 9.1 9.1 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/gxx.py 8.64 8.74 0.1 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/install.py 8.25 8.26 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/intelc.py 5.99 6.04 0.05 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/mingw.py 7.96 7.98 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/msginit.py 8.89 8.91 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/msvs.py 7.48 7.5 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/rmic.py 8.04 8.06 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/suncxx.py 7.4 7.43 0.03 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/textfile.py 8.37 8.4 0.04 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/xgettext.py 7.75 7.77 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/MSCommon/sdk.py 8.34 8.34 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/MSCommon/vc.py 7.22 7.23 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/MSCommon/vs.py 8.67 8.68 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/docbook/init.py 7.6 7.63 0.02 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Variables/BoolVariable.py 9.28 9.28 0.01 ⬆️
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Variables/init.py 7.79 7.83 0.04 ⬆️
nuitka/build/inline_copy/pefile/pefile.py 7.95 7.96 0.01 ⬆️
nuitka/codegen/CallCodes.py 8.2 8.21 0.01 ⬆️
nuitka/codegen/CodeHelpers.py 8.6 8.6 0.0
nuitka/codegen/CodeObjectCodes.py 7.69 7.73 0.05 ⬆️
nuitka/codegen/ComparisonCodes.py 6.73 6.79 0.06 ⬆️
nuitka/codegen/ConditionalCodes.py 7.49 7.52 0.02 ⬆️
nuitka/codegen/ConstantCodes.py 7.43 7.43 0.0
nuitka/codegen/Contexts.py 9.57 9.58 0.02 ⬆️
nuitka/codegen/FunctionCodes.py 7.83 7.84 0.01 ⬆️
nuitka/codegen/OperationCodes.py 7.25 7.25 0.0
nuitka/codegen/RaisingCodes.py 7.7 7.7 0.0
nuitka/codegen/SliceCodes.py 8.05 8.06 0.01 ⬆️
nuitka/codegen/VariableCodes.py 7.45 7.47 0.02 ⬆️
nuitka/codegen/VariableDeclarations.py 9.23 9.23 0.0
nuitka/codegen/YieldCodes.py 7.81 7.83 0.02 ⬆️
nuitka/codegen/c_types/CTypeNuitkaBools.py 9.35 9.38 0.03 ⬆️
nuitka/codegen/c_types/CTypeNuitkaInts.py 9.2 9.24 0.04 ⬆️
nuitka/codegen/c_types/CTypePyObjectPtrs.py 9.26 9.27 0.01 ⬆️
nuitka/finalizations/FinalizeMarkups.py 7.51 7.6 0.09 ⬆️
nuitka/freezer/Standalone.py 6.82 6.85 0.03 ⬆️
nuitka/importing/ImportCache.py 8.96 9.01 0.04 ⬆️
nuitka/importing/Importing.py 7.73 7.76 0.02 ⬆️
nuitka/importing/StandardLibrary.py 7.14 7.25 0.11 ⬆️
nuitka/importing/Whitelisting.py 7.88 8.0 0.12 ⬆️
nuitka/nodes/AssignNodes.py 9.26 9.26 0.0

Here are some functions in these files that still need a tune-up:

File Function Quality Recommendation
nuitka/build/inline_copy/pefile/pefile.py PE.dump_info 0.0 Reduce complexity. Split out functionality
nuitka/build/inline_copy/pefile/pefile.py PE.dump_dict 0.01 Reduce complexity. Split out functionality
nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Environment.py Base.AppendUnique 0.02 Reduce complexity. Split out functionality
nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Environment.py Base.AppendUnique 0.06 Reduce complexity. Split out functionality
nuitka/build/inline_copy/pefile/pefile.py PE.parse_version_information 0.06 Reduce complexity. Split out functionality

Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it via email or our Gitter!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants