Commit 8795c5b8 authored by Delvallez Delvallez's avatar Delvallez Delvallez

extension des outil pour full_replace

parent 5a516e07
...@@ -32,10 +32,12 @@ def image_ou_blanche(chemin, taille): ...@@ -32,10 +32,12 @@ def image_ou_blanche(chemin, taille):
def perturbation_type(pert): def perturbation_type(pert):
if "->" in pert: if "->" in pert:
return "replace" return "replace"
if pert[0] == "+": elif pert[0] == "+":
return "append" return "append"
if pert[-1] =="+": elif pert[-1] =="+":
return "prepend" return "prepend"
elif pert == "full_replace":
return "full_replace"
raise RuntimeWarning("Unreachable") raise RuntimeWarning("Unreachable")
...@@ -261,7 +263,7 @@ def main(): ...@@ -261,7 +263,7 @@ def main():
parser.add_argument( parser.add_argument(
"-p", "-p",
"--pert_type", "--pert_type",
choices=["all", "replace", "append", "prepend"], choices=["all", "replace", "append", "prepend", "full_replace"],
default="all", default="all",
help=( help=(
"Restreindre la place à un certain type de perturbation." "Restreindre la place à un certain type de perturbation."
......
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