{ "info": { "author": "Valery Pavlov", "author_email": "lerikpav@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Framework :: Flake8", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Topic :: Software Development :: Documentation", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Quality Assurance" ], "description": "# flake8-functions\n\n[![Build Status](https://travis-ci.org/best-doctor/flake8-functions.svg?branch=master)](https://travis-ci.org/best-doctor/flake8-functions)\n[![Maintainability](https://api.codeclimate.com/v1/badges/4cdbd67833752665ee79/maintainability)](https://codeclimate.com/github/best-doctor/flake8-functions/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/4cdbd67833752665ee79/test_coverage)](https://codeclimate.com/github/best-doctor/flake8-functions/test_coverage)\n[![PyPI version](https://badge.fury.io/py/flake8-functions.svg?)](https://badge.fury.io/py/flake8-functions)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flake8-functions)\n\nAn extension for flake8 to report on issues with functions.\n\nWe believe code readability is very important for a team that consists of\nmore than one person. One of the issues we've encountered is functions\nthat are more that two screens long.\n\nThe validator checks for:\n\n* CFQ001 - function length (default max length is 100)\n* CFQ002 - function arguments number (default max arguments amount is 6)\n* CFQ003 - function is not pure.\n* CFQ004 - function returns number (default max returns amount is 3)\n\n## Installation\n\n```terminal\npip install flake8-functions\n```\n\n## Example\n\n```python\ndef some_long_function(\n first_parameter: int,\n second_parameter: int,\n third_parameter: int,\n):\n first_parameter = (\n first_parameter +\n second_parameter +\n third_parameter\n )\n\n first_parameter = (\n first_parameter +\n second_parameter +\n third_parameter\n )\n\n first_parameter = (\n first_parameter +\n second_parameter +\n third_parameter\n )\n\n first_parameter = (\n first_parameter +\n second_parameter +\n third_parameter\n )\n\n return first_parameter\n```\n\nUsage:\n\n```terminal\n$ flake8 --max-function-length=20 test.py\ntest.py:1:0: CFQ001 \"some_long_function\" function has length 25\nthat exceeds max allowed length 20\n```\n\n## Error codes\n\n| Error code | Description |\n|:----------:|:--------------------------------------------------------------------------------------------------:|\n| CFQ001 | Function \"some_function\" has length %function_length% that exceeds max allowed length %max_length% |\n| CFQ002 | Function \"some_function\" has %args_amount% arguments that exceeds max allowed %max_args_amount% |\n| CFQ003 | Function \"some_function\" is not pure. |\n| CFQ004 | Function \"some_function\" has %returns_amount% returns that exceeds max allowed %max_returns_amount%|\n\n## Code prerequisites\n\n1. Python 3.7+;\n\n## Contributing\n\nWe would love you to contribute to our project. It's simple:\n\n1. Create an issue with bug you found or proposal you have.\n Wait for approve from maintainer.\n1. Create a pull request. Make sure all checks are green.\n1. Fix review comments if any.\n1. Be awesome.\n\nHere are useful tips:\n\n* You can run all checks and tests with `make check`.\n Please do it before TravisCI does.\n* We use [BestDoctor python styleguide](https://github.com/best-doctor/guides/blob/master/guides/en/python_styleguide.md).\n* We respect [Django CoC](https://www.djangoproject.com/conduct/).\n Make soft, not bullshit.\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/best-doctor/flake8-functions", "keywords": "flake8", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "flake8-functions", "package_url": "https://pypi.org/project/flake8-functions/", "platform": "", "project_url": "https://pypi.org/project/flake8-functions/", "project_urls": { "Homepage": "https://github.com/best-doctor/flake8-functions" }, "release_url": "https://pypi.org/project/flake8-functions/0.0.7/", "requires_dist": [ "setuptools", "mr-proper" ], "requires_python": "", "summary": "A flake8 extension that checks functions", "version": "0.0.7", "yanked": false, "yanked_reason": null }, "last_serial": 12994777, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5687fd42403a259b55d26c54a76f2387", "sha256": "94c410a636398e4436749fd6a8e7a66f8da5ec82f83a15f5eabd1fb6d3cc17f7" }, "downloads": -1, "filename": "flake8_functions-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5687fd42403a259b55d26c54a76f2387", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4455, "upload_time": "2019-10-01T08:08:16", "upload_time_iso_8601": "2019-10-01T08:08:16.081093Z", "url": "https://files.pythonhosted.org/packages/81/41/d1970faff072f6c6fc3a520b512aef9036d1ec03bb52eb001ac878e52ab8/flake8_functions-0.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "5239936cddb84de2530b57ba8c747696", "sha256": "2f50f55e8c2a908ee15b89baf5e74ee4925d02860f389ec1ad9c892a46c686b6" }, "downloads": -1, "filename": "flake8_functions-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5239936cddb84de2530b57ba8c747696", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3340, "upload_time": "2019-10-01T08:08:18", "upload_time_iso_8601": "2019-10-01T08:08:18.482022Z", "url": "https://files.pythonhosted.org/packages/f8/20/e3007d719ba00ffbc9092cab100329c301c7da9c9a617092bc857db94f63/flake8_functions-0.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "aa435298e996cdc4f554c709e404de28", "sha256": "8180515999746819f5e965fc45c2a8933889d5e1600f556b9d8d05115a5c27e4" }, "downloads": -1, "filename": "flake8_functions-0.0.2.tar.gz", "has_sig": false, "md5_digest": "aa435298e996cdc4f554c709e404de28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3756, "upload_time": "2019-10-28T16:26:50", "upload_time_iso_8601": "2019-10-28T16:26:50.430779Z", "url": "https://files.pythonhosted.org/packages/63/dd/9ff40fcb9f407b922359d71a0a726ecb6f7013646ed6433bb634b55d1510/flake8_functions-0.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "49722610ce5541a888484982b8f6d2b1", "sha256": "3ee113bef71b854c438996d27da8244d474cf5a04905016240d9f6efc23a3f16" }, "downloads": -1, "filename": "flake8_functions-0.0.3.tar.gz", "has_sig": false, "md5_digest": "49722610ce5541a888484982b8f6d2b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4427, "upload_time": "2020-02-15T05:57:45", "upload_time_iso_8601": "2020-02-15T05:57:45.052546Z", "url": "https://files.pythonhosted.org/packages/34/b2/435e0e8f718f70bbdb21ba8a0de894a661abb59fd6948c10d80dd3c30cb8/flake8_functions-0.0.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "e47fe9b2be69a5a064d7fb4a3481e346", "sha256": "a0254bf465ca2ae8e3b0c9c948d2cac8d843094aa66496e0b9338755952c0b42" }, "downloads": -1, "filename": "flake8_functions-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "e47fe9b2be69a5a064d7fb4a3481e346", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5201, "upload_time": "2020-02-15T10:30:09", "upload_time_iso_8601": "2020-02-15T10:30:09.950070Z", "url": "https://files.pythonhosted.org/packages/90/69/e07b2cab21e823938628fdfd4f6c493722c59abb4c7cb81222d737db8d73/flake8_functions-0.0.4-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "23c7900f50a0a0117e172df67d4aecc6", "sha256": "e6cde085e3e8ceade4a0256619aa0e381473aff76bbb1d37111f44bbc49ecace" }, "downloads": -1, "filename": "flake8_functions-0.0.4.tar.gz", "has_sig": false, "md5_digest": "23c7900f50a0a0117e172df67d4aecc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4429, "upload_time": "2020-02-15T10:30:11", "upload_time_iso_8601": "2020-02-15T10:30:11.531682Z", "url": "https://files.pythonhosted.org/packages/0b/f4/f625de22855626cc2e5dc58492c3e73cf6d21efc40a7aa217eec5ae427be/flake8_functions-0.0.4.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "4fd38fd902a3066f9f41358151720c05", "sha256": "a3229bd980f6ce60adf3c566fb4c8f749b2999aabff68fbcb67ec053616bf24c" }, "downloads": -1, "filename": "flake8_functions-0.0.5.tar.gz", "has_sig": false, "md5_digest": "4fd38fd902a3066f9f41358151720c05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4724, "upload_time": "2021-01-14T14:38:35", "upload_time_iso_8601": "2021-01-14T14:38:35.027275Z", "url": "https://files.pythonhosted.org/packages/fe/3c/3150e0dab9b200af667ec8ee7a05f67322ec9158f808b55919845223d286/flake8_functions-0.0.5.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f908dfc3642bd98e61386b8cf9ded8e9", "sha256": "7afa7979d20d28a3cde0c14b3fddf42beef23232620a641ad20dcc2de49eddf3" }, "downloads": -1, "filename": "flake8_functions-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "f908dfc3642bd98e61386b8cf9ded8e9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6953, "upload_time": "2021-04-23T09:26:09", "upload_time_iso_8601": "2021-04-23T09:26:09.094235Z", "url": "https://files.pythonhosted.org/packages/d3/af/0e3ae0de1c5ec6cb2268af71f7893e81b46ee68865d6a9f2e845860b64dc/flake8_functions-0.0.6-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "27202a07faf5efb114af15a9cb1249f5", "sha256": "6d42da93c4b13354a3973da7bf4e239225f9dba167e8a099fd647ae483ac3e24" }, "downloads": -1, "filename": "flake8_functions-0.0.6.tar.gz", "has_sig": false, "md5_digest": "27202a07faf5efb114af15a9cb1249f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4945, "upload_time": "2021-04-23T09:26:10", "upload_time_iso_8601": "2021-04-23T09:26:10.389373Z", "url": "https://files.pythonhosted.org/packages/3b/a0/1e83c8cf25037e2f7bee83b2bcff1d077ec43d9c1e584b4247eba081c149/flake8_functions-0.0.6.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "c95cbcc1a660638380dc8599290ba2c2", "sha256": "f2f75545c2b0df9eeba0ad316e2ac38c101676970b4441300fc07af3226a44f6" }, "downloads": -1, "filename": "flake8_functions-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "c95cbcc1a660638380dc8599290ba2c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6966, "upload_time": "2022-02-24T10:34:11", "upload_time_iso_8601": "2022-02-24T10:34:11.139289Z", "url": "https://files.pythonhosted.org/packages/33/73/bb25cd466206e74e86fdc560fda528d09d2df057da491797b5317932de75/flake8_functions-0.0.7-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "fb82b6dfa3aed9a47f2e2d615922e9b3", "sha256": "40584b05d57e5ab185545bcfa08aa0edca52b04646d0df266e2b1667d6437184" }, "downloads": -1, "filename": "flake8_functions-0.0.7.tar.gz", "has_sig": false, "md5_digest": "fb82b6dfa3aed9a47f2e2d615922e9b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5486, "upload_time": "2022-02-24T10:34:12", "upload_time_iso_8601": "2022-02-24T10:34:12.523901Z", "url": "https://files.pythonhosted.org/packages/4a/70/2a48ea285819d89303f6e7f2bd113f7cc031d71c691d516b3d862a760aae/flake8_functions-0.0.7.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c95cbcc1a660638380dc8599290ba2c2", "sha256": "f2f75545c2b0df9eeba0ad316e2ac38c101676970b4441300fc07af3226a44f6" }, "downloads": -1, "filename": "flake8_functions-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "c95cbcc1a660638380dc8599290ba2c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6966, "upload_time": "2022-02-24T10:34:11", "upload_time_iso_8601": "2022-02-24T10:34:11.139289Z", "url": "https://files.pythonhosted.org/packages/33/73/bb25cd466206e74e86fdc560fda528d09d2df057da491797b5317932de75/flake8_functions-0.0.7-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "fb82b6dfa3aed9a47f2e2d615922e9b3", "sha256": "40584b05d57e5ab185545bcfa08aa0edca52b04646d0df266e2b1667d6437184" }, "downloads": -1, "filename": "flake8_functions-0.0.7.tar.gz", "has_sig": false, "md5_digest": "fb82b6dfa3aed9a47f2e2d615922e9b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5486, "upload_time": "2022-02-24T10:34:12", "upload_time_iso_8601": "2022-02-24T10:34:12.523901Z", "url": "https://files.pythonhosted.org/packages/4a/70/2a48ea285819d89303f6e7f2bd113f7cc031d71c691d516b3d862a760aae/flake8_functions-0.0.7.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }