Commit graph

490 commits

Author SHA1 Message Date
pre-commit-ci[bot]
66f83405dd [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-05-24 17:40:10 +00:00
Jouke Witteveen
efc15cf4f1 Automatically create output directories 2021-05-10 16:41:01 +02:00
Anthony Sottile
28aa67314e Release 3.9.2
-----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEzx3RsDHdsD/grSXv6HufUSpyIFEFAmCW67YTHGFzb3R0aWxl
 QHVtaWNoLmVkdQAKCRDoe59RKnIgUcXlD/0aBO7kjI2EuEuKty4GljtylySJIxQN
 uXMMND9OQO0sIE2Zs0a2zfNUgfIRz6InmbfmPw9lDvD2cDk53nqyA8fECl/IBWIZ
 iVIpdNRXgL3HoBfV/Zi32TU6WLsWSetvWtkG66XxgI7kZGNPS3eCRdJgHlkG4xVv
 YOtIYhm6faOQrUJeVP21ESknw5H/zHOrWhwuRyN6MqqLjKD8ZJCon/Hh5IJ0cHQW
 XxAMgTbjjWNmD1IPI28KSRU0xzb8y8Vu6aM68Cj8E0uD7WGdBDN4chq9xVwAg3T1
 Wwy+paxueKtqoQmvD4jOHGjweRElEUsLJbHNZbVrz3gY1SreZP780Dzu1cAltmx7
 smDahl31ADNO/kHu9LPLBKQD5jFAWFV00SwhHxLQ2SjQtDHdKj+P+q8FsPtEWR5u
 XyKC36IsJBtqpXhxFUQvvrWQ3/8khgxpTGEsffhrR9K5zx1sO+PF97Oz+EYJuaiM
 oDBYYOZsSxmMzftBrT6JyLBj/IjcCkstxfJ5558/TeygvECR88Y7lNggQBjVJ3s5
 kK4BDS5WrgbHaAPsi/rElqy/vhsYaZiSbTsSrv4AQc8jVHI37YFMRlDTWpDlOkmJ
 qPbX2noV/5zXxab89MSYI1VzXdhqEY66je8UmiznADfJS0nv7jHKAWIwmwItxtPi
 m4guaVVy5Y19jw==
 =yXIO
 -----END PGP SIGNATURE-----

Merge tag '3.9.2'

Release 3.9.2
2021-05-08 12:53:29 -07:00
Anthony Sottile
c6e0d27593 Release 3.9.2 2021-05-08 12:51:11 -07:00
Anthony Sottile
c428c55503 Merge pull request #1328 from PyCQA/fix_indent_size_str
correct and deprecate the value of indent_size_str
2021-05-08 12:45:45 -07:00
Anthony Sottile
0b565fe349 correct and deprecate the value of indent_size_str 2021-05-08 12:03:43 -07:00
Anthony Sottile
456e98486e short circuit on ast error before tokenization error 2021-04-18 10:08:11 -07:00
Anthony Sottile
af1668bf04 extend black formatting to tests as well 2021-04-18 09:23:48 -07:00
Anthony Sottile
a7174759e9 Release 3.9.1
-----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEzx3RsDHdsD/grSXv6HufUSpyIFEFAmB5CUkTHGFzb3R0aWxl
 QHVtaWNoLmVkdQAKCRDoe59RKnIgUQQuD/9ByVAa8QV9H1P8ExNnOF/D4nq7Xm0j
 NFRduVVHrGxIoMdoWu+4DmAjYABdRv/JPw7LXtUPC2oufG3On/EZWMsXN20rd7NI
 6TfhBLbitwVvHfN4PfQ2II+z3Pom5QKZ8/FTs+ku+SvCBhumgdsJNxw+Ti/+mvU9
 AhhbpRC7XIlYvvNxCs85xjZ8B5ARHoEoFmaaT90q8K8R9V0TjnxcIM5Y8lloAJBR
 qiTt0otmzw4DbeI3jO9KJVm2ojIOHnYpmt4kh/EiZDSYgx9z42AS8jtLWuEb39//
 JpbdJy8/Oviv55jIWyGY9/B+NpGigEpzbf2pSiXdgEpYyacXHewUNcTf9NEvoIfY
 pa0W5OVjN5ClFPCFsToZrhNq8MwUh8TafX7aXBdGoGTaSiP55VQuSwyxmiiyKrQm
 DnUQUzQ+AVL7dobxD72ui3AdvbfDevZcpGAMhdpvohowoWX4SQb1Rd6mG2anFNGl
 QHiPZkI86wDhoFatYUu9CyLvP1dV/bwCjhFll62YWrUQ+cmkgT+2dZHObn8csc5I
 IsEGf023Tc+KL/B9RHGlrYo3JJoNhvs/Jjt7Jnm3aFV+G2pT8nJ9wqxL9Z+uAWqw
 /1oyaOHmdS2RLPdr96S4C+DbP8weRBwUQjdbIHuXnlYHi6LSkFPGeVVU23mjRWyF
 5BaR4uyF9cl2zQ==
 =eMit
 -----END PGP SIGNATURE-----

Merge tag '3.9.1'

Release 3.9.1
2021-04-15 20:55:00 -07:00
Anthony Sottile
f7bda92963 Release 3.9.1 2021-04-15 20:49:00 -07:00
Ian Stapleton Cordasco
e3313e0949 Fix bug for plugins using extend_default_ignore
Since Flake8 3.0 we've had the ability for plugins to use
`extend_default_ignore` to register codes they want disabled by default.
This, however, was a permanent disabling unfortunately. Our code didn't
have a way of understanding that this new set of `ignore` codes was
actually the 'default' set for that run. Much like the
extended_select_list, we now attach extended_ignore_list to be able to
confidently determine if the ignore we get in the DecisionEngine is
actually the Default Ignore list and what plugins what us to ignore by
default.

Refs https://github.com/PyCQA/pep8-naming/pull/157
2021-04-15 18:42:17 -07:00
Ian Stapleton Cordasco
2bb0308363
Fix bug for plugins using extend_default_ignore
Since Flake8 3.0 we've had the ability for plugins to use
`extend_default_ignore` to register codes they want disabled by default.
This, however, was a permanent disabling unfortunately. Our code didn't
have a way of understanding that this new set of `ignore` codes was
actually the 'default' set for that run. Much like the
extended_select_list, we now attach extended_ignore_list to be able to
confidently determine if the ignore we get in the DecisionEngine is
actually the Default Ignore list and what plugins what us to ignore by
default.

Refs https://github.com/PyCQA/pep8-naming/pull/157
2021-04-15 13:26:08 -05:00
Frank Winklmeier
f98afbf7d9 Add --extend-select command line argument
Implement `--extend-select` command line argument following what was
done for `--extend-ignore` in !233. This option can be used to
selectively add individual codes without overriding the default list
entirely.

Addresses the remaining item of issue #1061.
2021-04-11 20:40:53 +02:00
Anthony Sottile
737e0492d0 improve code coverage in a few places 2021-04-07 08:52:26 -07:00
Anthony Sottile
3f10c04fd0 fix mypy errors 2021-04-07 08:28:11 -07:00
Anthony Sottile
55ce3f016e
Merge pull request #43 from sobolevn/patch-1
Typo fix
2021-04-03 20:35:49 -07:00
Anthony Sottile
3b57778160 fix links in code 2021-04-03 18:21:02 -07:00
Anthony Sottile
edadccd8dc audit + string joining 2021-03-30 17:37:13 -07:00
Anthony Sottile
e9a2a10183 audit % format calls 2021-03-30 17:37:13 -07:00
Anthony Sottile
c4c4351699 audit .format(...) calls 2021-03-30 17:37:13 -07:00
Anthony Sottile
cb36e206a5 com2ann 2021-03-30 17:37:13 -07:00
Anthony Sottile
64a610ed19 clean up TYPE_CHECKING imports 2021-03-30 17:37:13 -07:00
Anthony Sottile
83856872d3 clean up OrderedDict 2021-03-30 17:37:13 -07:00
Anthony Sottile
5d43462c9d clean up version_info references 2021-03-30 17:37:13 -07:00
Anthony Sottile
018dbcd69a clean up _stdin_get_value_py3 2021-03-30 17:37:13 -07:00
Anthony Sottile
4d57a20ffd clean up readlines_py2 2021-03-30 17:37:13 -07:00
Anthony Sottile
3a85c8ce96 clean up string_types 2021-03-30 17:37:13 -07:00
Anthony Sottile
5b9edd04ee clean up lru_cache in compat 2021-03-30 17:37:13 -07:00
Anthony Sottile
358ae85120 automatic: pyupgrade --py36-plus 2021-03-30 17:37:13 -07:00
Anthony Sottile
55f29c636f introduce pyupgrade, run it in python2-compatible mode 2021-03-29 20:21:36 -07:00
Anthony Sottile
83fc824ca1 remove flake8 setuptools command 2021-03-29 20:15:45 -07:00
Anthony Sottile
8ba8bc9fed remove unused noqa comments 2021-03-29 19:18:34 -07:00
Anthony Sottile
1a1d850e99 remove vcs integration 2021-03-29 19:01:59 -07:00
Nikita Sobolev
6c2cb4af57
Typo fix 2021-03-22 20:17:53 +03:00
Anthony Sottile
434c108f74 Release 3.9.0 2021-03-14 16:29:54 -07:00
Anthony Sottile
40aba49d0d upgrade pycodestyle to 2.7.0 2021-03-14 11:58:03 -07:00
valentin
ac9c66e80b Add indent-size option 2021-03-14 11:53:03 -07:00
Anthony Sottile
0bf8d2a885 ensure crlf line endings of stdin are handled properly 2021-01-07 09:15:46 -08:00
Anthony Sottile
0efbb5dbcb Merge branch 'no_show_source' into 'master'
Add option to disable show-source for calling tools

See merge request pycqa/flake8!441
2020-10-02 23:40:04 +00:00
Anthony Sottile
fb91b994ed Release 3.8.4 2020-10-02 16:29:58 -07:00
Anthony Sottile
2fe70dda6b fix a few small spelling issues
found via `pre-commit try-repo https://github.com/codespell-project/codespell --all-files`
2020-09-20 19:16:10 -07:00
Anthony Sottile
ee9c2874a9 fix skipping of physical checks when file does not end in newline 2020-09-12 12:03:23 -07:00
Nekokatt
e6a5f6a663 Support linting when missing sem_open syscall
Platforms such as Termux on Android, and other exotic devices
do not provide a sem_open implementation on the OS level. This
is problematic, as the error resulting from this occurs when
calling multiprocessing.Pool, throwing an unhandled ImportError.

The issue itself is outlined in https://bugs.python.org/issue3770.

This change allows devices missing this system call to respond
to the missing feature by falling back to synchronous execution,
which appears to be the default behaviour if the multiprocessing
module is not found.

This change also adds a potential fix for developers working
on platforms where multiprocessing itself cannot be imported.
The existing code would set the name referencing the import to
None, but there are no clear checks to ensure this does not
result in an AttributeError later when multiprocessing.Pool
has accession attempts.

Existing users should see no difference in functionality, as they
will assumably already be able to use flake8, so will not be
missing this sem_open call.

Users on devices without the sem_open call will now be able
to use flake8 where they would be unable to before due to
unhandled ImportErrors.
2020-08-27 15:41:25 -07:00
Anthony Sottile
f0e1324d6d upgrade black and run via pre-commit 2020-08-27 15:30:14 -07:00
Anthony Sottile
b40af6737e Add option to disable show-source for calling tools 2020-06-19 10:01:04 -07:00
Anthony Sottile
181bb46098 Release 3.8.3 2020-06-08 12:27:04 -07:00
msmetko
e817c63ab1 Help clarify the option behaviour 2020-06-07 14:32:43 +02:00
Ruairidh MacLeod
9b8f908314 fix JobsArgument --help output 2020-06-05 14:25:57 +01:00
Eric N. Vander Weele
a68d4d0172 processor: Catch SyntaxError also when generating tokens for a file
`tokenize.generate_tokens()` can also raise `SyntaxError` in addition to
`tokenize.TokenError`.
2020-06-02 11:38:44 -07:00
Anthony Sottile
40716454a2 Release 3.8.2 2020-05-22 15:36:22 -07:00