flake8_strict


Nameflake8_strict JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/smarkets/flake8-strict
SummaryFlake8 plugin that checks Python code against a set of opinionated style rules
upload_time2018-05-30 14:10:06
maintainerSmarkets Limited
docs_urlNone
authorSmarkets Limited
requires_python
licenseMIT
keywords flake8 plugin strict hanging indent trailing comma trailing commas
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            flake8-strict
=============

.. image:: https://travis-ci.org/smarkets/flake8-strict.png?branch=master
   :alt: Build status
   :target: https://travis-ci.org/smarkets/flake8-strict

Flake8 plugin that checks Python code against a set of opinionated style rules.

Compatible with Python 2.7, 3.3+, PyPy 2.6+ and PyPy 2.4+.

PyPI page: https://pypi.python.org/pypi/flake8_strict

GitHub page: https://github.com/smarkets/flake8-strict

To install using PyPI and pip::

    pip install flake8-strict


Error codes
-----------

* ``S100``: First argument on the same line
* ``S101``: Multi-line construct missing trailing comma


Limitations
-----------

* only source code without print statements is supported, this means:

  * all valid Python 3 code
  * Python 2 code with ``print_function`` enabled

* the existing checks are quite basic, they'll be improved and new
  ones will added
* line/column numbers are off currently
* code like this will cause a parsing error (lib2to3.pgen2.parse.ParseError:
  bad input)::

      some_name(
          x for x in range(1),
      )

  It's ironic but the trailing comma is the issue here, without it parsing
  works ok::

      some_name(
          x for x in range(1)
      )

  This is a limitation of the underlying parser library and is unlikely to
  be fixed in near future. Suggested workaround: wrap the generator in
  parentheses, like this::

      some_name(
          (x for x in range(1)),
      )

  If the function being called is dict or set the function calls can be
  replaced with dict and set comprehensions therefore avoiding the issue
  completely.



Versioning and backwards compatibility
--------------------------------------

Below 1.0.0: no guarantees.
Above 1.0.0, given a version number MAJOR.MINOR.PATCH:

* MAJOR is updated when backwards incompatible changes happen
* MINOR is updated when a new, backwards compatible, features are introduced
* PATCH is updated when a backwards compatible bug fixes are applied

Changes
-------

0.2.1
'''''

* Fix blib2to3 import

0.2.0
'''''

