Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: astral-sh/ruff
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.12
Choose a base ref
...
head repository: astral-sh/ruff
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.1.13
Choose a head ref
  • 7 commits
  • 34 files changed
  • 4 contributors

Commits on Jan 12, 2024

  1. Include base pyproject when initializing cache settings (#9480)

    ## Summary
    
    Regression from
    https://github.com/astral-sh/ruff/pull/9453/files#diff-80a9c2637c432502a7075c792cc60db92282dd786999a78bfa9bb6f025afab35L482.
    
    Closes #9478.
    
    ## Test Plan
    
    ```
    rm -rf .ruff_cache
    cargo run -p ruff_cli -- check ../foo.py
    ```
    
    Failed prior to this PR; passes afterwards. The file must be outside of
    the current working directory, and must not have a `pyproject.toml` in
    any parent directory.
    charliermarsh authored Jan 12, 2024
    Copy the full SHA
    350dcb8 View commit details
  2. Remove unreachable-code feature (#9463)

    ## Summary
    
    We haven't found time to flip this on, so feels like it's best to remove
    it for now -- can always restore from source when we get back to it.
    charliermarsh authored Jan 12, 2024
    Copy the full SHA
    f9dd7bb View commit details
  3. Copy the full SHA
    a31a314 View commit details
  4. (🐞) Add the missing period in error message (#9485)

    <!--
    Thank you for contributing to Ruff! To help us out with reviewing,
    please consider the following:
    
    - Does this pull request include a summary of the change? (See below.)
    - Does this pull request include a descriptive title?
    - Does this pull request include references to any relevant issues?
    -->
    
    ## Summary
    
    <!-- What's the purpose of the change? What does it do, and why? -->
    I noticed that there should be a missing period added to some of the new
    error messages for Unnecessary dunder call:
    ```
    sandpit\test.py:6:16: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
    ```
    ## Test Plan
    
    Static analysis of the implementation, as this has no existing test
    cases.
    KotlinIsland authored Jan 12, 2024
    Copy the full SHA
    3daf6e1 View commit details
  5. Fix backticks in RUF021 docs (#9488)

    The docs for this rule aren't generating properly:
    https://docs.astral.sh/ruff/rules/parenthesize-chained-operators/#why-is-this-bad.
    I assume this is the reason why!
    AlexWaygood authored Jan 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    395cdf0 View commit details
  6. Fix message for __aenter__ in PLC2801 (#9492)

    <!--
    Thank you for contributing to Ruff! To help us out with reviewing,
    please consider the following:
    
    - Does this pull request include a summary of the change? (See below.)
    - Does this pull request include a descriptive title?
    - Does this pull request include references to any relevant issues?
    -->
    
    ## Summary
    
    Fix the message for `__aenter__ ` in PLC2801 (introduced in
    #9166)
    There is no `aenter` builtin in Python, so the current message is
    misleading.
    I take the message from original lint
    https://github.com/pylint-dev/pylint/blob/main/pylint/constants.py#L211
    
    P.S. I think here should be more accurate synchronization with original
    lint (e.g. the current implementation will not lint `__enter__` on my
    first sight), but it is out-of-scope of this change.
    
    <!-- What's the purpose of the change? What does it do, and why? -->
    
    ## Test Plan
    
    <!-- How was it tested? -->
    alex-700 authored Jan 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1602df1 View commit details
  7. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d16c4a2 View commit details
Loading