Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pyromaths
pyromaths
Commits
8c43e493
Commit
8c43e493
authored
Aug 13, 2015
by
Louis
Browse files
Simplification des identifiants des exercices
parent
59b26c1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/testexo.py
View file @
8c43e493
...
...
@@ -253,15 +253,10 @@ def do_lsexos(__options):
"""Perform the `lsexos` command."""
def
iter_names
():
for
exo
in
match_exercise
():
if
issubclass
(
exo
,
pyromaths
.
ex
.
LegacyExercise
):
name
=
exo
.
function
[
0
].
__name__
elif
issubclass
(
exo
,
pyromaths
.
ex
.
TexExercise
):
name
=
exo
.
__name__
for
level
in
exo
.
level
:
yield
u
"{}.{}"
.
format
(
level
,
name
)
yield
u
"{}.{}"
.
format
(
exo
.
dirlevel
,
exo
.
name
(),
)
for
name
in
sorted
(
iter_names
()):
print
(
name
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment