summaryrefslogtreecommitdiff
path: root/pycodestyle.py
Commit message (Collapse)AuthorAgeFilesLines
* 2.7.0Anthony Sottile2021-03-141-1/+1
|
* use tokenize.open to avoid incorrect line endings at beginning of fileAnthony Sottile2021-01-071-4/+2
|
* Support for space indents with size other than 4Jason Ansel2020-11-181-12/+28
| | | | This is an updated revision of pull requests #206 and #524
* fix skipping of physical checks when file does not end in newlineAnthony Sottile2020-09-111-5/+14
|
* 2.6.0Anthony Sottile2020-05-081-1/+1
|
* Merge pull request #931 from suzil/fix/767/chained-is-not-E714Ian Stapleton Cordasco2020-05-081-1/+2
|\ | | | | E714: fix chained `is not`
| * HandleSusannah Klaneček2020-05-011-2/+2
| |
| * E714: fix chained is notSusannah Klaneček2020-05-011-1/+2
| | | | | | | | Closes #767
* | Merge pull request #927 from asottile/allow_typing_one_liners_againIan Stapleton Cordasco2020-05-081-10/+40
|\ \ | |/ |/| re-allow decorated one-liners
| * re-allow decorated one-linersAnthony Sottile2020-04-271-10/+40
| |
* | E306: fix detection inside `async def`E306_async_defAnthony Sottile2020-04-281-1/+1
|/
* 2.6.0a1Anthony Sottile2020-04-021-1/+1
|
* Merge pull request #918 from asottile/only_positionalAnthony Sottile2020-03-241-1/+10
|\ | | | | Fix E225 for PEP 570 all positional-only arguments
| * Fix E225 for PEP 570 all positional-only argumentsAnthony Sottile2020-03-231-1/+10
| |
* | Allow N-and-fewer blank lines before the first top level thingAnthony Sottile2020-03-231-1/+1
|/
* Merge pull request #913 from anntzer/afteronelinerblockAnthony Sottile2020-03-231-0/+1
|\ | | | | Correctly allow *two* blank lines after a block of one-liners.
| * Correctly allow *two* blank lines after a block of one-liners.Antony Lee2020-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously ``` def oneliner(): pass def otheroneliner(): pass def really_long_func(): with_some_contents ``` would raise an "E302: expected 2 blank lines, found zero" at the last line of the one liner. Ultimately, this is due to `expand_indent` being passed a line whose contents are just a newline and nothing else, and `expand_indent` thinking that the line is indented by 1 character (the newline), which is wrong. Fix that by just stripping the newline, and modify a test to cover this case.
* | Support visual indent of continuation lines after with/assert/raise.Antony Lee2020-02-261-0/+3
|/ | | | | "with" is likely the most common case, and this indentation is explicitly given as example by PEP8 (under "maximum line length").
* Merge pull request #897 from sobolevn/issue-768Anthony Sottile2020-02-191-1/+1
|\ | | | | Adds matmul operator support, fixes #768
| * Adds matmul operator support, fixes #768sobolevn2019-12-051-1/+1
| |
* | Merge branch 'master' into masterNikita Serba2020-01-221-10/+21
|\ \ | |/
| * Merge pull request #879 from FichteForks/pr/pep-572Ian Stapleton Cordasco2019-10-211-5/+12
| |\ | | | | | | Add support for assignment expressions
| | * Add support for assignment expressionsFichteFoll2019-07-311-5/+12
| | | | | | | | | | | | | | | | | | Introduced in Python 3.8 with PEP-572. Refer to https://www.python.org/dev/peps/pep-0572.
| * | Merge pull request #834 from EricCousineau-TRI/issue/833Ian Stapleton Cordasco2019-09-251-4/+5
| |\ \ | | |/ | |/| E402: Add "with" statement to allowed keywords
| | * E402: Add "elif" statement to allowed keywordsEric Cousineau2019-09-251-1/+1
| | |
| | * E402: Add "if" statement to allowed keywordsEric Cousineau2019-01-301-1/+2
| | |
| | * E402: Add "with" statement to allowed keywordsEric Cousineau2019-01-301-4/+4
| | |
| * | Ellipsis is not a binary operatorAnthony Sottile2019-07-111-1/+4
| | |
* | | Update pycodestyle.pyNikita Serba2020-01-221-1/+1
| | | | | | | | | Co-Authored-By: Anthony Sottile <asottile@umich.edu>
* | | Added support for PEP 570 (#867)Nikita S2019-07-021-0/+4
|/ /
* | Fix E302 false negative in presence of decorators.Antony Lee2019-03-261-6/+7
| |
* | Add line breaks in commentSebastian Rettenberger2019-03-081-1/+2
| |
* | Add lines breaksSebastian Rettenberger2019-03-081-2/+4
| |
* | Fixes some issues with E741 detectionSebastian Rettenberger2019-03-081-4/+32
| |
* | Fix E721 false positiveAnthony Sottile2019-03-011-1/+1
| |
* | Check for 'is' and 'in' as wellAdam Johnson2019-02-281-1/+1
| |
* | E225 Check for space around boolean operatorsAdam Johnson2019-02-271-2/+5
| | | | | | | | This was documented in the docstring for `missing_whitespace_around_operator` but not implemented, allowing e.g. `1and 0` to pass. Fixed by adding test case then modifying the check to search for the 'and' and 'or' operators as well.
* | Expect lines to be indented 8 places when tabs are usedJon Dufresne2019-01-311-3/+5
|/ | | | Fixes #836
* Add release notes for 2.5.02.5.0Ian Stapleton Cordasco2019-01-291-1/+1
| | | | Bump version to 2.5.0 for release
* Allow W605 to be silenced by noqaAnthony Sottile2019-01-261-1/+4
|
* Add check for over-indented blocksJon Dufresne2019-01-241-1/+5
| | | | | | | | | In a project with all lines indented 4 spaces, I noticed pycodestyle was not catching code that was accidentally indented two levels (8 spaces). The over indentation was unintended and can be caught during static analysis. Fixes #430
* Merge pull request #823 from anntzer/allow-no-blanks-around-one-linersIan Stapleton Cordasco2019-01-231-0/+10
|\ | | | | Allow omitting blank lines around one-liner definitions.
| * Allow omitting blank lines around one-liner definitions.Antony Lee2019-01-051-0/+10
| |
* | Merge pull request #819 from wwwjfy/issue-811Ian Stapleton Cordasco2019-01-231-0/+14
|\ \ | | | | | | fix #811, corner cases for async/await check
| * | fix #811, corner cases for async/await checkTony Wang2018-11-241-0/+14
| |/
* | Add whitespace around -> annotating operator (#809)Tomer Keren2018-12-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Test for whitespace around -> operator Tests will pass after fixing issue #803 * Require whitespace around -> operator Closes: #803 * Move tests to correct cases * Whitelist python3 only tests * Fix whitespace test errors Huge thanks to @asottile! * Address code review Pushing this directly to run full testsuite on travis * :bug:Change error code to space around bitwise operator E227 * Check for -> annotation only in py3.5+ * Skip tests meant for higher versions of python * Move type annotation tests to python3.5 testsuite Type annotations were first introduced in PEP 484,https://www.python.org/dev/peps/pep-0484/ implemented in python3.5 * Shorten line skipping tests by version * Replace test skipping logic As requested in code review * Run formatting to avoid long lines
* | refs W606, only NAME can follow awaitTony Wang2018-11-241-1/+1
|/ | | | await NUMBER or await STRING is not valid syntax
* Merge pull request #801 from mwhudson/tokenizer-compatIan Stapleton Cordasco2018-11-221-2/+2
|\ | | | | Keep compability with stdlib tokenize.py changes
| * Keep compability with stdlib tokenize.py changesMichael Hudson-Doyle2018-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | https://github.com/python/cpython/commit/c4ef4896eac86a6759901c8546e26de4695a1389 is not yet part of any release of Python but has been backported to all versions in Git (includeing 2.7!). It causes the tokenize.py module to emit a synthetic NEWLINE token for files that do not in fact end with a newline, which confuses pycodestyle's checks for blank lines at the end of a file. Fortunately the synthetic NEWLINE tokens are easy to detect (the token text is ""). Fixes #786
* | Microoptimisation: avoid creating string slicesMarius Gedminas2018-11-221-1/+1
| | | | | | | | str.count() can limit the counting to a range of string positions.