* Use custom lib2to3 for better support for Python 3.6+
* Fix trailing comma after *args/**kwargs for Python 3.6+
* Allow usage of Python 3.6 features (e.g f-strings) without crashing

0.1.9
'''''

* Fixed elements inside class definition not being linted correctly (issue #36)

0.1.8
'''''

* Revert previous change (0.1.7) due to a lib2to3 issue.

0.1.7
'''''

* Fixed trailing comma after *args/**kwargs for Python 3.6+ (issue #25)

0.1.6
'''''

* Fixed decorator arguments not being linted.
* Fixed multiline imports not being linted.
* Fixed class definitions not being linted.

0.1.5
'''''

* Fixed UnicodeDecodeError if file contains non-ascii symbols (issue #22)
* Fixed error if newline is omitted from end of file (issue #18)
* Fixed erroneous comma suggested when unpacking function parameter (issue #21)

0.1.4
'''''

* Fixed handling of one-element lists (https://github.com/smarkets/flake8-strict/issues/15)

0.1.3
'''''

* Fixed reading from stdin
* Fixed not being able to run when pycodestyle, not pep8, is installed (pep8
  has been renamed to pycodestyle and flake8 2.6.0+ doesn't trigger pep8
  installation anymore)
* Added support for set, list and dict literals and comprehensions
* Function calls with single, multi-line arguments are now treated more reasonably

0.1.2
'''''

* Fixed a "ValueError: need more than 2 values to unpack" error (GitHub issue #1).
* Fixed handling argument lists with keyword-only arguments
  (compatibility with PEP 3102), this now doesn't raise S101 in this
  case as it would be a syntax error.

0.1.1
'''''

* Fixed few ``AttributeError: 'Node' object has no attribute 'lineno'`` errors

0.1.0
'''''

First release


License
-------

Copyright (C) 2015 Smarkets Limited <support@smarkets.com>

This module is released under the MIT License: http://www.opensource.org/licenses/mit-license.php (or see the LICENSE file)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/smarkets/flake8-strict",
    "name": "flake8_strict",
    "maintainer": "Smarkets Limited",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "support@smarkets.com",
    "keywords": "flake8,plugin,strict,hanging indent,trailing comma,trailing commas",
    "author": "Smarkets Limited",
    "author_email": "support@smarkets.com",
    "download_url": "https://files.pythonhosted.org/packages/cb/e7/d1e2fd6d3e1991b0ac7cf7db777847a1ed299c45235d19595c275783d38c/flake8_strict-0.2.1.tar.gz",
    "platform": "",
    "description": "flake8-strict\n=============\n\n.. image:: https://travis-ci.org/smarkets/flake8-strict.png?branch=master\n   :alt: Build status\n   :target: https://travis-ci.org/smarkets/flake8-strict\n\nFlake8 plugin that checks Python code against a set of opinionated style rules.\n\nCompatible with Python 2.7, 3.3+, PyPy 2.6+ and PyPy 2.4+.\n\nPyPI page: https://pypi.python.org/pypi/flake8_strict\n\nGitHub page: https://github.com/smarkets/flake8-strict\n\nTo install using PyPI and pip::\n\n    pip install flake8-strict\n\n\nError codes\n-----------\n\n* ``S100``: First argument on the same line\n* ``S101``: Multi-line construct missing trailing comma\n\n\nLimitations\n-----------\n\n* only source code without print statements is supported, this means:\n\n  * all valid Python 3 code\n  * Python 2 code with ``print_function`` enabled\n\n* the existing checks are quite basic, they'll be improved and new\n  ones will added\n* line/column numbers are off currently\n* code like this will cause a parsing error (lib2to3.pgen2.parse.ParseError:\n  bad input)::\n\n      some_name(\n          x for x in range(1),\n      )\n\n  It's ironic but the trailing comma is the issue here, without it parsing\n  works ok::\n\n      some_name(\n          x for x in range(1)\n      )\n\n  This is a limitation of the underlying parser library and is unlikely to\n  be fixed in near future. Suggested workaround: wrap the generator in\n  parentheses, like this::\n\n      some_name(\n          (x for x in range(1)),\n      )\n\n  If the function being called is dict or set the function calls can be\n  replaced with dict and set comprehensions therefore avoiding the issue\n  completely.\n\n\n\nVersioning and backwards compatibility\n--------------------------------------\n\nBelow 1.0.0: no guarantees.\nAbove 1.0.0, given a version number MAJOR.MINOR.PATCH:\n\n* MAJOR is updated when backwards incompatible changes happen\n* MINOR is updated when a new, backwards compatible, features are introduced\n* PATCH is updated when a backwards compatible bug fixes are applied\n\nChanges\n-------\n\n0.2.1\n'''''\n\n* Fix blib2to3 import\n\n0.2.0\n'''''\n\n* Use custom lib2to3 for better support for Python 3.6+\n* Fix trailing comma after *args/**kwargs for Python 3.6+\n* Allow usage of Python 3.6 features (e.g f-strings) without crashing\n\n0.1.9\n'''''\n\n* Fixed elements inside class definition not being linted correctly (issue #36)\n\n0.1.8\n'''''\n\n* Revert previous change (0.1.7) due to a lib2to3 issue.\n\n0.1.7\n'''''\n\n* Fixed trailing comma after *args/**kwargs for Python 3.6+ (issue #25)\n\n0.1.6\n'''''\n\n* Fixed decorator arguments not being linted.\n* Fixed multiline imports not being linted.\n* Fixed class definitions not being linted.\n\n0.1.5\n'''''\n\n* Fixed UnicodeDecodeError if file contains non-ascii symbols (issue #22)\n* Fixed error if newline is omitted from end of file (issue #18)\n* Fixed erroneous comma suggested when unpacking function parameter (issue #21)\n\n0.1.4\n'''''\n\n* Fixed handling of one-element lists (https://github.com/smarkets/flake8-strict/issues/15)\n\n0.1.3\n'''''\n\n* Fixed reading from stdin\n* Fixed not being able to run when pycodestyle, not pep8, is installed (pep8\n  has been renamed to pycodestyle and flake8 2.6.0+ doesn't trigger pep8\n  installation anymore)\n* Added support for set, list and dict literals and comprehensions\n* Function calls with single, multi-line arguments are now treated more reasonably\n\n0.1.2\n'''''\n\n* Fixed a \"ValueError: need more than 2 values to unpack\" error (GitHub issue #1).\n* Fixed handling argument lists with keyword-only arguments\n  (compatibility with PEP 3102), this now doesn't raise S101 in this\n  case as it would be a syntax error.\n\n0.1.1\n'''''\n\n* Fixed few ``AttributeError: 'Node' object has no attribute 'lineno'`` errors\n\n0.1.0\n'''''\n\nFirst release\n\n\nLicense\n-------\n\nCopyright (C) 2015 Smarkets Limited <support@smarkets.com>\n\nThis module is released under the MIT License: http://www.opensource.org/licenses/mit-license.php (or see the LICENSE file)\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Flake8 plugin that checks Python code against a set of opinionated style rules",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/smarkets/flake8-strict"
    },
    "split_keywords": [
        "flake8",
        "plugin",
        "strict",
        "hanging indent",
        "trailing comma",
        "trailing commas"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2eb42de7d499d065bd9c37cd730a4c25bc894d9639352c307114531fbadc43e8",
                "md5": "4d7bee29545b67304d2f7cc7319434c4",
                "sha256": "2ef66f75f9215c2084ae7d1b18e158a3c392141a5621ecab28858256ea75d41e"
            },
            "downloads": -1,
            "filename": "flake8_strict-0.2.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4d7bee29545b67304d2f7cc7319434c4",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 5844,
            "upload_time": "2018-05-30T14:10:05",
            "upload_time_iso_8601": "2018-05-30T14:10:05.996846Z",
            "url": "https://files.pythonhosted.org/packages/2e/b4/2de7d499d065bd9c37cd730a4c25bc894d9639352c307114531fbadc43e8/flake8_strict-0.2.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cbe7d1e2fd6d3e1991b0ac7cf7db777847a1ed299c45235d19595c275783d38c",
                "md5": "ad84b9969cb73f89d44ed0d7110797a1",
                "sha256": "75d5c11babe3f3b2bc5349e645112571a1d80d6183bda99afe5ffdfc70192d10"
            },
            "downloads": -1,
            "filename": "flake8_strict-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ad84b9969cb73f89d44ed0d7110797a1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6026,
            "upload_time": "2018-05-30T14:10:06",
            "upload_time_iso_8601": "2018-05-30T14:10:06.925099Z",
            "url": "https://files.pythonhosted.org/packages/cb/e7/d1e2fd6d3e1991b0ac7cf7db777847a1ed299c45235d19595c275783d38c/flake8_strict-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2018-05-30 14:10:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "smarkets",
    "github_project": "flake8-strict",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "flake8_strict"
}
        
Elapsed time: 0.26142s