yala


Nameyala JSON
Version 3.2.0 PyPI version JSON
download
home_pagehttps://github.com/cemsbr/yala
SummaryYet Another Linter Aggregator
upload_time2023-01-30 07:33:52
maintainer
docs_urlNone
authorCarlos Eduardo Moreira dos Santos
requires_python
licenseMIT
keywords linter check quality
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            YALA - Yet Another Linter Aggregator
====================================

|build| |coveralls| |codecov| |codacy| |issue_time|

|version| |downloads|

YALA combines many linters to improve the quality of your code. Other projects may come to your mind, but does anyone have all the features below?

Works with latest linters
    Yala uses linters' outputs and doesn't break when their APIs change.
Same defaults
    No changes to linters' default configuration.
Easy to configure
    Set any command-line option for any linter (even pylint!) in setup.cfg.
Fast
    Run linters in parallel.

Current Status
--------------
Currently supported Python tools:

- `Flake8 <https://pypi.org/project/flake8/>`_
- `Isort <https://pypi.org/project/isort/>`_
- `MyPy <http://www.mypy-lang.org/>`_
- `Pycodestyle <https://pycodestyle.readthedocs.io/>`_
- `Pydocstyle <http://pydocstyle.org/>`_
- `Pyflakes <https://pypi.org/project/pyflakes/>`_
- `Pylint <http://pylint.pycqa.org/>`_
- `Radon <https://radon.readthedocs.org/>`_
- `Black <https://black.readthedocs.io/>`_


Install
-------
Tested with Python >= 3.6. You can specify multiple linters separated by commas:

- ``yala`` installs isort, pycodestyle, and pylint (minimal install);
- ``yala[all]`` adds *mypy*, *pydocstyle*, *pyflakes*, and *radon*;
- ``yala[all,flake8]`` also adds *flake8*;

.. code-block:: bash

  # Minimal: isort, pycodestyle and pylint
  sudo pip3 install --upgrade yala
  # OR (almost) all supported linters
  sudo pip3 install --upgrade yala[all]
  # OR choose your linters (+isort, pycodestyle and pylint)
  sudo pip3 install --upgrade yala[mypy,radon]

If you are willing to hack yala's code, run the command below in this README's folder:

.. code-block:: sh

  # Use pip
  sudo pip3 install --editable .[all,dev]
  # OR pipenv
  pipenv sync --dev


Usage
-----
Just call ``yala`` followed by the files and/or folders to lint.


Configuration
-------------

Besides the standard configuration files of each linter, as in their docs, you can specify any command-line option in *setup.cfg* with yala.

Writing command-line arguments for linters in *setup.cfg* is particularly useful for *pylint* because it ignores *setup.cfg* and requires you to write an extra file. Now, you don't have to.

The default configuration file is in ``yala/setup.cfg``. You can copy it to your project's root folder and customize it. If you need other configuration for a nested directory, just create another file there.


Linters' options
................

For example, to disable a specific pylint warning and output grades C and lower for Radon Maintainability Index (default is D or worse), add the following to *setup.cfg*:

.. code-block:: ini

  [yala]
  pylint args = --disable=TODO
  radon mi args = --min C

Besides `pylint`, you can define CLI options for `isort`, `pycodestyle`, `pydocstyle`, etc (the names are exactly as they are called in command line).


Choosing linters
................

All supported and installed linters are enabled by default.

You can customize the linters in *setup.cfg* by either:

.. code-block:: ini

  [yala]
  linters = isort, pycodestyle

or

.. code-block:: ini

  [yala]
  linters = 
    isort
    pycodestyle

Or even a mix of both: multiple linters in multiple lines.


Example
.......

Run pydocstyle and pylint without missing-docstring errors (besides isort,
pycodestyle, and pylint that are installed by default):

.. code-block:: sh

  pip install --upgrade yala[pydocstyle]

.. code-block:: ini

   [pydocstyle]
   add-ignore = D1

   [yala]
   pylint args = --disable=C0114,C0115,C0116


If you're using `black` with `isort`, `pycodestyle` and `flake8`, make sure to set options that won't conflict, for instance:

.. code-block:: ini

  [isort]
  profile=black

  [pycodestyle]
  max-line-length = 88

  [flake8]
  max-line-length = 88


Hacking: Adding a linter
------------------------
Check the file *yala/linters.py* and feel free to ask for help.


.. |build| image:: https://travis-ci.org/cemsbr/yala.svg?branch=master
          :target: https://travis-ci.org/cemsbr/yala

