Browse Source

Remove unused global_options arg from dispatch()

Signed-off-by: Aanand Prasad <[email protected]>
Aanand Prasad 9 years ago
parent
commit
575b48749d
2 changed files with 7 additions and 7 deletions
  1. 4 4
      compose/cli/docopt_command.py
  2. 3 3
      tests/unit/cli_test.py

+ 4 - 4
compose/cli/docopt_command.py

@@ -20,12 +20,12 @@ class DocoptCommand(object):
         return {'options_first': True}
 
     def sys_dispatch(self):
-        self.dispatch(sys.argv[1:], None)
+        self.dispatch(sys.argv[1:])
 
-    def dispatch(self, argv, global_options):
-        self.perform_command(*self.parse(argv, global_options))
+    def dispatch(self, argv):
+        self.perform_command(*self.parse(argv))
 
-    def parse(self, argv, global_options):
+    def parse(self, argv):
         options = docopt_full_help(getdoc(self), argv, **self.docopt_options())
         command = options['COMMAND']
 

+ 3 - 3
tests/unit/cli_test.py

@@ -66,17 +66,17 @@ class CLITestCase(unittest.TestCase):
     def test_help(self):
         command = TopLevelCommand()
         with self.assertRaises(SystemExit):
-            command.dispatch(['-h'], None)
+            command.dispatch(['-h'])
 
     def test_command_help(self):
         with self.assertRaises(SystemExit) as ctx:
-            TopLevelCommand().dispatch(['help', 'up'], None)
+            TopLevelCommand().dispatch(['help', 'up'])
 
         self.assertIn('Usage: up', str(ctx.exception))
 
     def test_command_help_nonexistent(self):
         with self.assertRaises(NoSuchCommand):
-            TopLevelCommand().dispatch(['help', 'nonexistent'], None)
+            TopLevelCommand().dispatch(['help', 'nonexistent'])
 
     @pytest.mark.xfail(IS_WINDOWS_PLATFORM, reason="requires dockerpty")
     @mock.patch('compose.cli.main.RunOperation', autospec=True)