Giter Site home page Giter Site logo

pylinters's Introduction

pylinters

Uso de distintos linters para mejorar la calidad del código en python1.

Este paquete está diseñado para ejecutar distintos linters con características específicas23, los cuales son:

  1. flake8.
  2. pylint.
  3. pydocstyle (Se utiliza la convención numpy4).
  4. mypy (Ignora librerías perdidas5).

Instalación

Para instalar la versión más reciente de pylinters usando pip:

  1. Descargar el archivo .tar.gz mediante el siguiente link.

  2. Ejecutar el comando:

     $ pip install pylinters.tar.gz
    

Si se desea instalar para desarrollo, ejecutar lo siguiente:

$ git clone https://github.com/lobogral/pylinters.git
$ cd pylinters
$ pip install -e .

Ejecución

Existen 2 formas de ejecutar el código:

  1. Estándar, útil para revisar código de paquetes, utiliza flake8, pylint, pydocstyle, mypy.

     $ pylinters codigo.py
    
  2. No documentación, útil para revisar códigos simples, utiliza flake8, pylint, mypy.

     $ pylinters --no-docs codigo.py
    

Footnotes

  1. https://realpython.com/python-pep8/

  2. https://realpython.com/python-code-quality/

  3. https://medium.com/@gonzaloandres.diaz/escribiendo-codigo-de-alta-calidad-en-python-parte-2-linters-64ffd8d2df91

  4. https://stackoverflow.com/questions/42123798/is-there-any-way-to-lint-a-python-file-to-check-for-numpy-documentation-style-ad

  5. https://stackoverflow.com/questions/57785471/why-does-mypy-think-library-imports-are-missing

pylinters's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.