Skip to content
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

Made inspect_module.py compatible with PEP 8 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions examples/inspect_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
mod.add_keyword(word)
dcfile.parse_dcfile(mod, 'simple_example.dc')

print() # Newline after prompt
print() # Newline after prompt

# Inspect python imports
print('Imports')
Expand All @@ -26,16 +26,18 @@
for suffix in suffixes:
print(' ' + base_class + suffix)

print() # Newline after imports
print() # Newline after imports

# Inspect module keywords
print('Keywords')
for keyword_num in range(0, mod.num_keywords()):
print(' ' + mod.get_keyword(keyword_num))

print() # Newline after keywords
print() # Newline after keywords

# Helper functions for printing complex types


def print_type(typ, indent):
tab = ' ' * indent
subtype = typ.subtype()
Expand Down Expand Up @@ -69,10 +71,10 @@ def print_type(typ, indent):
print(' ' + field.name() + ' : ' + field.type().to_string())
print_type(field.type(), 3)

print() # Newline after classes
print() # Newline after classes

print('Fields-By-Id')
for i in range(0, 6):
print(' %s - %s' % (i, mod.field_by_id(i).name()))

print() # Newline before prompt
print() # Newline before prompt