Skip to content

Instantly share code, notes, and snippets.

@zanieb
Last active August 7, 2023 20:27
Show Gist options
  • Save zanieb/08e285c96d7fde5bfea0bb7cca2a5336 to your computer and use it in GitHub Desktop.
Save zanieb/08e285c96d7fde5bfea0bb7cca2a5336 to your computer and use it in GitHub Desktop.
Draft changelog for Ruff 0.0.283

What's Changed

Breaking Changes

Rules

  • [flake8-pyi] PYI019: detects if a type variable is used instead of Self in return annotations by @qdegraaf in astral-sh/ruff#6204
  • [flake8-pyi] PYI051: detects unions of Literal types by @LaBatata101 in astral-sh/ruff#6215
  • [flake8-pyi] PYI055: detects unions of type types by @LaBatata101 in astral-sh/ruff#6316
  • [pylint] E1300: detects invalid string format characters by @silvanocerza in astral-sh/ruff#6171
  • [pyupgrade] UP040: upgrades type alias annotations to use PEP-695 syntax by @zanieb in astral-sh/ruff#6289

Rule Changes

  • [flake8-boolean-trap] FBT003: Add is_ and is_not to excluded functions by @zanieb in astral-sh/ruff#6307
  • [flake8-logging-format] Allow capitalized names for logger candidate heuristic match by @charliermarsh in astral-sh/ruff#6356
  • [flake8-pyi] Applicable rules are now checked non-stub code by @andersk in astral-sh/ruff#6297
    • PYI013: ellipsis-in-non-empty-class-body
    • PYI016: duplicate-union-member
    • PYI018: unused-private-type-var
    • PYI019: custom-type-var-return-type
    • PYI024: collections-named-tuple
    • PYI025: unaliased-collections-abc-set-import
    • PYI030: unnecessary-literal-union
    • PYI032: any-eq-ne-annotation
    • PYI034: non-self-return-type
    • PYI036: bad-exit-annotation
    • PYI041: redundant-numeric-union
    • PYI042: snake-case-type-alias
    • PYI043: t-suffixed-type-alias
    • PYI045: iter-method-return-iterable
    • PYI046: unused-private-protocol
    • PYI047: unused-private-type-alias
    • PYI049: unused-private-typed-dict
    • PYI050: no-return-argument-annotation-in-stub (Python ≥ 3.11)
    • PYI051: redundant-literal-union
    • PYI056: unsupported-method-call-on-all
  • [flake8-pyi] PYI027 is being replaced by PYI022 / UP035 by @LaBatata101 in astral-sh/ruff#6354
  • [pydocstyle] D103: Don't require docstrings in .pyi files by @charliermarsh in astral-sh/ruff#6239
  • [pydocstyle] D203: Ignore same-line docstrings for lines-before and lines-after rules by @charliermarsh in astral-sh/ruff#6344
  • [pylint] PLE0605: Allow generic tuple and list calls in __all__ by @charliermarsh in astral-sh/ruff#6247
  • [pylint] PLR0124: Add detection of comparisons with built-in calls by @charliermarsh in astral-sh/ruff#6324
  • [pyupgrade] UP032: Add support for await expressions in f-strings by @harupy in astral-sh/ruff#6304
  • [pyupgrade] UP032: Add support for implicitly concatenated strings by @harupy in astral-sh/ruff#6263
  • [pyupgrade] UP032: Add support for repeated format fields by @harupy in astral-sh/ruff#6266
  • [ruff] RUF012: Permit ClassVar and Final without subscript by @bluetech in astral-sh/ruff#6273

Bug Fixes

  • [flake8-bugbear] B006: Respect typing_extensions imports of Annotated by @PIG208 in astral-sh/ruff#6361
  • [flake8-pyi] PYI019: Fix panic with positional-only arguments by @charliermarsh in astral-sh/ruff#6350
  • [flake8-use-pathlib] Avoid raising PTH206 with maxsplit by @charliermarsh in astral-sh/ruff#6283
  • [flake8] F841: Update autofix to not remove Jupyer magic expressions by @dhruvmanila in astral-sh/ruff#6141
  • [pycodestyle] E721: Include comparisons to builtin types by @charliermarsh in astral-sh/ruff#6325
  • [pycodestyle] E721: Match left-hand side types() call in types-comparison by @charliermarsh in astral-sh/ruff#6326
  • [pyupgrade] UP031: Avoid auto-fixing if there are comments within the right-hand side by @harupy in astral-sh/ruff#6364
  • [pyupgrade] UP032: Avoid auto-fixing if comments are present around format call arguments by @harupy in astral-sh/ruff#6342
  • [pyupgrade] UP032: Improve invalid expression check by @harupy in astral-sh/ruff#6308
  • Avoid attempting to fix .format(...) calls with too-few-arguments by @charliermarsh in astral-sh/ruff#6401
  • Fix bug where .gitignore files in parent directories were incorrectly used by @charliermarsh in astral-sh/ruff#6368
  • Fix duplicate violations raised on nested bitwise or Union expressions by @charliermarsh in astral-sh/ruff#6399

Playground

Other Changes

New Contributors

Full Changelog: https://github.com/astral-sh/ruff/compare/v0.0.282...v0.0.283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment