Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump ruff to 0.5.2 #2673

Merged
merged 1 commit into from
Jul 16, 2024
Merged

chore: bump ruff to 0.5.2 #2673

merged 1 commit into from
Jul 16, 2024

Conversation

fpgmaas
Copy link
Contributor

@fpgmaas fpgmaas commented Jul 16, 2024

Description

This PR bumps ruff to the latest version. After the update, running make format returns:

--- Rust format ---
--- Python format ---
cargo fmt
ruff check . --fix
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'isort' -> 'lint.isort'
tests/test_file_system_handler.py:37:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
   |
35 |     arrow_info = arrow_fs.get_file_info(file_path)
36 | 
37 |     assert type(info) == type(arrow_info)
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E721
38 |     assert info.path == arrow_info.path
39 |     assert info.type == arrow_info.type
   |

Found 1 error.
make: *** [format] Error 1

So this PR also updates the configuration in pyproject.toml and fixes the newly identified violation.

Related Issue(s)

Documentation

@github-actions github-actions bot added the binding/python Issues for the Python package label Jul 16, 2024
@rtyler rtyler enabled auto-merge (rebase) July 16, 2024 19:04
@rtyler rtyler merged commit 1ca5e24 into delta-io:main Jul 16, 2024
21 checks passed
rtyler added a commit that referenced this pull request Jul 18, 2024
# Description
This PR proposes to enable the
[`RUF`](https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf)
ruleset.

```
ruff check .
```

returned:

```
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'isort' -> 'lint.isort'
deltalake/table.py:52:26: RUF100 [*] Unused `noqa` directive (unused: `F811`)
deltalake/writer.py:63:26: RUF100 [*] Unused `noqa` directive (unused: `F811`)
tests/pyspark_integration/test_write_to_pyspark.py:109:37: RUF010 [*] Use explicit conversion flag
Found 3 errors.
[*] 3 fixable with the `--fix` option.
```

So these were simply fixed with `ruff check . --fix`.
#2673 handles the fixing of the
outdated config.

---------

Co-authored-by: R. Tyler Croy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/python Issues for the Python package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants