Skip to content

[ci] update pre-commit versions, add some pixi things to config files #6986

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

Merged
merged 6 commits into from
Aug 4, 2025

Conversation

jameslamb
Copy link
Collaborator

As I recommended in #6901 (review), this pulls some small CI / maintenance changes out of #6901. The main goal is to make the diff in #6901 a bit smaller so that proposal can be more thoughtfully and thoroughly reviewed, but these changes do have standalone value.

  • updates all pre-commit hooks
  • adds some pixi things to config files like .gitignore (in case anyone is using pixi in their local environment)
  • fixes these new findings from ruff:
python-package/lightgbm/basic.py:290:42: PLW1508 Invalid type for environment variable default; expected `str` or `None`
python-package/lightgbm/basic.py:843:8: PLC1802 [*] `len(cat_cols)` used as condition without comparison
python-package/lightgbm/callback.py:77:5: PLC0415 `import` should be at the top-level of a file
python-package/lightgbm/compat.py:55:13: PLC0415 `import` should be at the top-level of a file
python-package/lightgbm/dask.py:772:38: C420 [*] Unnecessary dict comprehension for iterable; use `dict.fromkeys` instead
python-package/lightgbm/libpath.py:44:38: PLW1508 Invalid type for environment variable default; expected `str` or `None`
python-package/lightgbm/plotting.py:107:9: PLC0415 `import` should be at the top-level of a file
python-package/lightgbm/plotting.py:238:9: PLC0415 `import` should be at the top-level of a file
python-package/lightgbm/plotting.py:239:9: PLC0415 `import` should be at the top-level of a file
python-package/lightgbm/plotting.py:345:9: PLC0415 `import` should be at the top-level of a file
python-package/lightgbm/plotting.py:471:9: PLC0415 `import` should be at the top-level of a file
python-package/lightgbm/plotting.py:815:9: PLC0415 `import` should be at the top-level of a file
python-package/lightgbm/plotting.py:816:9: PLC0415 `import` should be at the top-level of a file
tests/python_package_test/test_sklearn.py:1733:5: PT031 `pytest.warns()` block should contain a single simple statement

@jameslamb jameslamb changed the title WIP: [ci] update pre-commit versions, add some pixi things to config files [ci] update pre-commit versions, add some pixi things to config files Aug 1, 2025
@jameslamb jameslamb marked this pull request as ready for review August 1, 2025 02:31
Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@jameslamb
Copy link
Collaborator Author

Thank you!

@jameslamb jameslamb merged commit 16ca335 into master Aug 4, 2025
59 of 61 checks passed
@jameslamb jameslamb deleted the ci/misc-updates branch August 4, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants