v0.0.278
github-actions
released this
12 Jul 17:06
·
4838 commits
to main
since this release
See the release blog post for more, including detailed descriptions of any newly added rules.
What's Changed
Rules
- [
pylint
] Implementtypevar-bivariance
(PLC0131
) by @tjkuson in #5517 - [
flake8-pyi
] Implementunnecessary-literal-union
(PYI030
) by @zanieb in #5570 - [
pylint
] Implementtype-name-incorrect-variance
(PLC0105
) by @tjkuson in #5651 - [
ruff
] Implementunnecessary-list-allocation-for-first-element
(RUF015
) by @evanrittenhouse in #5549 - [
flake8-bugbear
] Implementre-sub-positional-args
(B034
) by @charliermarsh in #5669 - [
ruff
] Implementinvalid-index-type
(RUF016
) by @zanieb in #5602
Settings
- [
isort
] Add--case-sensitive
flag by @qdegraaf in #5539 - [
isort
] Support globbing inisort
options by @tjkuson in #5473
Bug Fixes
- Support autofix for some multiline
str.format
calls by @harupy in #5638 - Avoid triggering
unnecessary-map
(C417
) for late-bound lambdas by @charliermarsh in #5520 - Avoid triggering DTZ001-006 when using
.astimezone()
by @dhruvmanila in #5524 - Enable attribute lookups via semantic model by @charliermarsh in #5536
- Avoid syntax errors when rewriting str(dict) in f-strings by @charliermarsh in #5538
- Differentiate between runtime and typing-time annotations by @charliermarsh in #5575
- Only run pyproject.toml lint rules when enabled by @charliermarsh in #5578
- Refactor isort directive skips to use iterators by @charliermarsh in #5623
- Allow descriptor instantiations in dataclass fields by @charliermarsh in #5537
- Refactor
noqa
directive parsing away from regex-based implementation by @charliermarsh in #5554 - Emit warnings for invalid
# noqa
directives by @charliermarsh in #5571 - Support individual codes on
# flake8: noqa
directives by @charliermarsh in #5618 - Add
tkinter
import convention by @tjkuson in #5626 - Avoid
PERF401
if conditional depends on list var by @dhruvmanila in #5603 - Fix typo in complex-if-statement-in-stub message by @charliermarsh in #5635
- Make TRY301 trigger only if a
raise
throws a caught exception by @evanrittenhouse in #5455 - Skip flake8-future-annotations checks in stub files by @charliermarsh in #5652
- Always allow PEP 585 and PEP 604 rewrites in stub files by @charliermarsh in #5653
- Add support for
Union
declarations without|
to PYI016 by @zanieb in #5598 - Ignore
_name_
and_value_
accesses inflake8-self
rules by @monosans in #5663 - Refactor
repeated_keys()
to useComparableExpr
by @qdegraaf in #5696
New Contributors
- @karosis88 made their first contribution in #5560
- @petermattia made their first contribution in #5579
- @DimitriPapadopoulos made their first contribution in #5607
Full Changelog: v0.0.277...v0.0.278