{ "info": { "author": "Soren Lind Kristiansen", "author_email": "soren@gutsandglory.dk", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "git\\_pep8\\_commit\\_hook\n=======================\n\n|Build Status|\n\nGit pre-commit hook for checking coding style of Python code. The hook\nrequires pep8. It will check files with the ``.py`` extension and files\nthat contain ``#!`` (shebang) and ``python`` in the first line. Heavily\ninspired by and partly based on `git-pylint-commit-hook`_ by Sebastian\nDahlgren.\n\nSince ``pep8`` itself, by default, looks for a ``setup.cfg`` file in the\nrepository root directory, so does this script. The script works without\nthe ``setup.cfg`` file. The options for the script can either be placed\nin the ``[pep8_pre_commit_hook]`` section of the configuration file or\nbe passed as command line parameters. If the same option is specified in\nboth the configuration file and the parameters, the configuration file\ntakes precedence.\n\nInstallation\n------------\n\nInstall via PyPI\n\n::\n\n pip install git_pep8_commit_hook\n\nUsage\n-----\n\nHaving installed the script, if you add it to your ``pre-commit`` file\nwhich should be placed in the ``hooks`` subfolder for the Git folder\n(usually ``.git/hooks``), it will be called automatically when you run\n``git commit``. If you want to skip the checks for a certain commit, you\ncan add the ``-n`` flag and run ``git commit -n``.\n\nConfiguration\n~~~~~~~~~~~~~\n\nBy default, the script looks for a ``setup.cfg`` in the root directory\nof your repository. If the script does not find a configuration file, it\nuses default settings. The file might look like this:\n\n::\n\n [pep8]\n ignore = E226,E302,E41\n max-line-length = 79\n\n [pep8_pre_commit_hook]\n max-violations-per-file = 5\n\nThe ``[pep8]`` section is used by pep8. The ``[pep8_pre_commit_hook]``\nsection is used by the commit hook script. You may specify the following\noptions:\n\n- **pep8-command** is for the actual command, for instance if pep8 is\n not installed globally, but is in a virtualenv inside the project\n itself.\n\n- **pep8-params** lets you pass custom parameters to pep8\n\n- **max-violations-per-file** lets you specify how many violations of\n the PEP 0008 standard you are willing to accept for any file. If at\n least one file has more than the specified number of violations, the\n commit will be blocked. The default value is 0.\n\nAlternatively you can pass the above directly to the commit hook script\nas arguments. In addition to the above, you can also pass the following\narguments to the script:\n\n- **config** lets you specify an alternative config file for both pep8\n itself and the commit hook script.\n\n- **version** displays the current version of the commit hook script.\n\n- **help** displays a help message explaining the arguments.\n\nRunning tests\n=============\n\nThe tests are written using ``pytest``. You can run the tests without\ninstalling pytest and without installing the script by typing\n``python runtests.py``. Alternatively, you can install pytest by running\n``pip install pytest``. The script itself can be installed in\ndevelopment mode by running ``pip install -e .`` from the root directory\nof the repository. Then the tests can be run by executing ``py.test``.\n\nRequirements\n============\n\nThis commit hook is written in Python and has the following\nrequirements:\n\n- `pep8`_ (``sudo pip install pep8``)\n- Python >= 2.7\n\nRelease notes\n=============\n\n0.1.0 (2015-09-11)\n------------------\n\n- Initial release.\n\n.. _git-pylint-commit-hook: https://github.com/sebdah/git-pylint-commit-hook\n\n.. |Build Status| image:: https://travis-ci.org/sorenlind/git_pep8_commit_hook.svg?branch=master\n :target: https://travis-ci.org/sorenlind/git_pep8_commit_hook\n\n.. _pep8: https://github.com/pycqa/pep8", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sorenlind/git_pep8_commit_hook", "keywords": "git commit pre-commit hook pep8 python", "license": "Apache License, Version 2.0", "maintainer": null, "maintainer_email": null, "name": "git-pep8-commit-hook", "package_url": "https://pypi.org/project/git-pep8-commit-hook/", "platform": "Any", "project_url": "https://pypi.org/project/git-pep8-commit-hook/", "project_urls": { "Homepage": "https://github.com/sorenlind/git_pep8_commit_hook" }, "release_url": "https://pypi.org/project/git-pep8-commit-hook/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Git commit hook that checks Python files with pep8.", "version": "0.1.0" }, "last_serial": 1718707, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7ab05e117efdfd1862e1ea2942bd472f", "sha256": "c6d188873a7fc7aa27d22ab34d948d3c660cb2eef20d92a06a4f336018233087" }, "downloads": -1, "filename": "git_pep8_commit_hook-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7ab05e117efdfd1862e1ea2942bd472f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8763, "upload_time": "2015-09-11T10:37:28", "url": "https://files.pythonhosted.org/packages/50/f3/79dc6830daf7e5edbba3d0ae644a24b40e69a0be62ac2c4ffa3336f1bda4/git_pep8_commit_hook-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b1e1d828383327c36eeb2b0f6e6cc68", "sha256": "432f27c621422b1ebcf9fd2c8275828878706ea1f05187991df2bafdd2e9fb2f" }, "downloads": -1, "filename": "git_pep8_commit_hook-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2b1e1d828383327c36eeb2b0f6e6cc68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9669, "upload_time": "2015-09-11T10:37:50", "url": "https://files.pythonhosted.org/packages/3f/b1/e5e992d5938ac8317951bbbf2dba8d9348642e339b8fa2eb3bce22e19d55/git_pep8_commit_hook-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7ab05e117efdfd1862e1ea2942bd472f", "sha256": "c6d188873a7fc7aa27d22ab34d948d3c660cb2eef20d92a06a4f336018233087" }, "downloads": -1, "filename": "git_pep8_commit_hook-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7ab05e117efdfd1862e1ea2942bd472f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8763, "upload_time": "2015-09-11T10:37:28", "url": "https://files.pythonhosted.org/packages/50/f3/79dc6830daf7e5edbba3d0ae644a24b40e69a0be62ac2c4ffa3336f1bda4/git_pep8_commit_hook-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b1e1d828383327c36eeb2b0f6e6cc68", "sha256": "432f27c621422b1ebcf9fd2c8275828878706ea1f05187991df2bafdd2e9fb2f" }, "downloads": -1, "filename": "git_pep8_commit_hook-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2b1e1d828383327c36eeb2b0f6e6cc68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9669, "upload_time": "2015-09-11T10:37:50", "url": "https://files.pythonhosted.org/packages/3f/b1/e5e992d5938ac8317951bbbf2dba8d9348642e339b8fa2eb3bce22e19d55/git_pep8_commit_hook-0.1.0.tar.gz" } ] }