summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #931 from suzil/fix/767/chained-is-not-E714Ian Stapleton Cordasco2020-05-081-0/+9
|\ | | | | E714: fix chained `is not`
| * HandleSusannah Klaneček2020-05-011-0/+3
| |
| * E714: fix chained is notSusannah Klaneček2020-05-011-0/+6
| | | | | | | | Closes #767
* | Merge pull request #927 from asottile/allow_typing_one_liners_againIan Stapleton Cordasco2020-05-081-0/+26
|\ \ | |/ |/| re-allow decorated one-liners
| * re-allow decorated one-linersAnthony Sottile2020-04-271-0/+26
| |
* | E306: fix detection inside `async def`E306_async_defAnthony Sottile2020-04-281-0/+5
|/
* Instrument code coverageAnthony Sottile2020-03-242-64/+28
|
* Merge pull request #918 from asottile/only_positionalAnthony Sottile2020-03-241-1/+13
|\ | | | | Fix E225 for PEP 570 all positional-only arguments
| * Fix E225 for PEP 570 all positional-only argumentsAnthony Sottile2020-03-231-1/+13
| |
* | Allow N-and-fewer blank lines before the first top level thingAnthony Sottile2020-03-233-8/+11
|/
* Merge pull request #913 from anntzer/afteronelinerblockAnthony Sottile2020-03-231-0/+4
|\ | | | | 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/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-262-1/+43
|/ | | | | "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-0/+5
|\ | | | | Adds matmul operator support, fixes #768
| * Adds matmul operator support, fixes #768sobolevn2019-12-051-0/+5
| |
* | Merge branch 'master' into masterNikita Serba2020-01-223-0/+34
|\ \ | |/
| * Merge pull request #879 from FichteForks/pr/pep-572Ian Stapleton Cordasco2019-10-211-0/+12
| |\ | | | | | | Add support for assignment expressions
| | * Add support for assignment expressionsFichteFoll2019-07-311-0/+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-0/+15
| |\ \ | | |/ | |/| E402: Add "with" statement to allowed keywords
| | * E402: Add "elif" statement to allowed keywordsEric Cousineau2019-09-251-0/+4
| | |
| | * E402: Add "if" statement to allowed keywordsEric Cousineau2019-01-301-0/+5
| | |
| | * E402: Add "with" statement to allowed keywordsEric Cousineau2019-01-301-0/+6
| | |
| * | Ellipsis is not a binary operatorAnthony Sottile2019-07-111-0/+7
| | |
* | | Typo fix (rename python38 to python38.py)Nikita Serba2020-01-221-0/+0
| | |
* | | Create python38Nikita Serba2020-01-221-0/+3
|/ /
* | Fix E302 false negative in presence of decorators.Antony Lee2019-03-261-0/+8
| |
* | Fix E721 false positiveAnthony Sottile2019-03-011-0/+3
| |
* | Check for 'is' and 'in' as wellAdam Johnson2019-02-281-0/+4
| |
* | E225 Check for space around boolean operatorsAdam Johnson2019-02-271-0/+4
| | | | | | | | 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-316-25/+28
|/ | | | Fixes #836
* Allow W605 to be silenced by noqaAnthony Sottile2019-01-261-0/+4
|
* Add check for over-indented blocksJon Dufresne2019-01-246-29/+33
| | | | | | | | | 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-232-0/+29
|\ | | | | Allow omitting blank lines around one-liner definitions.
| * Allow omitting blank lines around one-liner definitions.Antony Lee2019-01-052-0/+29
| |
* | Merge pull request #819 from wwwjfy/issue-811Ian Stapleton Cordasco2019-01-231-0/+3
|\ \ | | | | | | fix #811, corner cases for async/await check
| * | fix #811, corner cases for async/await checkTony Wang2018-11-241-0/+3
| |/
* | Add whitespace around -> annotating operator (#809)Tomer Keren2018-12-072-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | add test for demonstrationTony Wang2018-11-251-0/+4
|/
* Make W605 point to the invalid sequenceMarius Gedminas2018-11-221-3/+10
| | | | | | | Instead of having W605 point to the beginning of the string literal, make it point to the precise line and column of the invalid escape sequence. This is more helpful when you have multiline string literals.
* Add offsets for other W605 testsAnthony Sottile2018-10-211-2/+2
|
* Fix line offset for 'invalid escape sequence'Anthony Sottile2018-10-201-0/+4
|
* Remove suggestion and documentation of using unmaintained noseJon Dufresne2018-09-151-4/+0
| | | | | | | | | | | | | | The nose project has ceased development. The last commit is from Mar 3, 2016. From their docs page: https://nose.readthedocs.io/ > Note to Users > > Nose has been in maintenance mode for the past several years and will > likely cease without a new person/team to take over maintainership. > New projects should consider using Nose2, py.test, or just plain > unittest/unittest2.
* Remove support for EOL Python 2.6 and 3.3Jon Dufresne2018-06-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 2.6 an 3.3 are end of life. They are no longer receiving bug fixes, including for security issues. Python 2.6 went EOL on 2013-10-29 and 3.3 on 2017-09-29. For additional details on support Python versions, see: https://devguide.python.org/#status-of-python-branches Removing support for EOL Pythons will reduce testing and maintenance resources. Removed all workarounds for older Pythons. Updated trove classifiers and documentation to better communicate supported Python versions. Additionally, pass python_requires argument to setuptools. Helps pip decide what version of the library to install. https://packaging.python.org/tutorials/distributing-packages/#python-requires > If your project only runs on certain Python versions, setting the > python_requires argument to the appropriate PEP 440 version specifier > string will prevent pip from installing the project on other Python > versions. https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords > python_requires > > A string corresponding to a version specifier (as defined in PEP 440) > for the Python version, used to specify the Requires-Python defined in > PEP 345. Can now use more modern Python syntax including dictionary comprehension as well as more generators. Closes #755
* Pydoc fixes to support W505 in self-checksBrian Van Klaveren2018-05-112-38/+40
|
* Implement W505 - Max Doc Length checkBrian Van Klaveren2018-05-114-26/+33
|
* Fix detection of annotated argument defaultsJimmy Jia2018-04-181-0/+3
| | | | | This improves E252 to allow default arguments like `_default(f=1)`. Closes gh-753
* Add variables so blank lines may be configuresAdi Roiban2018-04-083-1/+581
| | | | | | | | This adds some module level configuration points for users to define how many blank lines they want in their code. It paves the way for someone to develop a flake8 plugin to configure this in pycodestyle. Fixes #732
* Ignore length of shebang line (#736)Jimi Cullen2018-04-031-0/+4
| | | | | | | | * Add special case to maximum_line_length to ignore long shebang lines. * Add test for ignoring long shebang lines. * Clean up shebang line check.
* Finalize support for Python 3.7Adi Roiban2018-03-243-3/+3
| | | | | | | | Python 3.7 added a warning for a future feature of nested regular expressions. To avoid this warning we escape what is not a nested regex. This also keeps track of the `async` keyword and handles it appropriately. Closes gh-728
* Merge pull request #684 from jdufresne/async-awaitIan Stapleton Cordasco2018-02-171-0/+45
|\ | | | | Add W606 warning for async and await keywords in Python 3.7