bonjour ,
J'ai donc installer pylint :
- pip install pylint
- la version Graphviz2.38
Via powershell -windows 10: sur le répertoire du code je lancer la commande
Pyreverse -o png citroen_DS.py
Malheureusement il me retourne ceci
The output format 'png' is currently not available.
Please install 'Graphviz' to have other output formats than 'dot' or 'vcg'
J'ai vérifier que le path avait bien Graphviz2.38\bin , j'ai même refait l'installation
mais visiblement la conversion ver png le ne fait pas
Autre point sur citroen_ds.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
class CitroenDs(Voiture, Citroen):
def __init__(self):
Voiture.__init__(self)
Citroen.__init__(self)
self.modele = "DS moderne (>2000)"
self._option_payante_ds_01 = False
self._option_payante_ds_02 = False
self._option_payante_ds_03 = False
self.__option_calculateur_ds_01 = False
self.__option_calculateur_ds_02 = False
self.__option_calculateur_ds_03 = False
self.start_options()
self.cb = CB()
def __del__(self):
print("Suppression de la voiture")
def start_options(self):
if _option_payante_ds_01:
print("GPS activé")
if _option_payante_ds_02:
print("Anti dépassement lignes blanches activé")
if _option_payante_ds_03:
print("Freinage urgence activé")
if __option_calculateur_ds_01:
print("Puissance moteur: 120 cv")
elif __option_calculateur_ds_02:
print("Puissance moteur: 150 cv")
elif __option_calculateur_ds_03:
print("Puissance moteur: 180 cv")
if __name__ == "__main__":
ma_ds = CitroenDs()
print(ma_ds.marque)
print(ma_ds.modele)
print(ma_ds.type_suspension)
print(ma_ds.statut_moteur())
ma_ds.start_moteur()
print(ma_ds.statut_moteur()) |
sur def start_options(self): ici en rouge
éclipse semble frustré
_option_payante_ds_01 ... tous ces variable sont indéfinies
ce qui semble logique en soit ne faudrait il pas avoir self._option_payante_ds_01 ......
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| def start_options(self):
if self._option_payante_ds_01:
print("GPS activé")
if self._option_payante_ds_02:
print("Anti dépassement lignes blanches activé")
if self._option_payante_ds_03:
print("Freinage urgence activé")
if self.__option_calculateur_ds_01:
print("Puissance moteur: 120 cv")
elif self.__option_calculateur_ds_02:
print("Puissance moteur: 150 cv")
elif self.__option_calculateur_ds_03:
print("Puissance moteur: 180 cv") |
0 |
0 |