1. Arnaud Grausem
  2. adama


Arnaud Grausem  committed e205d7e

pep8 check

  • Participants
  • Parent commits e91ab74
  • Branches default
  • Tags 0.3.2

Comments (0)

Files changed (7)

File src/adama/__init__.py

View file
 def sir_yes_sir(module='', doc='', options=(), version='', argv=None):
-    """Launches the right order or displaying the help for a command or an order
-    directly from command line.
+    """Launches the right order or displaying the help for a command or an
+    order directly from command line.
     argv = argv if argv is not None else sys.argv[:]
     command = os.path.basename(argv[0])
                 return order(argv[2:])
 def call_order(module_name, order_name, *args, **kwargs):
     """Calls an order from another python script directly

File src/adama/commandment.py

View file
             result = order_error()
         return result
 class Commander(QG):
     """Program class
-        create_help = "\n\nType 'adama create_order [options] {0} <order_name>'\
+        create_help = "\n\nType 'adama create_order [options] {0} <order_name>\
  to create one".format(self.module)
         # Formats the epilog
         decrypter.epilog = epilog.format(
             available_orders = "No orders available."
         return available.format(available_orders)
     def execute(self):
         return self.usage()
     def __init__(self, module, command=''):
         super(BaseOrder, self).__init__(module, command=command)
-        self.name = self.__class__.__module__.split('.')[-1] \
+        self.name = self.__class__.__module__.split('.')[-1]
     def usage(self):
         """Usage of a command

File src/adama/orders/__init__.py

View file
     with file(filename, 'a'):
         os.utime(filename, times)

File src/adama/orders/create_program.py

View file
 from ..commandment import BaseOrder
 from . import get_module, get_template, get_command
 class Order(BaseOrder):
     """Creates a command line program for your application that will look for

File src/adama/tests/__init__.py

View file
     """No shell printing for help when lauching tests
     print_functions = (QG.explanations, AdamaError.__call__)
     def wrap(**kwargs):
         """Wrapper for the printing function"""
         for function in print_functions:
         for function in print_functions:
             function.im_func.func_defaults = (True, )
         return result
     return wrap

File src/adama/tests/test_orders.py

View file
         with self.assertRaises(OrderError) as order_error:
             call_order('adama', 'create_program')
         exception = order_error.exception
-        assert exception.message == 'The create_program order has one required \
+        assert exception.message == 'The create_program order has one required\
+ argument'
     def test_command_name(self):
         """Tests creating a command with a name defined

File src/adama/tests/test_parsing_args.py

View file
     """Tests the help message and the way they are displayed
     def test_no_args(self):
         """No argument shell return
     def test_order_execution(self):
         """Order executed shell return
-        assert _sir_yes_sir(module=self.module, argv=[self.command, 'add']) == 0
+        assert _sir_yes_sir(module=self.module, argv=[self.command, 'add']) \
+            == 0
 class TestDirectLaunchOrder(TestBaseOrders):