.. |coveralls| image:: https://coveralls.io/repos/github/cemsbr/yala/badge.svg?branch=master
              :target: https://coveralls.io/github/cemsbr/yala?branch=master

.. |codecov| image:: https://codecov.io/gh/cemsbr/yala/branch/master/graph/badge.svg
            :target: https://codecov.io/gh/cemsbr/yala

.. |codacy| image:: https://app.codacy.com/project/badge/Grade/30067434a90c41c097fdf83ce6a1b677
           :target: https://www.codacy.com/gh/cemsbr/yala/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cemsbr/yala&amp;utm_campaign=Badge_Grade

.. |issue_time| image:: http://isitmaintained.com/badge/resolution/cemsbr/yala.svg
               :target: http://isitmaintained.com/project/cemsbr/yala

.. |version| image:: https://img.shields.io/pypi/v/yala
            :alt: PyPI
            :target: https://pypi.org/project/yala/

.. |downloads| image:: https://img.shields.io/pypi/dm/yala
              :target: https://pypi.org/project/yala/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cemsbr/yala",
    "name": "yala",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "linter check quality",
    "author": "Carlos Eduardo Moreira dos Santos",
    "author_email": "cems@cemshost.com.br",
    "download_url": "https://files.pythonhosted.org/packages/df/e8/14988f559e9d5c24b593c8c1eb52cf4442d8b83fa2471ee01a1487afa7c0/yala-3.2.0.tar.gz",
    "platform": null,
    "description": "YALA - Yet Another Linter Aggregator\n====================================\n\n|build| |coveralls| |codecov| |codacy| |issue_time|\n\n|version| |downloads|\n\nYALA combines many linters to improve the quality of your code. Other projects may come to your mind, but does anyone have all the features below?\n\nWorks with latest linters\n    Yala uses linters' outputs and doesn't break when their APIs change.\nSame defaults\n    No changes to linters' default configuration.\nEasy to configure\n    Set any command-line option for any linter (even pylint!) in setup.cfg.\nFast\n    Run linters in parallel.\n\nCurrent Status\n--------------\nCurrently supported Python tools:\n\n- `Flake8 <https://pypi.org/project/flake8/>`_\n- `Isort <https://pypi.org/project/isort/>`_\n- `MyPy <http://www.mypy-lang.org/>`_\n- `Pycodestyle <https://pycodestyle.readthedocs.io/>`_\n- `Pydocstyle <http://pydocstyle.org/>`_\n- `Pyflakes <https://pypi.org/project/pyflakes/>`_\n- `Pylint <http://pylint.pycqa.org/>`_\n- `Radon <https://radon.readthedocs.org/>`_\n- `Black <https://black.readthedocs.io/>`_\n\n\nInstall\n-------\nTested with Python >= 3.6. You can specify multiple linters separated by commas:\n\n- ``yala`` installs isort, pycodestyle, and pylint (minimal install);\n- ``yala[all]`` adds *mypy*, *pydocstyle*, *pyflakes*, and *radon*;\n- ``yala[all,flake8]`` also adds *flake8*;\n\n.. code-block:: bash\n\n  # Minimal: isort, pycodestyle and pylint\n  sudo pip3 install --upgrade yala\n  # OR (almost) all supported linters\n  sudo pip3 install --upgrade yala[all]\n  # OR choose your linters (+isort, pycodestyle and pylint)\n  sudo pip3 install --upgrade yala[mypy,radon]\n\nIf you are willing to hack yala's code, run the command below in this README's folder:\n\n.. code-block:: sh\n\n  # Use pip\n  sudo pip3 install --editable .[all,dev]\n  # OR pipenv\n  pipenv sync --dev\n\n\nUsage\n-----\nJust call ``yala`` followed by the files and/or folders to lint.\n\n\nConfiguration\n-------------\n\nBesides the standard configuration files of each linter, as in their docs, you can specify any command-line option in *setup.cfg* with yala.\n\nWriting command-line arguments for linters in *setup.cfg* is particularly useful for *pylint* because it ignores *setup.cfg* and requires you to write an extra file. Now, you don't have to.\n\nThe default configuration file is in ``yala/setup.cfg``. You can copy it to your project's root folder and customize it. If you need other configuration for a nested directory, just create another file there.\n\n\nLinters' options\n................\n\nFor example, to disable a specific pylint warning and output grades C and lower for Radon Maintainability Index (default is D or worse), add the following to *setup.cfg*:\n\n.. code-block:: ini\n\n  [yala]\n  pylint args = --disable=TODO\n  radon mi args = --min C\n\nBesides `pylint`, you can define CLI options for `isort`, `pycodestyle`, `pydocstyle`, etc (the names are exactly as they are called in command line).\n\n\nChoosing linters\n................\n\nAll supported and installed linters are enabled by default.\n\nYou can customize the linters in *setup.cfg* by either:\n\n.. code-block:: ini\n\n  [yala]\n  linters = isort, pycodestyle\n\nor\n\n.. code-block:: ini\n\n  [yala]\n  linters = \n    isort\n    pycodestyle\n\nOr even a mix of both: multiple linters in multiple lines.\n\n\nExample\n.......\n\nRun pydocstyle and pylint without missing-docstring errors (besides isort,\npycodestyle, and pylint that are installed by default):\n\n.. code-block:: sh\n\n  pip install --upgrade yala[pydocstyle]\n\n.. code-block:: ini\n\n   [pydocstyle]\n   add-ignore = D1\n\n   [yala]\n   pylint args = --disable=C0114,C0115,C0116\n\n\nIf you're using `black` with `isort`, `pycodestyle` and `flake8`, make sure to set options that won't conflict, for instance:\n\n.. code-block:: ini\n\n  [isort]\n  profile=black\n\n  [pycodestyle]\n  max-line-length = 88\n\n  [flake8]\n  max-line-length = 88\n\n\nHacking: Adding a linter\n------------------------\nCheck the file *yala/linters.py* and feel free to ask for help.\n\n\n.. |build| image:: https://travis-ci.org/cemsbr/yala.svg?branch=master\n          :target: https://travis-ci.org/cemsbr/yala\n\n.. |coveralls| image:: https://coveralls.io/repos/github/cemsbr/yala/badge.svg?branch=master\n              :target: https://coveralls.io/github/cemsbr/yala?branch=master\n\n.. |codecov| image:: https://codecov.io/gh/cemsbr/yala/branch/master/graph/badge.svg\n            :target: https://codecov.io/gh/cemsbr/yala\n\n.. |codacy| image:: https://app.codacy.com/project/badge/Grade/30067434a90c41c097fdf83ce6a1b677\n           :target: https://www.codacy.com/gh/cemsbr/yala/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cemsbr/yala&amp;utm_campaign=Badge_Grade\n\n.. |issue_time| image:: http://isitmaintained.com/badge/resolution/cemsbr/yala.svg\n               :target: http://isitmaintained.com/project/cemsbr/yala\n\n.. |version| image:: https://img.shields.io/pypi/v/yala\n            :alt: PyPI\n            :target: https://pypi.org/project/yala/\n\n.. |downloads| image:: https://img.shields.io/pypi/dm/yala\n              :target: https://pypi.org/project/yala/\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Yet Another Linter Aggregator",
    "version": "3.2.0",
    "split_keywords": [
        "linter",
        "check",
        "quality"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b66eb7a37232061c5444c603731b331a0718b24fdbfd0ca714dc97cfb5394332",
                "md5": "ba4ab5f2c3018fcaf458584aa649b5d2",
                "sha256": "fecb165f8290a384a51e15577b3b9b970fd6270eea6d88f22298d23ea41e43e6"
            },
            "downloads": -1,
            "filename": "yala-3.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ba4ab5f2c3018fcaf458584aa649b5d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12373,
            "upload_time": "2023-01-30T07:33:50",
            "upload_time_iso_8601": "2023-01-30T07:33:50.575230Z",
            "url": "https://files.pythonhosted.org/packages/b6/6e/b7a37232061c5444c603731b331a0718b24fdbfd0ca714dc97cfb5394332/yala-3.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dfe814988f559e9d5c24b593c8c1eb52cf4442d8b83fa2471ee01a1487afa7c0",
                "md5": "3bf57d9244ee1e92990e0e68bf1a839b",
                "sha256": "1d6a92e2c5e2c25fa5e96f5a1e99d444c8eff1b11b9dccbc71b1cfe166f6bed5"
            },
            "downloads": -1,
            "filename": "yala-3.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3bf57d9244ee1e92990e0e68bf1a839b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13216,
            "upload_time": "2023-01-30T07:33:52",
            "upload_time_iso_8601": "2023-01-30T07:33:52.651652Z",
            "url": "https://files.pythonhosted.org/packages/df/e8/14988f559e9d5c24b593c8c1eb52cf4442d8b83fa2471ee01a1487afa7c0/yala-3.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-30 07:33:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "cemsbr",
    "github_project": "yala",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "yala"
}
        
Elapsed time: 0.04241s