New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add typing hints everywhere #155
Conversation
return execute_adb_command2('shell %s' % adb_cmd, piped_into_cmd=piped_into_cmd, | ||
ignore_stderr=ignore_stderr, device_serial=device_serial) | ||
|
||
|
||
def execute_adb_command2(adb_cmd, piped_into_cmd=None, ignore_stderr=False, device_serial=None) -> [int, str, str]: | ||
def execute_adb_command2( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.
@@ -1406,7 +1418,7 @@ def _get_permissions_info_below_api_23(app_info_dump): | |||
|
|||
|
|||
# API 23 and have runtime permissions | |||
def _get_permissions_info_above_api_23(app_info_dump): | |||
def _get_permissions_info_above_api_23(app_info_dump: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed.
@@ -1242,7 +1254,7 @@ def move_file(src_path, dest_path, force): | |||
|
|||
# Copies from remote_file_path on Android to local_file_path on the disk | |||
# local_file_path can be None | |||
def pull_file(remote_file_path, local_file_path, copy_ancillary=False): | |||
def pull_file(remote_file_path: str, local_file_path: str, copy_ancillary: bool = False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
|
||
# This code has to be in a separate file since it is conditionally loaded for Python 3.5 and later. | ||
|
||
# Executes method method_to_call for each argument in params_list and returns the result_list | ||
def execute_in_parallel(method_to_call, params_list): | ||
def execute_in_parallel(method_to_call: typing.Callable, params_list: typing.List): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line too long (83 > 79 characters)
@@ -104,14 +105,16 @@ def execute_adb_command2(adb_cmd, piped_into_cmd=None, ignore_stderr=False, devi | |||
print_error_and_exit('stdout_data is weird type: %s' % type(stdout_data)) | |||
|
|||
|
|||
def execute_adb_shell_command(adb_cmd, piped_into_cmd=None, ignore_stderr=False, device_serial=None): | |||
def execute_adb_shell_command(adb_cmd: str, piped_into_cmd: str = None, ignore_stderr: bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line too long (100 > 79 characters)
Code Climate has analyzed commit 722434a and detected 15 issues on this pull request. Here's the issue category breakdown:
Note: there are 3 critical issues. View more on Code Climate. |
Obsolete. Closing for now. |
No description provided.