summaryrefslogtreecommitdiff
path: root/examples/tab_autocompletion.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-12-06 12:29:29 -0500
committerGitHub <noreply@github.com>2018-12-06 12:29:29 -0500
commitea182bbea386288b1acfbc35c99243a457ff1036 (patch)
treed3641a78217bbb79cbe039f80648b44b2fbdd0a4 /examples/tab_autocompletion.py
parent709af49a7f161c98260cc5ddda736987fb0f1f23 (diff)
parent9d90c1eb57c62ba1fcd8e470fa2e27248e1e9064 (diff)
downloadcmd2-git-ea182bbea386288b1acfbc35c99243a457ff1036.tar.gz
Merge pull request #607 from python-cmd2/flake8
Fix flake8 issues
Diffstat (limited to 'examples/tab_autocompletion.py')
-rwxr-xr-xexamples/tab_autocompletion.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/examples/tab_autocompletion.py b/examples/tab_autocompletion.py
index dad9e90d..1c578c72 100755
--- a/examples/tab_autocompletion.py
+++ b/examples/tab_autocompletion.py
@@ -59,10 +59,10 @@ class TabCompleteExample(cmd2.Cmd):
'Alec Guinness', 'Peter Mayhew', 'Anthony Daniels']
},
'SW_EP1': {'title': 'Star Wars: Episode I - The Phantom Menace',
- 'rating': 'PG',
- 'director': ['George Lucas'],
- 'actor': ['Liam Neeson', 'Ewan McGregor', 'Natalie Portman', 'Jake Lloyd']
- },
+ 'rating': 'PG',
+ 'director': ['George Lucas'],
+ 'actor': ['Liam Neeson', 'Ewan McGregor', 'Natalie Portman', 'Jake Lloyd']
+ },
'SW_EP02': {'title': 'Star Wars: Episode II - Attack of the Clones',
'rating': 'PG',
'director': ['George Lucas'],
@@ -79,21 +79,21 @@ class TabCompleteExample(cmd2.Cmd):
}
USER_SHOW_LIBRARY = {'SW_REB': ['S01E01', 'S02E02']}
SHOW_DATABASE_IDS = ['SW_CW', 'SW_TCW', 'SW_REB']
- SHOW_DATABASE = {'SW_CW': {'title': 'Star Wars: Clone Wars',
- 'rating': 'TV-Y7',
- 'seasons': {1: ['S01E01', 'S01E02', 'S01E03'],
- 2: ['S02E01', 'S02E02', 'S02E03']}
- },
- 'SW_TCW': {'title': 'Star Wars: The Clone Wars',
- 'rating': 'TV-PG',
- 'seasons': {1: ['S01E01', 'S01E02', 'S01E03'],
- 2: ['S02E01', 'S02E02', 'S02E03']}
- },
- 'SW_REB': {'title': 'Star Wars: Rebels',
- 'rating': 'TV-Y7',
- 'seasons': {1: ['S01E01', 'S01E02', 'S01E03'],
- 2: ['S02E01', 'S02E02', 'S02E03']}
- },
+ SHOW_DATABASE = {'SW_CW': {'title': 'Star Wars: Clone Wars',
+ 'rating': 'TV-Y7',
+ 'seasons': {1: ['S01E01', 'S01E02', 'S01E03'],
+ 2: ['S02E01', 'S02E02', 'S02E03']}
+ },
+ 'SW_TCW': {'title': 'Star Wars: The Clone Wars',
+ 'rating': 'TV-PG',
+ 'seasons': {1: ['S01E01', 'S01E02', 'S01E03'],
+ 2: ['S02E01', 'S02E02', 'S02E03']}
+ },
+ 'SW_REB': {'title': 'Star Wars: Rebels',
+ 'rating': 'TV-Y7',
+ 'seasons': {1: ['S01E01', 'S01E02', 'S01E03'],
+ 2: ['S02E01', 'S02E02', 'S02E03']}
+ },
}
file_list = \
@@ -299,7 +299,8 @@ class TabCompleteExample(cmd2.Cmd):
', '.join(movie['director']),
'\n '.join(movie['actor'])))
elif args.command == 'add':
- print('Adding Movie\n----------------\nTitle: {}\nRating: {}\nDirectors: {}\nActors: {}\n\n'.format(args.title, args.rating, ', '.join(args.director), ', '.join(args.actor)))
+ print('Adding Movie\n----------------\nTitle: {}\nRating: {}\nDirectors: {}\nActors: {}\n\n'
+ .format(args.title, args.rating, ', '.join(args.director), ', '.join(args.actor)))
def _do_media_shows(self, args) -> None:
if not args.command:
@@ -367,7 +368,6 @@ class TabCompleteExample(cmd2.Cmd):
# No subcommand was provided, so call help
self.do_help('media')
-
# This completer is implemented using a single dictionary to look up completion lists for all layers of
# subcommands. For each argument, AutoCompleter will search for completion values from the provided
# arg_choices dict. This requires careful naming of argparse arguments so that there are no unintentional