Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
283cdde4
Unverified
Commit
283cdde4
authored
Oct 17, 2024
by
James Lamb
Committed by
GitHub
Oct 18, 2024
Browse files
[ci] add shellcheck, use latest pre-commit hook versions (#6685)
parent
98936155
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
.pre-commit-config.yaml
.pre-commit-config.yaml
+6
-2
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+1
-2
No files found.
.pre-commit-config.yaml
View file @
283cdde4
...
...
@@ -13,7 +13,7 @@ exclude: |
repos
:
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v
4.6
.0
rev
:
v
5.0
.0
hooks
:
-
id
:
end-of-file-fixer
-
id
:
trailing-whitespace
...
...
@@ -25,7 +25,7 @@ repos:
args
:
[
"
--settings-path"
,
"
python-package/pyproject.toml"
]
-
repo
:
https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev
:
v0.
5.7
rev
:
v0.
7.0
hooks
:
# Run the linter.
-
id
:
ruff
...
...
@@ -35,3 +35,7 @@ repos:
-
id
:
ruff-format
args
:
[
"
--config"
,
"
python-package/pyproject.toml"
]
types_or
:
[
python
,
jupyter
]
-
repo
:
https://github.com/shellcheck-py/shellcheck-py
rev
:
v0.10.0.1
hooks
:
-
id
:
shellcheck
python-package/lightgbm/basic.py
View file @
283cdde4
...
...
@@ -876,8 +876,7 @@ def _load_pandas_categorical(
max_offset
=
-
getsize
(
file_name
)
with
open
(
file_name
,
"rb"
)
as
f
:
while
True
:
if
offset
<
max_offset
:
offset
=
max_offset
offset
=
max
(
offset
,
max_offset
)
f
.
seek
(
offset
,
SEEK_END
)
lines
=
f
.
readlines
()
if
len
(
lines
)
>=
2
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment