ruff
10885d09 - Add support for top-level quoted annotations in RUF013 (#5235)

Comment changes are shownComment changes are hidden
Commit
2 years ago
Add support for top-level quoted annotations in RUF013 (#5235) ## Summary This PR adds support for autofixing annotations like: ```python def f(x: "int" = None): ... ``` However, we don't yet support nested quotes, like: ```python def f(x: Union["int", "str"] = None): ... ``` Closes #5231.
Author
Parents
  • crates/ruff
    • resources/test/fixtures/ruff
      • File
        RUF013_0.py
    • src/rules/ruff
      • rules
        • File
          implicit_optional.rs
      • snapshots
        • ruff__rules__ruff__tests__PY39_RUF013_RUF013_0.py.snap
        • ruff__rules__ruff__tests__RUF013_RUF013_0.py.snap