{ "info": { "author": "fcracker79", "author_email": "fcracker79@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Topic :: Software Development" ], "description": "|build status|\n\naccrocchio\n==========\n\nAccrocchio is a library to mark and being notified of smelly code\n(a.k.a, \"accrocchio\").\n\nExample\n-------\n\n.. code:: python\n\n from accrocchio.badgeofshame import accrocchio\n from accrocchio import observers\n\n\n class AClassThatSmells(metaclass=accrocchio):\n pass\n\n @accrocchio\n def a_function_that_smells():\n pass\n\n\n accrocchio.how_many() # here we have 1, as you have declared a smelly class\n AClassThatSmells()\n accrocchio.how_many() # here we have 2, as you have created an instance of a smelly class\n a_function_that_smells()\n accrocchio.how_many() # here we have 3, as you have invoked a smelly function\n\n accrocchio.reset()\n accrocchio.how_many() # here we have 0\n\n # You can also be notified of smelly code execution, such as:\n\n class MyAccrocchioObserver(observers.AccrocchioObserver):\n def on_accrocchio(self):\n print('Another accrocchio!')\n\n def reset(self):\n print('Reset accrocchi')\n accrocchio.add_observer(MyAccrocchioObserver())\n a_function_that_smells() # prints 'Another accrocchio!'\n accrocchio.reset() # prints 'Reset accrocchi'\n\nIt is also possible to decorate the entire class. Both the declaration\nand the instantiation of such classes increase the accrocchio counters.\n\n.. code:: python\n\n from accrocchio.badgeofshame import accrocchio\n from accrocchio import observers\n\n\n @accrocchio\n class AClassThatSmells:\n pass\n\n\n accrocchio.how_many() # here we have 1, as you have declared a smelly class\n AClassThatSmells()\n accrocchio.how_many() # here we have 2, as you have created an instance of a smelly class\n\nYou might declare an accrocchio using type hinting, as follows:\n\n.. code:: python\n\n from accrocchio.badgeofshame import accrocchio, detonator\n\n\n def f(a: detonator[int]):\n pass\n\n accrocchio.how_many() # here we have 1, as you have declared a smelly parameter\n detonator.how_many() # here we have 1, as you have declared a smelly parameter\n\n f(1)\n accrocchio.how_many() # here we still have 1\n detonator.how_many() # here we still have 1\n\nThe library also implements `Michael Duell's resign\npatterns `__.\n\n.. code:: python\n\n from accrocchio.badgeofshame import accrocchio, detonator\n\n\n @accrocchio\n def accrocchio_fun():\n pass\n\n\n @detonator\n def detonator_fun():\n pass\n\n\n accrocchio_fun()\n accrocchio.how_many() # here we have 1, as you have invoked an accrocchio function\n detonator.how_many() # here we have 0, as you have never invoked a detonator function\n detonator_fun()\n detonator.how_many() # here we have 1, as you have invoked a detonator function\n accrocchio.how_many() # here we have 2, as you have invoked a detonator function, which is an accrocchio\n\nYou may mark arbitrary code as an accrocchio:\n\n.. code:: python\n\n from accrocchio.badgeofshame import detonator, epoxy, this_is_a, this_is_an\n\n this_is_an(epoxy)\n this_is_a(detonator)\n detonator.how_many() # this will be 1\n epoxy.how_many() # this will be 1\n\nIf you need to have to mark a specific portion of your code as an\naccrocchio, you can use it as a context manager, as follows:\n\n.. code:: python\n\n from accrocchio.badgeofshame import detonator, epoxy\n\n with detonator:\n ...\n\n with epoxy:\n ...\n\n detonator.how_many() # this will be 1\n epoxy.how_many() # this will be 1\n\nFor a full list of the implemented accrocchio resign patterns, please\nconsult `Michael Duell's resign\npatterns `__.\n\nSome final notes:\n\n1. This library is useful only if a small part of the software is an\n accrocchio\n2. We intentionally left out Python versions before 3.5, as we think\n they are a complete accrocchio.\n3. We intentionally did not pass the accrocchio to the 'on\\_accrocchio'\n observer function, as you should treat all the accrocchioes the same\n way\n4. The plural for accrocchio is accrocchioes\n5. If you are using this library, you are deliberately brutalizing The\n Zen of Python; thus it has been replaced with a more appropriate one.\n Just do ``import this`` after ``import accrocchio``.\n\n.. |build status| image:: https://img.shields.io/travis/fcracker79/accrocchio/master.svg?style=flat-square\n :target: https://travis-ci.org/fcracker79/accrocchio", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fcracker79/accrocchio", "keywords": "accrocchio hinting linting qa design patterns resign", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "accrocchio", "package_url": "https://pypi.org/project/accrocchio/", "platform": "", "project_url": "https://pypi.org/project/accrocchio/", "project_urls": { "Homepage": "https://github.com/fcracker79/accrocchio" }, "release_url": "https://pypi.org/project/accrocchio/0.1.13/", "requires_dist": null, "requires_python": "", "summary": "Accrocchio is a library to mark and being notified of smelly code (a.k.a, \"accrocchio\").", "version": "0.1.13" }, "last_serial": 3689244, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f9e7c9ee85ad5ec1128dab935a6dbf42", "sha256": "6a58a520c0f37de69bb8750f86069acd2e68567fbf0e477e3d81a5a09e106bad" }, "downloads": -1, "filename": "accrocchio-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f9e7c9ee85ad5ec1128dab935a6dbf42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2507, "upload_time": "2017-09-20T22:52:44", "url": "https://files.pythonhosted.org/packages/19/62/71faa0b7abc9092a6ba424f9f6a3f44413c79ad9eeed38feb66ebdf7dbe3/accrocchio-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "eaf9fc235315433eea62db5b2f15194f", "sha256": "9766adbddac8150ebabd39e49f07cf5b0df3bbb238e0ab1bd14a2c3413ff57bd" }, "downloads": -1, "filename": "accrocchio-0.1.1.tar.gz", "has_sig": false, "md5_digest": "eaf9fc235315433eea62db5b2f15194f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4831, "upload_time": "2017-09-21T20:39:19", "url": "https://files.pythonhosted.org/packages/07/b9/fed682678b9152125639c98a622243b444ef36e48b019327e4dab9cc402d/accrocchio-0.1.1.tar.gz" } ], "0.1.10": [ { "comment_text": "", "digests": { "md5": "3be3a45d4d23a06e6428b71c9afdc6cb", "sha256": "5d4b97e5468ddd555aacf1dc7ff36332a9bfdebab9697ac5112b3b7952191939" }, "downloads": -1, "filename": "accrocchio-0.1.10.tar.gz", "has_sig": false, "md5_digest": "3be3a45d4d23a06e6428b71c9afdc6cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6494, "upload_time": "2017-10-14T13:53:09", "url": "https://files.pythonhosted.org/packages/ba/41/c2ade85d2229ee4c855bb24c095aa38343299187a8095678db2769685922/accrocchio-0.1.10.tar.gz" } ], "0.1.11": [ { "comment_text": "", "digests": { "md5": "7760309c58cb07ffeae425f399a92dce", "sha256": "b6e052943df85b9850cb108f056e107a4f06dd897827312ee2fc25b7e037c43b" }, "downloads": -1, "filename": "accrocchio-0.1.11.tar.gz", "has_sig": false, "md5_digest": "7760309c58cb07ffeae425f399a92dce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6620, "upload_time": "2017-11-01T20:21:23", "url": "https://files.pythonhosted.org/packages/52/8e/3852f580a3c83722b428f0cfd938ea1f9b9971d4c928dbbfdbcd97ab2fcc/accrocchio-0.1.11.tar.gz" } ], "0.1.12": [ { "comment_text": "", "digests": { "md5": "b313209fe264b5c85634cec71ca44464", "sha256": "b8be4797e810b35acf8da4ba8f9be588c7d8f5d25ed0ea291c1665638483b331" }, "downloads": -1, "filename": "accrocchio-0.1.12.tar.gz", "has_sig": false, "md5_digest": "b313209fe264b5c85634cec71ca44464", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6863, "upload_time": "2017-11-03T20:57:58", "url": "https://files.pythonhosted.org/packages/7d/a2/46ccd460173c8515afa542a2456f2af9ba5cefead50df2738165cc805ac1/accrocchio-0.1.12.tar.gz" } ], "0.1.13": [ { "comment_text": "", "digests": { "md5": "80764c1a458b626afcb2ad1c36edc367", "sha256": "8244005415be1f911ce183a65e32892af6cb4ee1f0b24bdb337927a16583a61d" }, "downloads": -1, "filename": "accrocchio-0.1.13.tar.gz", "has_sig": false, "md5_digest": "80764c1a458b626afcb2ad1c36edc367", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7020, "upload_time": "2018-03-20T21:05:45", "url": "https://files.pythonhosted.org/packages/9c/81/7ce2767453ec7dbd425a5e8c896351d109c14129f18684febbe29b708ff8/accrocchio-0.1.13.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f805b7782569e551c427513f741ffc58", "sha256": "a17a38845bc30fbe20fa8fcb4f5fb89fa56e4f7091225411a8788d85ce16b197" }, "downloads": -1, "filename": "accrocchio-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f805b7782569e551c427513f741ffc58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4887, "upload_time": "2017-09-23T12:48:01", "url": "https://files.pythonhosted.org/packages/14/ea/30a0c0f779d000f54994dc126404c712a8397b3bfb2e9441a2e5fce0e3dd/accrocchio-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8573165a3e49b1b610c10eb38dec8f48", "sha256": "8ea29beb1d1dc8826532bc79159784308beb823eff0aaa08bcf3e6b3cbf33ccd" }, "downloads": -1, "filename": "accrocchio-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8573165a3e49b1b610c10eb38dec8f48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5113, "upload_time": "2017-09-23T12:49:42", "url": "https://files.pythonhosted.org/packages/69/d3/efb641c12242614c7554ed5843251dce7804688e08440598c1e5eb6c9827/accrocchio-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "8c4ea9cc191ffd2e655bd483d69fe230", "sha256": "6246c7e21282f3efe65fe2eed1b7cb067a011f5f6fe6d621a517d1bd394cd1d0" }, "downloads": -1, "filename": "accrocchio-0.1.4.tar.gz", "has_sig": false, "md5_digest": "8c4ea9cc191ffd2e655bd483d69fe230", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5393, "upload_time": "2017-09-23T12:52:06", "url": "https://files.pythonhosted.org/packages/c7/d7/de644bc41147454de6c5d25c1845f566a09ee2e6b40f53c1858e7d997f91/accrocchio-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "bc2169527578b7779b4f6bd528d16dcc", "sha256": "dd554ce3659e40086b4f06633d7c3d6af5c74de61c1838c72ae9bae383f48ae4" }, "downloads": -1, "filename": "accrocchio-0.1.5.tar.gz", "has_sig": false, "md5_digest": "bc2169527578b7779b4f6bd528d16dcc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5397, "upload_time": "2017-09-23T12:53:26", "url": "https://files.pythonhosted.org/packages/a0/9a/05dceb32d307570fa0423a656427b23a33d78e9a44eb52d585dbb2472e24/accrocchio-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "28825fe4ec3e7ef5763234c257747663", "sha256": "4658fd73f61e751c103a8a988afb7df8bef25bda9c8d5d61e8ce53c2c7c1d345" }, "downloads": -1, "filename": "accrocchio-0.1.6.tar.gz", "has_sig": false, "md5_digest": "28825fe4ec3e7ef5763234c257747663", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5402, "upload_time": "2017-09-23T12:55:18", "url": "https://files.pythonhosted.org/packages/92/99/f8c5262ad15690a4ee1abf153d6bcbee98ba3b2dba981e1b96cc0db10b28/accrocchio-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "b40161bd035c60dd15dea859057cd5d2", "sha256": "c30654d8e3bbdb260f74ea258a775a1230bdce8f6661873a340ac055d0aa36fd" }, "downloads": -1, "filename": "accrocchio-0.1.7.tar.gz", "has_sig": false, "md5_digest": "b40161bd035c60dd15dea859057cd5d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5402, "upload_time": "2017-09-26T16:27:10", "url": "https://files.pythonhosted.org/packages/b8/f7/159db68db820b7a79e4cf560600c89b5ceb0d556219955c32a69abd4af9e/accrocchio-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "09442d3ff3602f40c88f27fe3c477d75", "sha256": "2c871b33876a003cf3e908f75e7a51083e771dbf6656e53728d30cb8342a2d9c" }, "downloads": -1, "filename": "accrocchio-0.1.8.tar.gz", "has_sig": false, "md5_digest": "09442d3ff3602f40c88f27fe3c477d75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5799, "upload_time": "2017-10-01T21:09:29", "url": "https://files.pythonhosted.org/packages/f1/d4/2c1b71ab8590d9037fd3d9ba102c9f464915a688171256c858d60aa6a052/accrocchio-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "2638c338d8308068b34f422224586c0a", "sha256": "55d9dfb558993de0598c8a4021f6665b5782cc23097e94f50a5b402df1efbe11" }, "downloads": -1, "filename": "accrocchio-0.1.9.tar.gz", "has_sig": false, "md5_digest": "2638c338d8308068b34f422224586c0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5951, "upload_time": "2017-10-03T14:43:14", "url": "https://files.pythonhosted.org/packages/b4/4c/6a665a0b386c814052fb2284efa9373744e987e98dccde8bcdef15f26859/accrocchio-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "80764c1a458b626afcb2ad1c36edc367", "sha256": "8244005415be1f911ce183a65e32892af6cb4ee1f0b24bdb337927a16583a61d" }, "downloads": -1, "filename": "accrocchio-0.1.13.tar.gz", "has_sig": false, "md5_digest": "80764c1a458b626afcb2ad1c36edc367", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7020, "upload_time": "2018-03-20T21:05:45", "url": "https://files.pythonhosted.org/packages/9c/81/7ce2767453ec7dbd425a5e8c896351d109c14129f18684febbe29b708ff8/accrocchio-0.1.13.tar.gz" } ] }