Skip to content

Latest commit

 

History

History
executable file
·
129 lines (100 loc) · 5.54 KB

File metadata and controls

executable file
·
129 lines (100 loc) · 5.54 KB

PyPi version Python 3


Logo

FoolProof

Trouvez toutes les exceptions que votre code et ses dépendances peuvent générer, afin de rendre votre code infaillible !


Report Bug

Introduction

Connaissez-vous "l'effet démo" ? Le fait que votre code dûment testé échoue soudainement dès que vous le montrez à quelqu'un ? Souvent, c'est parce que vous avez oublié de gérer une exception à laquelle vous n'aviez pas pensé.

🪨 FoolProof identifie automatiquement les exceptions que votre code et ses dépendances peuvent déclencher, afin que vous ne soyez plus jamais pris au dépourvu !

(retour en haut)

Pour commencer

foolproof est très simple à utiliser.

Installer foolproof avec pip :

pip install foolproof

Pour analyser un module entier mypackage, avec toutes les fonctions et méthodes qu'il contient, ajoutez ces lignes au début de votre code :

import mypackage
import foolproof

foolproof(mypackage)

Vous pouvez également l'utiliser directement sur une fonction :

import foolproof
from mypackage import main

foolproof(main)

(retour en haut)

Contributing

Ideally, I would like to add more features to foolproof, but I don't have much time for it. If you want to contribute, you're more than welcome to do so!

Roadmap/todo

Task Importance Difficulty Contributor on it Description
Adding links to file 5/5 5/5 - More than printing the raise command, we should print the link to the file in which the raise is used. This implies a major rework of foolproof, as the python ast does not keep the link between ast nodes and files.

(back to top)

How to contribute

Contributing is an awesome way to learn, inspire, and help others. Any contributions you make are greatly appreciated, even if it's just about styling and best practices.

If you have a suggestion that would make this project better, please fork the repo and create a pull request.
Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/YourAmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Auteur

Cette librairie a été crée par Nicolas MICAUX.

Remerciements

Une grande partie de ce code provient de https://github.com/DontShaveTheYak/deep-ast (https://pypi.org/project/deep-ast/)
Licence : GNU General Public License v3 (GPLv3)
Tous les crédits vont à Levi Blaney - @shady_cuz, shadycuz@gmail.com