From a680b2f78891692be215013481e167da2fffb5d8 Mon Sep 17 00:00:00 2001 From: Denise sur Lya Date: Tue, 16 Feb 2021 14:24:18 +0100 Subject: =?UTF-8?q?nettoyage=20du=20code=20+=20passage=20en=20"d=C3=A9faut?= =?UTF-8?q?"=20de=20la=20grille=20am=C3=A9lior=C3=A9e=20(am=C3=A9lior?= =?UTF-8?q?=C3=A9e).=20Correction=20d'un=20l=C3=A9ger=20bug=20sur=20l'?= =?UTF-8?q?=C3=A9chelle=20en=20y.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion_unites.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gestion_unites.py') diff --git a/gestion_unites.py b/gestion_unites.py index b97d90b..d4089bd 100644 --- a/gestion_unites.py +++ b/gestion_unites.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- from configuration import CONFIG -from gestion_erreurs import * +from gestion_erreurs import warning ##################### outils pour affichage et choix de l'unité @@ -31,7 +31,7 @@ def choix_echelle_data(typedonnees, donneemax): if donneemax>15: return (5,1) elif donneemax > 10: - return (2,1) + return (1,0.5) else: return (1,0.2) if typedonnees == "taille": @@ -53,25 +53,25 @@ def choix_echelle_temps(unite, tempsmaxi): if unite=="jours": if tempsmaxi > 60: # pourquoi mettre en jours ? return (30,1) - elif tempsmaxi >20: + elif tempsmaxi >15: return (7,1) else: return (1,0) if unite=="semaines": if tempsmaxi >50: return (5,1) - elif tempsmaxi > 15: + elif tempsmaxi > 10: return (2,1) else: return (1,1/7) # On met en jours if unite=="mois": - if tempsmaxi > 30: - return (2,1) + if tempsmaxi > 24: + return (12,1) elif tempsmaxi > 10: return (1,0) else: - return (1,0.25) # on met en semaines + return (1,0.25) # on met en semaines à peu près (quart de mois) if unite=="années": return (1,1/12) # années / mois -- cgit v1.2.3