{ "info": { "author": "Steve Dignam", "author_email": "steve@dignam.xyz", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Quality Assurance" ], "description": "# flake8-pie [![CircleCI](https://circleci.com/gh/sbdchd/flake8-pie.svg?style=svg)](https://circleci.com/gh/sbdchd/flake8-pie) [![pypi](https://img.shields.io/pypi/v/flake8-pie.svg)](https://pypi.org/project/flake8-pie/)\n\n> A flake8 extension that implements misc. lints\n\nNote: flake8-pie requires Python 3.6 or greater\n\n## lints\n\n- PIE781: You are assigning to a variable and then returning. Instead remove the assignment and return.\n- PIE782: Unnecessary f-string. You can safely remove the `f` prefix.\n- PIE783: Celery tasks should have explicit names.\n- PIE784: Celery crontab is missing explicit arguments.\n- PIE785: Celery tasks should have expirations.\n\n### PIE781: Assign and Return\n\nBased on Clippy's\n[`let_and_return`](https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return)\nand Microsoft's TSLint rule\n[`no-unnecessary-local-variable`](https://github.com/Microsoft/tslint-microsoft-contrib).\n\nFor more info on the structure of this lint, see the [accompanying blog\npost](https://steve.dignam.xyz/2018/12/16/creating-a-flake8-lint/).\n\n#### examples\n\n```python\n# error\ndef foo():\n x = bar()\n return x\n\n# allowed\ndef foo():\n x, _ = bar()\n return x\n```\n\n### PIE782: No Pointless F Strings\n\nWarn about usage of f-string without templated values.\n\n#### examples\n\n```python\nx = (\n f\"foo {y}\", # ok\n f\"bar\" # error\n)\n```\n\n### PIE783: Celery tasks should have explicit names.\n\nWarn about [Celery](https://pypi.org/project/celery/) task definitions that don't have explicit names.\n\nNote: this lint is kind of naive considering any decorator with a `.task()`\nmethod or any decorator called `shared_task()` a Celery decorator.\n\n#### examples\n\n```python\n# error\n@app.task()\ndef foo():\n pass\n\n# ok\n@app.task(name=\"app_name.tasks.foo\")\ndef foo():\n pass\n```\n\n### PIE784: Celery crontab is missing explicit arguments.\n\nThe `crontab` class provided by Celery has some default args that are\nsuprising to new users. Specifically, `crontab(hour=\"0,12\")` won't run a task\nat midnight and noon, it will run the task at every minute during those two\nhours. This lint makes that call an error, forcing you to write\n`crontab(hour=\"0, 12\", minute=\"*\")`.\n\nAdditionally, the lint is a bit more complex in that it requires you specify\nevery smaller increment than the largest time increment you provide. So if you\nprovide `days_of_week`, then you need to provide `hour`s and `minute`s\nexplicitly.\n\nNote: if you like the default behavior of `crontab()` then you can either\ndisable this lint or pass `\"*\"` for the `kwarg` value, e.g., `minutes=\"*\"`.\n\nAlso, since this lint is essentially a naive search for calls to a\n`crontab()` function, if you have a function named the same then this will\ncause false positives.\n\n### PIE785: Celery tasks should have expirations.\n\nCelery tasks can bunch up if they don't have expirations.\n\nThis enforces specifying expirations in both the celery beat config dict and\nin `.apply_async()` calls.\n\nThe same caveat applies about how this lint is naive.\n\n## dev\n\n```shell\n# install dependencies\npoetry install\n\n# install plugin to work with flake8\npoetry run python setup.py install\n\n# test\npoetry run pytest\n# or with watch\npoetry run ptw\n\n# typecheck\npoetry run mypy *.py\n\n# format\npoetry run black .\n\n# lint\npoetry run flake8 .\n```\n\n## uploading a new version to [PyPi](https://pypi.org)\n\n```shell\n# increment `Flake8PieCheck.version` and pyproject.toml `version`\n\n# build new distribution files and upload to pypi\n# Note: this will ask for login credentials\nrm -rf dist && poetry publish --build\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/sbdchd/flake8-pie", "keywords": "flake8,lint", "license": "BSD-2-Clause", "maintainer": "Steve Dignam", "maintainer_email": "steve@dignam.xyz", "name": "flake8-pie", "package_url": "https://pypi.org/project/flake8-pie/", "platform": "", "project_url": "https://pypi.org/project/flake8-pie/", "project_urls": { "Homepage": "https://github.com/sbdchd/flake8-pie", "Repository": "https://github.com/sbdchd/flake8-pie" }, "release_url": "https://pypi.org/project/flake8-pie/0.4.2/", "requires_dist": null, "requires_python": ">=3.6", "summary": "A flake8 extension that implements misc. lints", "version": "0.4.2" }, "last_serial": 5504236, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "2ce7d9156e365f5a3bfe979b2bbfab91", "sha256": "7ad9801876df62a682dcc633ca495bfcd9933694b9efa7a578d120ea94001b39" }, "downloads": -1, "filename": "flake8_pie-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "2ce7d9156e365f5a3bfe979b2bbfab91", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3320, "upload_time": "2019-01-24T02:48:14", "url": "https://files.pythonhosted.org/packages/9e/27/4bef836a10fc36b0a7dd9885d67fe6246739d6ad4d336e6f51803a60368a/flake8_pie-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cff3a6a2772a217e0f12db7393ee4aef", "sha256": "3f89dda90bd6a3f898197140ebceed084449aee2ff5c814620712b13e055c0e9" }, "downloads": -1, "filename": "flake8-pie-0.0.4.tar.gz", "has_sig": false, "md5_digest": "cff3a6a2772a217e0f12db7393ee4aef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3173, "upload_time": "2019-01-24T02:48:16", "url": "https://files.pythonhosted.org/packages/23/d8/fc26372db3ac016dfd3249c9e6b9728b4c0993211091b6aea5a0b1e59133/flake8-pie-0.0.4.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "6a32e2e2778c570832a34402fe7dc650", "sha256": "f5d72d9583300c2ad9bdee77d5f6cb9982c2ee7481cd75dc4a917f63ea15333d" }, "downloads": -1, "filename": "flake8_pie-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6a32e2e2778c570832a34402fe7dc650", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3533, "upload_time": "2019-02-03T02:31:19", "url": "https://files.pythonhosted.org/packages/b5/fc/95e224ea2a7d3ad4467fdaccd7553444427df56731303a6ba93c4124bf41/flake8_pie-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78d118071e8a9a20e5ac6ae934ea0b2e", "sha256": "c811c10e2cd93d1143b1ecc3ef42072bd4c7ebaebe20946449f0b442150affa6" }, "downloads": -1, "filename": "flake8-pie-0.1.0.tar.gz", "has_sig": false, "md5_digest": "78d118071e8a9a20e5ac6ae934ea0b2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3424, "upload_time": "2019-02-03T02:31:21", "url": "https://files.pythonhosted.org/packages/61/d5/daa32c2f0f32c5630d5971fab0c8f9bbfd390251555787e4b6b06b26400c/flake8-pie-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "9e7f62f9a74abce0144137a819435d48", "sha256": "1c299649ca838f93ddf0f6b8daaf482f3d7f689c2132754032830278dcba6b18" }, "downloads": -1, "filename": "flake8_pie-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9e7f62f9a74abce0144137a819435d48", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3534, "upload_time": "2019-04-17T03:07:45", "url": "https://files.pythonhosted.org/packages/66/8a/50c771a0181c17c5c4847a9640d8972d9732ef1a39db5cc188c4d90a37ea/flake8_pie-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1fc576f113d80b745d8553704544e573", "sha256": "ea8995249ab038a69ff4012e402443856725d2ba36935baa6aeb08f480fb3663" }, "downloads": -1, "filename": "flake8-pie-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1fc576f113d80b745d8553704544e573", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3410, "upload_time": "2019-04-17T03:07:46", "url": "https://files.pythonhosted.org/packages/91/23/369fa165fba51c3e504ce8deaffe9eee0f670de0ed21d9565f7ce5649844/flake8-pie-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "e3d108a6f53c1eaa990603b5ef417df4", "sha256": "1e04f483c892f44cb22e6ce45c8c161a098300e0eeeae73ca4fe38cfbb60272f" }, "downloads": -1, "filename": "flake8_pie-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e3d108a6f53c1eaa990603b5ef417df4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3533, "upload_time": "2019-04-17T03:32:52", "url": "https://files.pythonhosted.org/packages/63/2e/58ad37ce00a636a12f182255b3df0675b308277dcfc0d9eef1b2c45b2cb8/flake8_pie-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc9aa80e2403d6c758a0a917ec6b8a23", "sha256": "7769e32be5ad03dade9b1d61c0c25991d8f646761460a78575e17e4fcd49ea8b" }, "downloads": -1, "filename": "flake8-pie-0.2.1.tar.gz", "has_sig": false, "md5_digest": "fc9aa80e2403d6c758a0a917ec6b8a23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3406, "upload_time": "2019-04-17T03:32:54", "url": "https://files.pythonhosted.org/packages/f0/ea/ee42a4eafe323282fb59c700f9c70e94054e6e4e0ac0dc59dfd37aad7195/flake8-pie-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "76402bf91cc15f985f4f836545844ddd", "sha256": "0a53441beaca3ffb91e9aae46a1012cf3dd112f415eefa8d7ab2440878b1247a" }, "downloads": -1, "filename": "flake8_pie-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "76402bf91cc15f985f4f836545844ddd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3633, "upload_time": "2019-05-27T15:00:22", "url": "https://files.pythonhosted.org/packages/4f/26/4804d3904e86f0e787da0a82d1f6cd42e48dbc180c9faf2c3d90ebb78f1b/flake8_pie-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1ae916ab14ae05264bfd250b9ede961", "sha256": "fbdd5d5a931426de70cecd391779baa5195d00ed17ab3eae122b228aaa568c75" }, "downloads": -1, "filename": "flake8-pie-0.2.2.tar.gz", "has_sig": false, "md5_digest": "c1ae916ab14ae05264bfd250b9ede961", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3447, "upload_time": "2019-05-27T15:00:24", "url": "https://files.pythonhosted.org/packages/96/44/6899f8da0c3ff6f0f6b4cd99bd1bb50166dbe6f74fc61663928538a6a50e/flake8-pie-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "e4f7cd9c00a78ac709d970f7ef46ee75", "sha256": "1f68d70390ac498df0c171cafed742040fa8b969fd83fe91e416e931e27ab94c" }, "downloads": -1, "filename": "flake8_pie-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e4f7cd9c00a78ac709d970f7ef46ee75", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 6639, "upload_time": "2019-06-27T01:50:10", "url": "https://files.pythonhosted.org/packages/85/64/bfae864469b63e890268995ea4464b373a5da292a15a3345e0f461bd4ef1/flake8_pie-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58139cc3cd7786fd5207a2ed170fe2e5", "sha256": "6aff0f0ebc4648037997ee826d37fa29b633dd03c28e6ea5c6cc40159f79455f" }, "downloads": -1, "filename": "flake8-pie-0.3.0.tar.gz", "has_sig": false, "md5_digest": "58139cc3cd7786fd5207a2ed170fe2e5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3628, "upload_time": "2019-06-27T01:50:08", "url": "https://files.pythonhosted.org/packages/5a/c6/2cac279915989cbdab237da204a3bcf5ce0137e194bdec69349030fcd290/flake8-pie-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "8cd62771866172b7b2e643bb86f10ce6", "sha256": "95ceb14440429de6e445504db4f0e2ff7a80d227fb7ef68548ce5ac74751a60e" }, "downloads": -1, "filename": "flake8_pie-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8cd62771866172b7b2e643bb86f10ce6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 11097, "upload_time": "2019-07-03T02:47:59", "url": "https://files.pythonhosted.org/packages/4f/8e/1a4afc20c85ea7e7e24252b8a244445a2c1ed0dccfcf30edab41a81b5d2d/flake8_pie-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50dc79e646421546164c83ee2d6a40a3", "sha256": "09c71b6a52c08ee9f8bd8da5a5cd4a7a9a0ee2906b46472a66830bab085be26c" }, "downloads": -1, "filename": "flake8-pie-0.4.0.tar.gz", "has_sig": false, "md5_digest": "50dc79e646421546164c83ee2d6a40a3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5306, "upload_time": "2019-07-03T02:47:58", "url": "https://files.pythonhosted.org/packages/6e/2f/737139ce3ada9c94c79e6307f9f09ff4bee2c1cef511b6195d3eeed915fc/flake8-pie-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "3fc3cf2b94bf2fe05b7110b062d89178", "sha256": "13485c25f88a710eebb460d0ee4af1731a13e2804f64ad6176934b984a1ecb17" }, "downloads": -1, "filename": "flake8_pie-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3fc3cf2b94bf2fe05b7110b062d89178", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 11154, "upload_time": "2019-07-03T17:07:42", "url": "https://files.pythonhosted.org/packages/95/65/bd520cb8d2f3ae5fff1679eb76b384bf1374adb303e90cbd410407204f2c/flake8_pie-0.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e829ecfb059a57454321b89455fba88b", "sha256": "c57f61a6bf9f979a30f5521f63f31be899c485c519b1b33b45a518d31f4d5ab9" }, "downloads": -1, "filename": "flake8-pie-0.4.1.tar.gz", "has_sig": false, "md5_digest": "e829ecfb059a57454321b89455fba88b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5319, "upload_time": "2019-07-03T17:07:40", "url": "https://files.pythonhosted.org/packages/34/6f/e03d1f7e86d0934a1cf6ce6681f15bbabf0f222b2e6674a6d7746fc17ea6/flake8-pie-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "cea680c73b877d4d7af856dea0c8ac29", "sha256": "f7a821815e60023b9d50d437b97835f44ec15c11a75b20f7f832b7e6e67a7f90" }, "downloads": -1, "filename": "flake8_pie-0.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "cea680c73b877d4d7af856dea0c8ac29", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 11722, "upload_time": "2019-07-09T01:34:58", "url": "https://files.pythonhosted.org/packages/e5/f5/e80798609837adb73340e96d8611a66b72f2271f334676d5795df2dcdf25/flake8_pie-0.4.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b8bb3604bff6fbf818607c35966d734", "sha256": "7e24f7749cc701b0842901b676ca5a4b1c4e3719bcad1192c873dea70b6dee86" }, "downloads": -1, "filename": "flake8-pie-0.4.2.tar.gz", "has_sig": false, "md5_digest": "7b8bb3604bff6fbf818607c35966d734", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5404, "upload_time": "2019-07-09T01:34:57", "url": "https://files.pythonhosted.org/packages/83/16/d19a8d1956b5baafc25a4910fa2f20d1ebf0c7aa2fc567d75f43ea76302a/flake8-pie-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cea680c73b877d4d7af856dea0c8ac29", "sha256": "f7a821815e60023b9d50d437b97835f44ec15c11a75b20f7f832b7e6e67a7f90" }, "downloads": -1, "filename": "flake8_pie-0.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "cea680c73b877d4d7af856dea0c8ac29", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 11722, "upload_time": "2019-07-09T01:34:58", "url": "https://files.pythonhosted.org/packages/e5/f5/e80798609837adb73340e96d8611a66b72f2271f334676d5795df2dcdf25/flake8_pie-0.4.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b8bb3604bff6fbf818607c35966d734", "sha256": "7e24f7749cc701b0842901b676ca5a4b1c4e3719bcad1192c873dea70b6dee86" }, "downloads": -1, "filename": "flake8-pie-0.4.2.tar.gz", "has_sig": false, "md5_digest": "7b8bb3604bff6fbf818607c35966d734", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5404, "upload_time": "2019-07-09T01:34:57", "url": "https://files.pythonhosted.org/packages/83/16/d19a8d1956b5baafc25a4910fa2f20d1ebf0c7aa2fc567d75f43ea76302a/flake8-pie-0.4.2.tar.gz" } ] }