Skip to content

Instantly share code, notes, and snippets.

@shivaram
Created July 4, 2017 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shivaram/5e297f237fabd268b860f367fb2f9331 to your computer and use it in GitHub Desktop.
Save shivaram/5e297f237fabd268b860f367fb2f9331 to your computer and use it in GitHub Desktop.
************* Module pywren
W: 4, 0: Wildcard import pywren.wren (wildcard-import)
************* Module pywren.ec2standalone
W: 30, 4: Unused variable 'instance_profile' (unused-variable)
W:175, 8: Unused variable 'instance_name' (unused-variable)
************* Module pywren.executor
C:301, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
W:126, 8: Access to a protected member _set_state of a client class (protected-access)
R:134, 4: Method could be a function (no-self-use)
************* Module pywren.future
C:129, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
W: 12, 0: No exception type(s) specified (bare-except)
R: 22, 0: Too few public methods (0/2) (too-few-public-methods)
C: 29, 0: Empty class docstring (empty-docstring)
R: 29, 0: Too many instance attributes (12/7) (too-many-instance-attributes)
R:180,12: Redefinition of self._state type from pywren.future.JobState.success to pywren.future.JobState.error (redefined-variable-type)
R: 66, 4: Too many return statements (8/6) (too-many-return-statements)
R: 66, 4: Too many statements (61/50) (too-many-statements)
E: 92,22: Access to member '_exception' before its definition line 175 (access-member-before-definition)
E: 88,19: Access to member '_return_val' before its definition line 169 (access-member-before-definition)
W:175,12: Attribute '_exception' defined outside __init__ (attribute-defined-outside-init)
W:176,12: Attribute '_traceback' defined outside __init__ (attribute-defined-outside-init)
W:124, 8: Attribute 'invoke_status' defined outside __init__ (attribute-defined-outside-init)
W:169,12: Attribute '_return_val' defined outside __init__ (attribute-defined-outside-init)
W:163, 8: Attribute '_call_invoker_result' defined outside __init__ (attribute-defined-outside-init)
W:123, 8: Attribute 'run_status' defined outside __init__ (attribute-defined-outside-init)
************* Module pywren.invokers
W: 28, 8: Unused variable 'res' (unused-variable)
R: 58, 4: Method could be a function (no-self-use)
************* Module pywren.jobrunner
W: 40, 7: Catching too general exception Exception (broad-except)
W: 62,11: Catching too general exception Exception (broad-except)
************* Module pywren.local
W: 25, 4: Unused variable 'jobn' (unused-variable)
************* Module pywren.multiwren
W: 17, 8: Redefining name 'i' from outer scope (line 40) (redefined-outer-name)
W: 16, 4: Redefining name 't1' from outer scope (line 25) (redefined-outer-name)
E: 13,34: Module 'numpy' has no 'float64' member (no-member)
E: 14,34: Module 'numpy' has no 'float64' member (no-member)
W: 18, 8: Unused variable 'c' (unused-variable)
W: 17, 8: Unused variable 'i' (unused-variable)
E: 42,12: Module 'pywren.wren' has no 'call_async' member (no-member)
************* Module pywren.queues
C: 57, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C: 66, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C: 69, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
C: 71, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
W: 29, 8: Unused variable 'response' (unused-variable)
************* Module pywren.wait
W: 8, 0: No exception type(s) specified (bare-except)
W: 76,41: Access to a protected member _state of a client class (protected-access)
W:100,11: Access to a protected member _state of a client class (protected-access)
W: 7, 4: Unused cPickle imported from six.moves as pickle (unused-import)
W: 9, 4: Unused import pickle (unused-import)
************* Module pywren.wren
W: 10, 0: No exception type(s) specified (bare-except)
W: 9, 4: Unused cPickle imported from six.moves as pickle (unused-import)
W: 11, 4: Unused import pickle (unused-import)
************* Module pywren.wrenhandler
W: 24, 4: Relative import 'wrenutil', should be 'pywren.wrenutil' (relative-import)
W: 25, 4: Relative import 'version', should be 'pywren.version' (relative-import)
W: 87, 4: Redefining name 'condatar' from outer scope (line 345) (redefined-outer-name)
W: 84, 4: Redefining name 'res' from outer scope (line 343) (redefined-outer-name)
W:328,11: Catching too general exception Exception (broad-except)
************* Module pywren.wrenlogging
W: 7, 4: Unused variable 'logger' (unused-variable)
************* Module pywren.wrenutil
C: 21, 0: Old-style class defined. (old-style-class)
************* Module pywren.scripts.pywrencli
W:116,16: Unused argument 'ctx' (unused-argument)
C:131, 0: Empty function docstring (empty-docstring)
W:141, 4: Unused variable 'role' (unused-variable)
C:155, 0: Empty function docstring (empty-docstring)
W:241,20: Unused variable 'response' (unused-variable)
C:294, 0: Empty function docstring (empty-docstring)
W:315, 4: Unused variable 'role_name' (unused-variable)
W:342, 4: Unused variable 'queue' (unused-variable)
W:372,20: Unused argument 'x' (unused-argument)
W:369, 4: Unused variable 'config' (unused-variable)
W:486,31: Unused argument 'ctx' (unused-argument)
W:550,15: Catching too general exception Exception (broad-except)
E:579,11: Unexpected keyword argument 'obj' in function call (unexpected-keyword-arg)
E:579,11: No value for argument 'ctx' in function call (no-value-for-parameter)
E:579,11: No value for argument 'filename' in function call (no-value-for-parameter)
************* Module pywren.scripts.setupscript
C: 78, 0: Line too long (123/100) (line-too-long)
W: 83,23: Unused argument 'prefix' (unused-argument)
W: 87,34: Unused argument 'function_name' (unused-argument)
W: 91,30: Unused argument 'role_name' (unused-argument)
W:120,24: Unused variable 'e' (unused-variable)
E:210, 4: No value for argument 'ctx' in function call (no-value-for-parameter)
E:210, 4: No value for argument 'dryrun' in function call (no-value-for-parameter)
E:210, 4: No value for argument 'suffix' in function call (no-value-for-parameter)
************* Module pywren.scripts.standalone
W: 87, 4: No exception type(s) specified (bare-except)
W: 85, 8: Unused variable 'instance_id' (unused-variable)
W:182, 4: Unused variable 'response' (unused-variable)
************* Module pywren.serialize.module_dependency
W: 94,22: Redefining built-in 'type' (redefined-builtin)
W: 94, 8: Unused variable 'suffix' (unused-variable)
W: 94,16: Unused variable 'mode' (unused-variable)
W:157,26: Redefining built-in 'type' (redefined-builtin)
W:154,31: Unused variable 'is_pkg' (unused-variable)
W:157,20: Unused variable 'mode' (unused-variable)
W:157,12: Unused variable 'suffix' (unused-variable)
R:231, 4: Method could be a function (no-self-use)
R:257, 4: Method could be a function (no-self-use)
************* Module pywren.serialize.serialize
C:180, 0: Unnecessary parens after 'print' keyword (superfluous-parens)
W: 8, 0: No exception type(s) specified (bare-except)
W: 13, 0: No exception type(s) specified (bare-except)
E: 23, 8: No name '_Pickler' in module 'pickle' (no-name-in-module)
W:117, 4: Dangerous default value default_preinstalls.modules (__builtin__.list) as argument (dangerous-default-value)
W:140,12: Redefining name 'cp' from outer scope (line 179) (redefined-outer-name)
R:116, 0: Too few public methods (0/2) (too-few-public-methods)
W:126, 8: Attribute '_modulemgr' defined outside __init__ (attribute-defined-outside-init)
E:171, 4: Unable to import 'testmod' (import-error)
C:171, 4: Import "import testmod" should be placed at the top of the module (wrong-import-position)
E:179, 4: Possible unbalanced tuple unpacking with sequence defined at line 164: left side has 3 label(s), right side has 2 value(s) (unbalanced-tuple-unpacking)
W: 7, 4: Unused cPickle imported from six.moves as pickle (unused-import)
W: 9, 4: Unused import pickle (unused-import)
W: 15, 8: Unused Pickler imported from pickle (unused-import)
W: 19,12: Unused BytesIO imported from io (unused-import)
W: 23, 8: Unused _Pickler imported from pickle as Pickler (unused-import)
C: 12, 4: standard import "from pywren.cStringIO import StringIO" comes before "from six.moves import cPickle as pickle" (wrong-import-order)
C: 15, 8: standard import "from pickle import Pickler" comes before "from six.moves import cPickle as pickle" (wrong-import-order)
C: 17,12: standard import "from cStringIO import StringIO" comes before "from six.moves import cPickle as pickle" (wrong-import-order)
C: 19,12: standard import "from io import BytesIO" comes before "from six.moves import cPickle as pickle" (wrong-import-order)
C: 23, 8: standard import "from pickle import _Pickler as Pickler" comes before "from six.moves import cPickle as pickle" (wrong-import-order)
C: 24, 8: standard import "from io import BytesIO as StringIO" comes before "from six.moves import cPickle as pickle" (wrong-import-order)
C: 15, 8: Imports from package pickle are not grouped (ungrouped-imports)
C: 23, 8: Imports from package pickle are not grouped (ungrouped-imports)
C: 24, 8: Imports from package io are not grouped (ungrouped-imports)
************* Module pywren.serialize.cloudpickle
W: 4, 4: Wildcard import cloudpickle (wildcard-import)
W: 6, 4: Wildcard import cloudpickle (wildcard-import)
W: 6, 4: Relative import 'cloudpickle', should be 'pywren.serialize.cloudpickle.cloudpickle' (relative-import)
************* Module pywren.serialize.cloudpickle.cloudpickle
C: 15, 0: Line too long (105/100) (line-too-long)
E: 69, 4: No name '_Pickler' in module 'pickle' (no-name-in-module)
C: 94, 7: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
E:133,21: Module 'dis' has no 'get_instructions' member (no-member)
W:143,23: Redefining built-in 'file' (redefined-builtin)
R:171, 4: Method could be a function (no-self-use)
C:177,11: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
C:354,27: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
W:490,20: Redefining name 'k' from outer scope (line 93) (redefined-outer-name)
W:464,12: Access to a protected member _keep_alive of a client class (protected-access)
W:495,12: Access to a protected member _keep_alive of a client class (protected-access)
C:520, 8: Old-style class defined. (old-style-class)
W:520, 8: Class has no __init__ method (no-init)
R:520, 8: Too few public methods (0/2) (too-few-public-methods)
C:528, 7: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
R:533, 8: Too few public methods (0/2) (too-few-public-methods)
C:550, 7: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
W:586,20: Redefining name 'k' from outer scope (line 93) (redefined-outer-name)
W:666,28: Unused argument 'obj' (unused-argument)
W:669,35: Unused argument 'obj' (unused-argument)
W:708,14: Redefining built-in 'file' (redefined-builtin)
W:713, 4: Redefining built-in 'file' (redefined-builtin)
W:731,28: Redefining built-in 'vars' (redefined-builtin)
E:745,11: Module 'pickle' has no '__builtins__' member (no-member)
C:760,11: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
W:763,19: Catching too general exception Exception (broad-except)
W:763,32: Unused variable 'e' (unused-variable)
W:786,25: Redefining built-in 'globals' (redefined-builtin)
W:786,44: Redefining built-in 'dict' (redefined-builtin)
W:802,36: Redefining name 'v' from outer scope (line 93) (redefined-outer-name)
W:829, 8: Redefining built-in 'file' (redefined-builtin)
C: 68, 4: Imports from package pickle are not grouped (ungrouped-imports)
C: 70, 4: Imports from package io are not grouped (ungrouped-imports)
************* Module pywren.storage
W: 4, 4: Wildcard import storage (wildcard-import)
W: 6, 4: Wildcard import storage (wildcard-import)
W: 6, 4: Relative import 'storage', should be 'pywren.storage.storage' (relative-import)
************* Module pywren.storage.storage_utils
R: 1, 0: Similar lines in 2 files
==pywren.local:27
==pywren.scripts.standalone:245
task_run_dir = os.path.join(run_dir, str(job_i))
shutil.rmtree(task_run_dir, True) # delete old modules
os.makedirs(task_run_dir)
copy_runtime(task_run_dir)
context = {'jobnum' : job_i}
if extra_context is not None:
context.update(extra_context)
os.chdir(task_run_dir) (duplicate-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment