{ "info": { "author": "Yan QiDong", "author_email": "yanqd0@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Testing" ], "description": "# pytest-yapf3\n\n[![Travis](https://travis-ci.org/yanqd0/pytest-yapf3.svg?branch=master)](https://travis-ci.org/yanqd0/pytest-yapf3)\n[![AppVeyor](https://ci.appveyor.com/api/projects/status/umf6393qo2y7afog/branch/master?svg=true)](https://ci.appveyor.com/project/yanqd0/pytest-yapf3/branch/master)\n[![codecov](https://codecov.io/gh/yanqd0/pytest-yapf3/branch/master/graph/badge.svg)](https://codecov.io/gh/yanqd0/pytest-yapf3)\n[![Code style: yapf](https://img.shields.io/badge/code%20style-yapf-blue)](https://github.com/google/yapf)\n\nValidate your Python file format with yapf.\n\nThis is a [pytest] plugin, which make sure your python file is exactly formatted by yapf,\nor it will crash when running `pytest`.\n\n[pytest]:https://pytest.org/\n\n## Install\n\n[![Version](https://img.shields.io/pypi/v/pytest-yapf3)](https://pypi.org/project/pytest-yapf3/)\n[![Python](https://img.shields.io/pypi/pyversions/pytest-yapf3)](https://pypi.org/project/pytest-yapf3/)\n[![Format](https://img.shields.io/pypi/format/pytest-yapf3)](https://pypi.org/project/pytest-yapf3/)\n[![Status](https://img.shields.io/pypi/status/pytest-yapf3)](https://pypi.org/classifiers/)\n[![Download](https://img.shields.io/pypi/dm/pytest-yapf3)](https://pypi.org/project/pytest-yapf3/)\n[![MIT](https://img.shields.io/pypi/l/pytest-yapf3)](https://github.com/yanqd0/pytest-yapf3/blob/master/LICENSE)\n\n```sh\npip install pytest-yapf3\n```\n\n## Usage\n\nModify `setup.cfg` (or `pytest.ini`):\n\n```ini\n[tool:pytest]\naddopts =\n --yapf\n --yapfdiff\nyapf-ignore =\n setup.py\n src/package/auto_generated/**.py\n```\n\nAdd `--yapf` to [pytest] configuration `addopts`.\nIf run with `pytest -m yapf`, only `yapf` is checked.\n\nBy default, only line summaries is displayed.\nWith an optional `--yapfdiff`, a full text of `yapf -d` is displayed.\nIf not configured here, `pytest --yapfdiff` will also work.\n\nAn optional `yapf-ignore` is supported.\nEach line specifies a glob pattern of files which should not check `yapf`.\n\nThe `pytest` will cache success results of pytest-yapf3, and will not check again if files not changed.\nSometimes you may want to disable it.\nThere are 2 ways:\n\n- `pytest -p no:cacheprovider`\n This may crash if any other pytest plugin not supports.\n- `rm -rf .pytest_cache/v/yapf`\n This is ugly, but safe for any environment.\n\n## Features and Todos\n\n- [x] Basic support to validate `yapf`.\n- [x] Fix the diff line count error and improve the performance.\n- [x] Display `YAPF-check` as the error session name.\n- [x] Display `YAPF` in `pytest --verbose`.\n- [x] Add `yapf` as a marker to enable `pytest -m yapf`.\n- [x] Support `yapf-ignore` to ignore specified files.\n- [x] Skip running if a file is not changed.\n- [x] 100% test coverage.\n\n## Develop\n\nPrepare the environment:\n\n```sh\nsource your/virtual/env\npip install -e .[dev]\n```\n\nRun test:\n\n```sh\npytest\n```\n\n## Badge\n\nLike [black], if your project always pass yapf checking provided by this project,\nyou can use an unofficial badge to show off.\n\n[black]:https://github.com/psf/black#show-your-style\n\n### Markdown (README.md)\n\n```markdown\n[![Code style: yapf](https://img.shields.io/badge/code%20style-yapf-blue)](https://github.com/google/yapf)\n```\n\n### reStructuredText (README.rst)\n\n```rst\n.. image:: https://img.shields.io/badge/code%20style-yapf-blue\n :target: https://github.com/google/yapf\n :alt: Code style: yapf\n```\n\n## License\n\n> The MIT License (MIT)\n>\n> Copyright (c) 2019 Yan QiDong\n\nThis repository is forked from [pytest-yapf] in 2019, which is [not maintained] since 2017.\nBesides extra features, the project structure is adjusted,\nand the code is enhanced to pass linters like flake8, pylint and, of course, yapf.\n\n[pytest-yapf]:https://github.com/django-stars/pytest-yapf\n[not maintained]:https://github.com/django-stars/pytest-yapf/issues/1\n\n# Change Log\n\n## Release 0.5.1\n\n- Fix coverage missing lines.\n- 100% test coverage.\n- Fix a crash when yapf crash.\n- Change development status to stable.\n\n## Release 0.5.0\n\n- Skip running if a file is not changed.\n- Add more usage description in README.\n\n## Release 0.4.0\n\n- Add `yapf` as a pytest marker to enable `pytest -m yapf`\n- Support `yapf-ignore` to ignore specified files\n- Fix a probabilistic issue caused by `\\r`\n\n## Release 0.3.0\n\n- Display `YAPF-check` as the error session name\n- Display `::YAPF` in `pytest --verbose`\n\n## Release 0.2.0\n\nSince forked from [pytest-yapf](https://pypi.org/project/pytest-yapf/) `0.1.1`, there are some improvements:\n\n- Restructure the project and rewrite documents\n- Support Python 3.4+ only\n- Add linters to pytest, and fix their errors\n- Fix the line count error\n- Change build configurations in [Travis] and [AppVeyor]\n- Support coverage and displayed in [codecov]\n\n[Travis]:https://travis-ci.org\n[AppVeyor]:https://appveyor.com\n[codecov]:https://codecov.io\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yanqd0/pytest-yapf3", "keywords": "pytest,yapf,sc", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-yapf3", "package_url": "https://pypi.org/project/pytest-yapf3/", "platform": "any", "project_url": "https://pypi.org/project/pytest-yapf3/", "project_urls": { "Homepage": "https://github.com/yanqd0/pytest-yapf3" }, "release_url": "https://pypi.org/project/pytest-yapf3/0.5.1/", "requires_dist": [ "pytest (>=3.1.1)", "yapf (>=0.16.2)", "mock ; extra == 'dev'", "pytest ; extra == 'dev'", "pytest-cov ; extra == 'dev'", "pytest-docstyle ; extra == 'dev'", "pytest-flake8 ; extra == 'dev'", "pytest-isort ; extra == 'dev'", "pytest-mock ; extra == 'dev'", "pytest-pep8 ; extra == 'dev'", "pytest-pylint ; extra == 'dev'", "flake8 ; extra == 'dev'", "isort ; extra == 'dev'", "pylint ; extra == 'dev'" ], "requires_python": ">=3.4", "summary": "Validate your Python file format with yapf", "version": "0.5.1" }, "last_serial": 5857170, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "c66dd353a585166fe61a94c8877f3975", "sha256": "29ded785785a7fb66b0fcd73d5c862aca0d7699b67f2c13ec997e207a79806b0" }, "downloads": -1, "filename": "pytest_yapf3-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c66dd353a585166fe61a94c8877f3975", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 4676, "upload_time": "2019-09-01T15:11:38", "url": "https://files.pythonhosted.org/packages/70/c4/f7336b5756f1dee69874c6f40e75c446ad2642f4cb77167c49e811cf7688/pytest_yapf3-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "21560293207f38150791576c6202492e", "sha256": "9f5e42a7c9247e80361a26fd5fd8dd25b0d1f9fbc07507dc58072e9b21e64917" }, "downloads": -1, "filename": "pytest-yapf3-0.2.0.tar.gz", "has_sig": false, "md5_digest": "21560293207f38150791576c6202492e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 9211, "upload_time": "2019-09-01T15:11:40", "url": "https://files.pythonhosted.org/packages/27/90/78290d9c2a9fdd78dbb42172e088222645ee1b5669248f562780c3de87de/pytest-yapf3-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "530dcc5ce697f2d62c45128962e40261", "sha256": "8393c8ae8fc159675fa654732de42792f8f1915dc22252d252bfcdbbe441a7fb" }, "downloads": -1, "filename": "pytest_yapf3-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "530dcc5ce697f2d62c45128962e40261", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 4883, "upload_time": "2019-09-02T23:54:36", "url": "https://files.pythonhosted.org/packages/fc/8a/602a0319c0625f7dfa57ee859fe5216a8133df34d7ed0413aa3e15d0553a/pytest_yapf3-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69d36527a564b0cfc4338683b2df8421", "sha256": "1aad99b087b3ea3a971123340a1d27375459c13b00de38b68cb446fa3f4c7b33" }, "downloads": -1, "filename": "pytest-yapf3-0.3.0.tar.gz", "has_sig": false, "md5_digest": "69d36527a564b0cfc4338683b2df8421", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 9470, "upload_time": "2019-09-02T23:54:37", "url": "https://files.pythonhosted.org/packages/90/87/1d6f05b23788c810bfb3f1f3af46e5561d980b41ca50f46f53400e8c909c/pytest-yapf3-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "32504a3ee03ef3d564e7721e8da1e829", "sha256": "e26eb30d913c168cec2d6e77274a739ab9e54a7358782cfcb1b8f2c3e1a8df30" }, "downloads": -1, "filename": "pytest_yapf3-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "32504a3ee03ef3d564e7721e8da1e829", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 5299, "upload_time": "2019-09-03T22:47:29", "url": "https://files.pythonhosted.org/packages/2d/c0/f320f5b80b6d624b333cbf1d26b2727dd39e0f2511141ad56763df990d5d/pytest_yapf3-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b555b88a6f8c978ce7eb3bae65417b36", "sha256": "96de4d269433b1747cec85ffd2a170eef9162dbace78835415a37b31da3c664a" }, "downloads": -1, "filename": "pytest-yapf3-0.4.0.tar.gz", "has_sig": false, "md5_digest": "b555b88a6f8c978ce7eb3bae65417b36", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 9965, "upload_time": "2019-09-03T22:47:30", "url": "https://files.pythonhosted.org/packages/c2/d8/13da0e3876ecba839c3069f4c5bf1c8be0deb039b41e9bc0532156c87f1f/pytest-yapf3-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "ef47b7a0196178ab42422bfff59b328e", "sha256": "6829bdfa8aa5980df0246fe7adca28e631c7d956eecd7cef286381aba77bd80f" }, "downloads": -1, "filename": "pytest_yapf3-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ef47b7a0196178ab42422bfff59b328e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 6025, "upload_time": "2019-09-17T23:05:32", "url": "https://files.pythonhosted.org/packages/de/75/2c2c72e144229b35662af1be42967efa3d4767a75055c8b1bbf013dab375/pytest_yapf3-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0a2de0df11a0b086d6b69764da9c0e21", "sha256": "e959e9aebb3279bbc0afe620fe59e1376ad296e704af974f7fc213619cfbacd5" }, "downloads": -1, "filename": "pytest-yapf3-0.5.0.tar.gz", "has_sig": false, "md5_digest": "0a2de0df11a0b086d6b69764da9c0e21", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 10848, "upload_time": "2019-09-17T23:05:33", "url": "https://files.pythonhosted.org/packages/93/10/15296e2251f7443ddb95200d3533b7f959303988ad846d1b083eb6232298/pytest-yapf3-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "594b8ff1c3f7b910562c8d8003278c41", "sha256": "5cb9e9e4c861590de3690eaa6d72fe1ae9e7158852613b4b97258cb0981cf3f2" }, "downloads": -1, "filename": "pytest_yapf3-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "594b8ff1c3f7b910562c8d8003278c41", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 6066, "upload_time": "2019-09-19T15:29:25", "url": "https://files.pythonhosted.org/packages/42/8b/6f92dca90368fc34cacfb0c4d9e20e612a15f62047c537a643be2b8c5bdc/pytest_yapf3-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2fb7f8d70b9f54424a840158c29901c3", "sha256": "767fe34190eca472e54107c51151a7c722300185e8f16d85ea8de7619f36db5f" }, "downloads": -1, "filename": "pytest-yapf3-0.5.1.tar.gz", "has_sig": false, "md5_digest": "2fb7f8d70b9f54424a840158c29901c3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 11027, "upload_time": "2019-09-19T15:29:26", "url": "https://files.pythonhosted.org/packages/16/26/ccbe302d4b9d3118bd6e96c2b699b3d3f5940c66462b6a04baf2bc46b339/pytest-yapf3-0.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "594b8ff1c3f7b910562c8d8003278c41", "sha256": "5cb9e9e4c861590de3690eaa6d72fe1ae9e7158852613b4b97258cb0981cf3f2" }, "downloads": -1, "filename": "pytest_yapf3-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "594b8ff1c3f7b910562c8d8003278c41", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 6066, "upload_time": "2019-09-19T15:29:25", "url": "https://files.pythonhosted.org/packages/42/8b/6f92dca90368fc34cacfb0c4d9e20e612a15f62047c537a643be2b8c5bdc/pytest_yapf3-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2fb7f8d70b9f54424a840158c29901c3", "sha256": "767fe34190eca472e54107c51151a7c722300185e8f16d85ea8de7619f36db5f" }, "downloads": -1, "filename": "pytest-yapf3-0.5.1.tar.gz", "has_sig": false, "md5_digest": "2fb7f8d70b9f54424a840158c29901c3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 11027, "upload_time": "2019-09-19T15:29:26", "url": "https://files.pythonhosted.org/packages/16/26/ccbe302d4b9d3118bd6e96c2b699b3d3f5940c66462b6a04baf2bc46b339/pytest-yapf3-0.5.1.tar.gz" } ] }