Commit 49851cae authored by Stefan Behnel's avatar Stefan Behnel

Reorder options in Jupyter magic to show most common ones first in the help page.

parent f6822a4e
...@@ -177,9 +177,12 @@ class CythonMagics(Magics): ...@@ -177,9 +177,12 @@ class CythonMagics(Magics):
@magic_arguments.magic_arguments() @magic_arguments.magic_arguments()
@magic_arguments.argument( @magic_arguments.argument(
'--pgo', dest='pgo', action='store_true', default=False, '-a', '--annotate', action='store_true', default=False,
help=("Enable profile guided optimisation in the C compiler. " help="Produce a colorized HTML version of the source."
"Compiles the cell twice and executes it in between to generate a runtime profile.") )
@magic_arguments.argument(
'-+', '--cplus', action='store_true', default=False,
help="Output a C++ rather than C file."
) )
@magic_arguments.argument( @magic_arguments.argument(
'-3', dest='language_level', action='store_const', const=3, default=None, '-3', dest='language_level', action='store_const', const=3, default=None,
...@@ -189,6 +192,11 @@ class CythonMagics(Magics): ...@@ -189,6 +192,11 @@ class CythonMagics(Magics):
'-2', dest='language_level', action='store_const', const=2, default=None, '-2', dest='language_level', action='store_const', const=2, default=None,
help="Select Python 2 syntax." help="Select Python 2 syntax."
) )
@magic_arguments.argument(
'-f', '--force', action='store_true', default=False,
help="Force the compilation of a new module, even if the source has been "
"previously compiled."
)
@magic_arguments.argument( @magic_arguments.argument(
'-c', '--compile-args', action='append', default=[], '-c', '--compile-args', action='append', default=[],
help="Extra flags to pass to compiler via the `extra_compile_args` " help="Extra flags to pass to compiler via the `extra_compile_args` "
...@@ -224,17 +232,9 @@ class CythonMagics(Magics): ...@@ -224,17 +232,9 @@ class CythonMagics(Magics):
"multiple times)." "multiple times)."
) )
@magic_arguments.argument( @magic_arguments.argument(
'-+', '--cplus', action='store_true', default=False, '--pgo', dest='pgo', action='store_true', default=False,
help="Output a C++ rather than C file." help=("Enable profile guided optimisation in the C compiler. "
) "Compiles the cell twice and executes it in between to generate a runtime profile.")
@magic_arguments.argument(
'-f', '--force', action='store_true', default=False,
help="Force the compilation of a new module, even if the source has been "
"previously compiled."
)
@magic_arguments.argument(
'-a', '--annotate', action='store_true', default=False,
help="Produce a colorized HTML version of the source."
) )
@cell_magic @cell_magic
def cython(self, line, cell): def cython(self, line, cell):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment