# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['cli_app', 'printlinter']

package_data = \
{'': ['*']}

install_requires = \
['pyyaml>=6.0.1,<7.0.0',
 'rich>=12.5.1,<13.0.0',
 'toml>=0.10.2,<0.11.0',
 'typer>=0.7.0,<0.8.0']

entry_points = \
{'console_scripts': ['printlinter = cli_app.main:main']}

setup_kwargs = {
    'name': 'printlinter',
    'version': '0.2.0',
    'description': 'print linter to know where is the test print',
    'long_description': '<!-- markdownlint-disable-file MD041 -->\n\n<!-- TODO: Add badge -->\n![logo](logo.png)\n\n[English readme](README.md) **·** [Français readme](doc/readme/README.fr.md)\n\nPrintLinter is a python linter to detect and signals display functions in python code.\n\n## Summary\n\n- [Installing](#installing)\n- [Usage](#usage)\n  - [Verbs](#verbs)\n    - [Lint](#lint)\n      - [Example](#example)\n- [Error codes](#error-codes)\n  - [Standard library](#standard-library)\n- [Ignore errors](#ignore-errors)\n  - [Ignore error inline](#ignore-error-inline)\n    - [Examples](#examples)\n  - [Ignore error on the next line](#ignore-error-on-the-next-line)\n    - [Examples](#examples-1)\n  - [Ignore a whole file](#ignore-a-whole-file)\n    - [Examples](#examples-2)\n      - [Simple error](#simple-error)\n      - [library errors](#library-errors)\n      - [All errors](#all-errors)\n  - [Ignore a block of code](#ignore-a-block-of-code)\n    - [Examples](#examples-3)\n      - [Simple error](#simple-error-1)\n      - [All errors](#all-errors-1)\n- [Configuration](#configuration)\n  - [Target version](#target-version)\n  - [Ignored files](#ignored-files)\n  - [Disabled rules](#disabled-rules)\n  - [Color](#color)\n  - [Examples of configuration files](#examples-of-configuration-files)\n    - [Yaml/Yml configuration file](#yamlyml-configuration-file)\n    - [Json configuration file](#json-configuration-file)\n    - [Toml configuration file](#toml-configuration-file)\n    - [Pyproject configuration file](#pyproject-configuration-file)\n- [But then](#but-then)\n\n# Installing\n\nInstall with `pip` or your favorite PyPI package manageer.\n\n```sh\npip install printlinter\n```\n\nRun the following command to test PrintLinter.\n\n```sh\nprintlinter --version\n```\n\n# Usage\n\n## Verbs\n\nFor help on using a verb.\n\n```sh\nprintlinter <verb> --help\n```\n\n### Lint\n\nTo lint a file or a folder.\n\n```sh\nprintlinter lint <file|folder>\n```\n\nThe product output look like this.\n\n`file_path:line:column error_code display_function_detected error_name`\n\nBy default we disable the linter in some folders.\n\n- `node_modules`\n- `.vscode/`\n- `__pycache__/`\n- `build/`\n- `develop-eggs/`\n- `dist/`\n- `downloads/`\n- `eggs/`\n- `.eggs/`\n- `lib/`\n- `lib64/`\n- `parts/`\n- `sdist/`\n- `var/`\n- `wheels/`\n- `pip-wheel-metadata/`\n- `share/python-wheels/`\n- `htmlcov/`\n- `.tox/`\n- `.nox/`\n- `.hypothesis/`\n- `.pytest_cache/`\n- `docs/_build/`\n- `__pypackages__/`\n- `.mypy_cache/`\n- `.ruff_cache`\n- `.pyre/`\n- `env/`\n- `venv/`\n- `ENV/`\n- `env.bak/`\n- `venv.bak/`\n- `.venv/`\n- `.env/`\n\n#### Example\n\n<!-- markdownlint-disable MD013 -->\n```sh\ntests/testing_files/mixed/mixed0.py:5:0: PPL001 `print("toto")` print-detected\ntests/testing_files/mixed/mixed0.py:6:0: PPL002 `pprint("titi")` prettyprint-detected\ntests/testing_files/mixed/mixed1/mixed2.py:5:0: PPL001 `print("toto")` print-detected\ntests/testing_files/mixed/mixed1/mixed2.py:6:0: PPL002 `pprint("titi")` prettyprint-detected\ntests/testing_files/pprint/pprint1.py:6:0: PPL002 `pprint("Hello, world")` prettyprint-detected\ntests/testing_files/pprint/pprint2/pprint3.py:11:4: PPL002 `pprint("tata")` prettyprint-detected\ntests/testing_files/ignored_files/ignore_ppl005.py:7:0: PPL001 `print("toto")` print-detected\ntests/testing_files/ignored_files/ignore_nothing.py:6:0: PPL001 `print("toto")` print-detected\ntests/testing_files/ignored_files/ignore_nothing.py:8:0: PPL002 `pprint("toto")` prettyprint-detected\ntests/testing_files/ignored_files/ignore_ppl006.py:7:0: PPL001 `print("toto")` print-detected\ntests/testing_files/ignored_files/ignore_ppl002.py:7:0: PPL001 `print("toto")` print-detected\ntests/testing_files/ignored_files/ignore_ppl001.py:9:0: PPL002 `pprint("toto")` prettyprint-detected\ntests/testing_files/ignored_files/ignore_ppl004.py:7:0: PPL001 `print("toto")` print-detected\ntests/testing_files/ignored_files/ignore_ppl003.py:7:0: PPL001 `print("toto")` print-detected\ntests/testing_files/ignored_files/disable_in_wrong_place.py:8:0: PPL001 `print("toto")` print-detected\ntests/testing_files/sys/stderr/write/stderr1.py:7:0: PPL004 `sys.stderr.write("Hello, world")` sys.stderr.write-detected\ntests/testing_files/sys/stderr/write/stderr1.py:8:0: PPL004 `stderr.write("Hello, world")` sys.stderr.write-detected\ntests/testing_files/sys/stderr/write/stderr2/stderr3.py:13:4: PPL004 `sys.stderr.write("tata")` sys.stderr.write-detected\ntests/testing_files/sys/stderr/write/stderr2/stderr3.py:14:4: PPL004 `stderr.write("tata")` sys.stderr.write-detected\ntests/testing_files/sys/stderr/writelines/stderr1.py:7:0: PPL006 `sys.stderr.writelines(["Hello", "world"])` sys.stderr.writelines-detected\ntests/testing_files/sys/stderr/writelines/stderr1.py:8:0: PPL006 `stderr.writelines(["Hello", "world"])` sys.stderr.writelines-detected\ntests/testing_files/sys/stderr/writelines/stderr2/stderr3.py:13:4: PPL006 `sys.stderr.writelines(["tata", "tutu"])`\nsys.stderr.writelines-detected\ntests/testing_files/sys/stderr/writelines/stderr2/stderr3.py:14:4: PPL006 `stderr.writelines(["tata", "tutu"])`\nsys.stderr.writelines-detected\ntests/testing_files/sys/stdout/write/stdout1.py:7:0: PPL003 `sys.stdout.write("Hello, world")` sys.stdout.write-detected\ntests/testing_files/sys/stdout/write/stdout2/stdout3.py:13:4: PPL003 `sys.stdout.write("tata")` sys.stdout.write-detected\ntests/testing_files/sys/stdout/writelines/stdout1.py:7:0: PPL005 `sys.stdout.writelines(["Hello", "world"])` sys.stdout.writelines-detected\ntests/testing_files/sys/stdout/writelines/stdout2/stdout3.py:14:4: PPL005 `stdout.writelines(["tata", "tutu"])`\nsys.stdout.writelines-detected\ntests/testing_files/print/toto_1.py:3:0: PPL001 `print("Hello, world")` print-detected\ntests/testing_files/print/toto2/toto3.py:7:4: PPL001 `print("tata")` print-detected\nFound 27 errors\n```\n<!-- markdownlint-enable MD013 -->\n\n# Error codes\n\nAll errors have an individual code based on `PPLXXX`.\nEach library have its own error "domain".\n\n| Library  | Error domain |\n|:---------|:-------------|\n| Standard | PPL0XX       |\n\n## Standard library\n\n| Function                | Error code |\n|:------------------------|:-----------|\n| `print`                 | PPL001     |\n| `pprint`                | PPL002     |\n| `sys.stdout.write`      | PPL003     |\n| `sys.stderr.write`      | PPL004     |\n| `sys.stdout.writelines` | PPL005     |\n| `sys.stderr.writelines` | PPL006     |\n\n# Ignore errors\n\nYou can ignore errors with the linter.\n\n## Ignore error inline\n\nTo ignore a rule inline, add a comment at the end of the line. `# noqa: <error_code>`.\n\n### Examples\n\n```python\ntoto = 1\ntiti = 2\nprint (toto + titi) # noqa: PPL001\n```\n\n## Ignore error on the next line\n\nTo ignore a rule on the next line, add a comment at the line before code to ignore.\n`<printlinter disable-next (error_code)>`.\n\n<!-- markdownlint-disable-next-line MD024 -->\n### Examples\n\n```python\ntoto = 1\ntiti = 2\n# <printlinter disable-next PPL001>\nprint (toto + titi) # ignored error\n```\n\n## Ignore a whole file\n\nTo ignore a rule, library rules or all rules, add a comment at the beging of the file.\n`# <printlinter disable-file (error_code)>`.\n\n<!-- markdownlint-disable-next-line MD036 -->\n**The comment must be before any code in a file.**\n\n<!-- markdownlint-disable-next-line MD024 -->\n### Examples\n\n#### Simple error\n\n```python\n# <printlinter disable-file PPL002>\nfrom pprint import pprint\ntoto = 1\ntiti = 2\npprint(titi + toto)  # ignored error\n...\n```\n\n#### library errors\n\n```python\n# <printlinter disable-file PPL000>\nimport sys\ntoto = 1\ntiti = 2\nprint(titi + toto)  # ignored error\nsys.stdout.write(titi + toto)  # ignored error\n...\n```\n\n#### All errors\n\n```python\n# <printlinter disable-file ALL>\nfrom sys import stdout, stderr\nfrom pprint import pprint\ntoto = 1\ntiti = 2\nprint(titi + toto)  # ignored error\npprint(titi + toto)  # ignored error\nstdout.write(titi + toto)  # ignored error\nstderr.write(titi + toto)  # ignored error\nstdout.writelines(titi + toto)  # ignored error\nstderr.writelines(titi + toto)  # ignored error\n...\n```\n\n## Ignore a block of code\n\nTo ignore a block of code (disable the linter) on a rules or all rules (disable library\nrules come later), add a comment before the block you want ignore:\n`<printlinter disable (error_code)`. To re enable the linter add an other comment after\nthe block of code: `<printlinter enable (error_code)>`. You are don\'t have to re enable\nthe linter after disabled it.\n\n<!-- markdownlint-disable-next-line MD024 -->\n### Examples\n\n<!-- markdownlint-disable-next-line MD024 -->\n#### Simple error\n\n```python\nfrom pprint import pprint\n# <printlinter disable PPL001>\nprint("toto") # ignored error\npprint("titit")\n# <printlinter enable PPL001>\n...\n```\n\nYou can nested ignored block.\n\n```python\nfrom pprint import pprint\n\n# <printlinter disable PPL002>\n\npprint("titi") # ignored error\n\n# <printlinter disable PPL001>\nprint("toto") # ignored error\n# <printlinter enable PPL001>\n\nprint("tutu") # NOT IGNORED ERROR\npprint("tata") # ignored error\n\n# <printlinter enable PPL002>\n...\n```\n\nwithout re enable the linter.\n\n```python\nfrom pprint import pprint\n# <printlinter disable PPL001>\nprint("toto") # ignored error\npprint("titit")\n...\nprint(\'toto\') # ignored error\n```\n\n<!-- markdownlint-disable-next-line MD024 -->\n#### All errors\n\n```python\nfrom sys import stdout, stderr\nfrom pprint import pprint\ntoto = 1\ntiti = 2\n# <printlinter disable ALL>\nprint(titi + toto)  # ignored error\npprint(titi + toto)  # ignored error\nstdout.write(titi + toto)  # ignored error\nstderr.write(titi + toto)  # ignored error\nstdout.writelines(titi + toto)  # ignored error\nstderr.writelines(titi + toto)  # ignored error\n# <printlinter enable ALL>\n...\n```\n\n# Configuration\n\nYou can configurate the linter with a configuration file (configuration by command line,\nwill arrive in a future version).\n\nPrintLinter supports 3 differents file type.\n\n- `.yaml/.yml`\n- `.json`\n- `.toml`\n\nBy default the linter use one of thoses files load in this order.\n\n- `printlinter.yaml`\n- `printlinter.yml`\n- `printlinter.json`\n- `printlinter.toml`\n- `pyproject.toml`\n\nAlternatively, you can use another file and fill it in by running linter from the command\nline.\n\n```sh\nprintlinter lint <file|folder> --config-file </path/of/config/file>\n```\n\n## Target version\n\nThe config file allows to specify the python target version for the parser. Use a\nstring like this `3.10` or `3.7` to specify the version.\n\n<!-- markdownlint-disable-next-line MD036 -->\n**The python target version MUST be contains between 3.7 and 3.10**\n\nYou can see examples of this config [here](#examples-of-configuration-files).\n\n## Ignored files\n\nThe config file allows to ignore files, unlike the comment that allows errors to be\nignored in a whole file this configuration option prevents the linter from reading the file.\n\nYou can see examples of this config [here](#examples-of-configuration-files).\n\n## Disabled rules\n\nThe config file allows to disable rules, in all files and folders.\n\nYou can see examples of this config [here](#examples-of-configuration-files).\n\n## Color\n\nThe config file allows to enable or disable colorized output. By default the `color` option\nis on `True`.\n\nYou can see examples of this config [here](#examples-of-configuration-files).\n\n## Examples of configuration files\n\n### Yaml/Yml configuration file\n\n```yaml\nprintlinter:\n  target_version: "3.10"\n  ignored_files: [toto.py]\n  disabled_rules: [PPL001]\n  color: true\n```\n\n### Json configuration file\n\n```json\n{\n  "printlinter": {\n    "target_version": "3.10",\n    "ignored_files": ["toto.py"],\n    "disabled_rules": ["PPL001"],\n    "color": false\n  }\n}\n\n```\n\n### Toml configuration file\n\n```toml\n[printlinter]\ntarget_version = "3.10"\nignored_files = ["toto.py"]\ndisabled_rules = ["PPL001"]\ncolor = true\n```\n\n### Pyproject configuration file\n\n```toml\n[tool.printlinter]\ntarget_version = "3.10"\nignored_files = ["toto.py"]\ndisabled_rules = ["PPL001"]\ncolor = false\n```\n\n# But then\n\nToo see the next features to be developed see [TODO](TODO.md). Here\'s a small,\nnon-exhaustive list of what\'s comming in the future versions.\n\n- Lint display functions from other libraries.\n- Add other configuration options.\n',
    'author': 'ulysse',
    'author_email': 'ulysse.chosson@obspm.fr',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'None',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.10,<4.0',
}


setup(**setup_kwargs)
