| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
E714: fix chained `is not`
|
| | |
|
| |
| |
| |
| | |
Closes #767
|
|\ \
| |/
|/| |
re-allow decorated one-liners
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
Fix E225 for PEP 570 all positional-only arguments
|
| | |
|
|/ |
|
|\
| |
| | |
Correctly allow *two* blank lines after a block of one-liners.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
"with" is likely the most common case, and this indentation is
explicitly given as example by PEP8 (under "maximum line length").
|
|\
| |
| | |
Adds matmul operator support, fixes #768
|
| | |
|
|\ \
| |/ |
|
| |\
| | |
| | | |
Add support for assignment expressions
|
| | |
| | |
| | |
| | |
| | |
| | | |
Introduced in Python 3.8 with PEP-572.
Refer to https://www.python.org/dev/peps/pep-0572.
|
| |\ \
| | |/
| |/| |
E402: Add "with" statement to allowed keywords
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
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.
|
|/
|
|
| |
Fixes #836
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
Allow omitting blank lines around one-liner definitions.
|
| | |
|
|\ \
| | |
| | | |
fix #811, corner cases for async/await check
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
|/ |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
This improves E252 to allow default arguments like `_default(f=1)`.
Closes gh-753
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
* Add special case to maximum_line_length to ignore long shebang lines.
* Add test for ignoring long shebang lines.
* Clean up shebang line check.
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
Add W606 warning for async and await keywords in Python 3.7
|