$ pylint r2pipe/*.py
************* Module r2pipe
r2pipe/__init__.py:32:0: W0622: Redefining built-in 'open' (redefined-builtin)
r2pipe/__init__.py:32:0: C0103: Class name "open" doesn't conform to PascalCase naming style (invalid-name)
************* Module r2pipe.native
r2pipe/native.py:1:0: C0114: Missing module docstring (missing-module-docstring)
r2pipe/native.py:10:0: W0702: No exception type(s) specified (bare-except)
r2pipe/native.py:15:0: W0702: No exception type(s) specified (bare-except)
r2pipe/native.py:18:0: C0103: Constant name "lib" doesn't conform to UPPER_CASE naming style (invalid-name)
r2pipe/native.py:20:0: C0116: Missing function or method docstring (missing-function-docstring)
r2pipe/native.py:21:4: W0603: Using the global statement (global-statement)
r2pipe/native.py:33:4: W0612: Unused variable 'err' (unused-variable)
r2pipe/native.py:38:0: C0115: Missing class docstring (missing-class-docstring)
r2pipe/native.py:38:0: R0205: Class 'AddressHolder' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
r2pipe/native.py:47:0: C0115: Missing class docstring (missing-class-docstring)
r2pipe/native.py:47:0: R0205: Class 'WrappedRMethod' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
r2pipe/native.py:62:40: W0123: Use of eval (eval-used)
r2pipe/native.py:63:34: W0123: Use of eval (eval-used)
r2pipe/native.py:47:0: R0903: Too few public methods (1/2) (too-few-public-methods)
r2pipe/native.py:74:0: C0115: Missing class docstring (missing-class-docstring)
r2pipe/native.py:74:0: R0205: Class 'WrappedApiMethod' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
r2pipe/native.py:84:12: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
r2pipe/native.py:87:25: W0123: Use of eval (eval-used)
r2pipe/native.py:96:0: C0116: Missing function or method docstring (missing-function-docstring)
r2pipe/native.py:113:0: C0115: Missing class docstring (missing-class-docstring)
r2pipe/native.py:128:4: C0116: Missing function or method docstring (missing-function-docstring)
r2pipe/native.py:130:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module r2pipe.open_async
r2pipe/open_async.py:108:0: C0301: Line too long (115/100) (line-too-long)
r2pipe/open_async.py:20:0: W0622: Redefining built-in 'open' (redefined-builtin)
r2pipe/open_async.py:20:0: C0115: Missing class docstring (missing-class-docstring)
r2pipe/open_async.py:20:0: C0103: Class name "open" doesn't conform to PascalCase naming style (invalid-name)
r2pipe/open_async.py:20:0: R0902: Too many instance attributes (9/7) (too-many-instance-attributes)
r2pipe/open_async.py:31:4: C0116: Missing function or method docstring (missing-function-docstring)
r2pipe/open_async.py:37:4: W0102: Dangerous default value [] as argument (dangerous-default-value)
r2pipe/open_async.py:38:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
r2pipe/open_async.py:68:16: W0719: Raising too general exception: Exception (broad-exception-raised)
r2pipe/open_async.py:91:4: E0202: An attribute defined in r2pipe.open_base line 115 hides this method (method-hidden)
r2pipe/open_async.py:107:20: W0719: Raising too general exception: Exception (broad-exception-raised)
r2pipe/open_async.py:116:21: W4903: Using deprecated argument loop of method create_subprocess_exec() (deprecated-argument)
r2pipe/open_async.py:135:12: C0104: Disallowed name "foo" (disallowed-name)
r2pipe/open_async.py:186:15: W0718: Catching too general exception Exception (broad-exception-caught)
r2pipe/open_async.py:156:20: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
r2pipe/open_async.py:157:20: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
r2pipe/open_async.py:208:15: W0718: Catching too general exception Exception (broad-exception-caught)
r2pipe/open_async.py:218:12: W4903: Using deprecated argument loop of method wait() (deprecated-argument)
r2pipe/open_async.py:218:12: E1123: Unexpected keyword argument 'loop' in function call (unexpected-keyword-arg)
r2pipe/open_async.py:125:12: W0201: Attribute 'process' defined outside __init__ (attribute-defined-outside-init)
************* Module r2pipe.open_base
r2pipe/open_base.py:24:4: C0103: Constant name "has_native" doesn't conform to UPPER_CASE naming style (invalid-name)
r2pipe/open_base.py:26:4: C0103: Constant name "has_native" doesn't conform to UPPER_CASE naming style (invalid-name)
r2pipe/open_base.py:30:4: E0401: Unable to import 'msvcrt' (import-error)
r2pipe/open_base.py:45:0: C0116: Missing function or method docstring (missing-function-docstring)
r2pipe/open_base.py:49:0: C0116: Missing function or method docstring (missing-function-docstring)
r2pipe/open_base.py:50:4: C0415: Import outside toplevel (collections.namedtuple) (import-outside-toplevel)
r2pipe/open_base.py:61:0: C0116: Missing function or method docstring (missing-function-docstring)
r2pipe/open_base.py:66:8: W4901: Deprecated module 'distutils.spawn' (deprecated-module)
r2pipe/open_base.py:66:8: C0415: Import outside toplevel (distutils.spawn.find_executable) (import-outside-toplevel)
r2pipe/open_base.py:72:4: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
r2pipe/open_base.py:82:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
r2pipe/open_base.py:88:0: R0205: Class 'OpenBase' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
r2pipe/open_base.py:95:4: W0102: Dangerous default value [] as argument (dangerous-default-value)
r2pipe/open_base.py:151:8: W0702: No exception type(s) specified (bare-except)
r2pipe/open_base.py:123:20: C0103: Variable name "hPipe" doesn't conform to snake_case naming style (invalid-name)
r2pipe/open_base.py:136:20: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
r2pipe/open_base.py:154:12: W0719: Raising too general exception: Exception (broad-exception-raised)
r2pipe/open_base.py:95:36: W0613: Unused argument 'flags' (unused-argument)
r2pipe/open_base.py:156:4: C0116: Missing function or method docstring (missing-function-docstring)
r2pipe/open_base.py:199:12: W0719: Raising too general exception: Exception (broad-exception-raised)
r2pipe/open_base.py:223:12: C0415: Import outside toplevel (subprocess) (import-outside-toplevel)
r2pipe/open_base.py:235:16: C0415: Import outside toplevel (asyncio) (import-outside-toplevel)
r2pipe/open_base.py:270:29: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
r2pipe/open_base.py:274:4: C0103: Method name "cmdJ" doesn't conform to snake_case naming style (invalid-name)
r2pipe/open_base.py:285:29: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
r2pipe/open_base.py:295:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
r2pipe/open_base.py:296:13: W0612: Unused variable 'err' (unused-variable)
r2pipe/open_base.py:309:29: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
r2pipe/open_base.py:201:12: W0201: Attribute 'native' defined outside __init__ (attribute-defined-outside-init)
r2pipe/open_base.py:30:4: W0611: Unused import msvcrt (unused-import)
************* Module r2pipe.open_sync
r2pipe/open_sync.py:16:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation)
r2pipe/open_sync.py:18:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation)
r2pipe/open_sync.py:19:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation)
r2pipe/open_sync.py:21:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation)
r2pipe/open_sync.py:22:0: W0311: Bad indentation. Found 2 spaces, expected 4 (bad-indentation)
r2pipe/open_sync.py:58:0: C0301: Line too long (105/100) (line-too-long)
r2pipe/open_sync.py:136:0: C0301: Line too long (118/100) (line-too-long)
r2pipe/open_sync.py:31:0: W0622: Redefining built-in 'open' (redefined-builtin)
r2pipe/open_sync.py:15:0: C0116: Missing function or method docstring (missing-function-docstring)
r2pipe/open_sync.py:20:0: W0702: No exception type(s) specified (bare-except)
r2pipe/open_sync.py:31:0: C0115: Missing class docstring (missing-class-docstring)
r2pipe/open_sync.py:31:0: C0103: Class name "open" doesn't conform to PascalCase naming style (invalid-name)
r2pipe/open_sync.py:34:4: E0302: The special method '__exit__' expects 3 param(s), 0 was given (unexpected-special-method-signature)
r2pipe/open_sync.py:36:4: W0102: Dangerous default value [] as argument (dangerous-default-value)
r2pipe/open_sync.py:37:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
r2pipe/open_sync.py:49:16: W0719: Raising too general exception: Exception (broad-exception-raised)
r2pipe/open_sync.py:57:20: W0719: Raising too general exception: Exception (broad-exception-raised)
r2pipe/open_sync.py:76:16: W0707: Consider explicitly re-raising using 'except Exception as exc' and 'raise Exception('ERROR: Cannot find radare2 in PATH') from exc' (raise-missing-from)
r2pipe/open_sync.py:76:16: W0719: Raising too general exception: Exception (broad-exception-raised)
r2pipe/open_sync.py:92:20: W0707: Consider explicitly re-raising using 'except Exception as exc' and 'raise Exception('ERROR: Cannot open %s' % filename) from exc' (raise-missing-from)
r2pipe/open_sync.py:92:20: W0719: Raising too general exception: Exception (broad-exception-raised)
r2pipe/open_sync.py:92:36: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
r2pipe/open_sync.py:36:4: R0912: Too many branches (16/12) (too-many-branches)
r2pipe/open_sync.py:72:31: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
r2pipe/open_sync.py:104:8: C0415: Import outside toplevel (msvcrt) (import-outside-toplevel)
r2pipe/open_sync.py:104:8: E0401: Unable to import 'msvcrt' (import-error)
r2pipe/open_sync.py:105:8: C0415: Import outside toplevel (ctypes.windll, ctypes.byref) (import-outside-toplevel)
r2pipe/open_sync.py:106:8: C0415: Import outside toplevel (ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD, ctypes.wintypes.BOOL) (import-outside-toplevel)
r2pipe/open_sync.py:110:8: W0702: No exception type(s) specified (bare-except)
r2pipe/open_sync.py:109:12: C0415: Import outside toplevel (ctypes.POINTER) (import-outside-toplevel)
r2pipe/open_sync.py:111:12: C0415: Import outside toplevel (ctypes.wintypes.POINTER) (import-outside-toplevel)
r2pipe/open_sync.py:113:8: C0103: Variable name "LPDWORD" doesn't conform to snake_case naming style (invalid-name)
r2pipe/open_sync.py:114:8: C0103: Variable name "SetNamedPipeHandleState" doesn't conform to snake_case naming style (invalid-name)
r2pipe/open_sync.py:120:8: C0103: Variable name "PIPE_NOWAIT" doesn't conform to snake_case naming style (invalid-name)
r2pipe/open_sync.py:128:8: W0702: No exception type(s) specified (bare-except)
r2pipe/open_sync.py:133:8: C0104: Disallowed name "foo" (disallowed-name)
r2pipe/open_sync.py:161:12: W0702: No exception type(s) specified (bare-except)
r2pipe/open_sync.py:140:20: C0104: Disallowed name "foo" (disallowed-name)
r2pipe/open_sync.py:143:20: C0104: Disallowed name "foo" (disallowed-name)
r2pipe/open_sync.py:146:28: C0104: Disallowed name "foo" (disallowed-name)
r2pipe/open_sync.py:124:4: R0912: Too many branches (13/12) (too-many-branches)
r2pipe/open_sync.py:168:31: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
r2pipe/open_sync.py:95:4: W0238: Unused private member `open.__make_non_blocking(fd)` (unused-private-member)
r2pipe/open_sync.py:1:0: R0801: Similar lines in 2 files
==r2pipe.open_async:[61:69]
==r2pipe.open_sync:[44:49]
self.uri = filename[8:]
elif filename.startswith("tcp://"):
r = re.match(r"tcp://(\d+\.\d+.\d+.\d+):(\d+)/?", filename)
if not r:
raise Exception("String doesn't match tcp format") (duplicate-code)
------------------------------------------------------------------
Your code has been rated at 7.86/10 (previous run: 7.86/10, +0.00)