Skip to content

Commit

Permalink
pep8 prefers triple quoted with double quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
grimreaper committed Sep 18, 2016
1 parent f7811c1 commit 266ef88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/etc/debugger_pretty_printers_common.py
Expand Up @@ -328,7 +328,7 @@ def extract_length_and_ptr_from_slice(slice_val):
UNQUALIFIED_TYPE_MARKERS = frozenset(["(", "[", "&", "*"])

def extract_type_name(qualified_type_name):
'''Extracts the type name from a fully qualified path'''
"""Extracts the type name from a fully qualified path"""
if qualified_type_name[0] in UNQUALIFIED_TYPE_MARKERS:
return qualified_type_name

Expand Down
6 changes: 3 additions & 3 deletions src/etc/lldb_batchmode.py
Expand Up @@ -37,14 +37,14 @@


def print_debug(s):
"Print something if DEBUG_OUTPUT is True"
"""Print something if DEBUG_OUTPUT is True"""
global DEBUG_OUTPUT
if DEBUG_OUTPUT:
print("DEBUG: " + str(s))


def normalize_whitespace(s):
"Replace newlines, tabs, multiple spaces, etc with exactly one space"
"""Replace newlines, tabs, multiple spaces, etc with exactly one space"""
return re.sub("\s+", " ", s)


Expand All @@ -71,7 +71,7 @@ def breakpoint_callback(frame, bp_loc, dict):


def execute_command(command_interpreter, command):
"Executes a single CLI command"
"""Executes a single CLI command"""
global new_breakpoints
global registered_breakpoints

Expand Down
10 changes: 5 additions & 5 deletions src/etc/lldb_rust_formatters.py
Expand Up @@ -171,10 +171,10 @@ def print_val(lldb_val, internal_dict):
#=--------------------------------------------------------------------------------------------------

def print_struct_val(val, internal_dict, omit_first_field, omit_type_name, is_tuple_like):
'''
"""
Prints a struct, tuple, or tuple struct value with Rust syntax.
Ignores any fields before field_start_index.
'''
"""
assert val.type.get_dwarf_type_kind() == rustpp.DWARF_TYPE_CODE_STRUCT

if omit_type_name:
Expand Down Expand Up @@ -221,7 +221,7 @@ def render_child(child_index):
"body": body}

def print_pointer_val(val, internal_dict):
'''Prints a pointer value with Rust syntax'''
"""Prints a pointer value with Rust syntax"""
assert val.type.get_dwarf_type_kind() == rustpp.DWARF_TYPE_CODE_PTR
sigil = "&"
type_name = val.type.get_unqualified_type_name()
Expand Down Expand Up @@ -275,8 +275,8 @@ def print_std_string_val(val, internal_dict):
#=--------------------------------------------------------------------------------------------------

def print_array_of_values(array_name, data_ptr_val, length, internal_dict):
'''Prints a contigous memory range, interpreting it as values of the
pointee-type of data_ptr_val.'''
"""Prints a contigous memory range, interpreting it as values of the
pointee-type of data_ptr_val."""

data_ptr_type = data_ptr_val.type
assert data_ptr_type.get_dwarf_type_kind() == rustpp.DWARF_TYPE_CODE_PTR
Expand Down

0 comments on commit 266ef88

Please sign in to comment.