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
814a2f1c
Unverified
Commit
814a2f1c
authored
Mar 14, 2023
by
James Lamb
Committed by
GitHub
Mar 14, 2023
Browse files
[python-package] fix mypy errors about Dataset.params (#5780)
parent
ac3668fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+1
-1
No files found.
python-package/lightgbm/basic.py
View file @
814a2f1c
...
@@ -1728,7 +1728,7 @@ class Dataset:
...
@@ -1728,7 +1728,7 @@ class Dataset:
used_indices
:
Optional
[
List
[
int
]]
used_indices
:
Optional
[
List
[
int
]]
):
):
data_has_header
=
False
data_has_header
=
False
if
isinstance
(
data
,
(
str
,
Path
)):
if
isinstance
(
data
,
(
str
,
Path
))
and
self
.
params
is
not
None
:
# check data has header or not
# check data has header or not
data_has_header
=
any
(
self
.
params
.
get
(
alias
,
False
)
for
alias
in
_ConfigAliases
.
get
(
"header"
))
data_has_header
=
any
(
self
.
params
.
get
(
alias
,
False
)
for
alias
in
_ConfigAliases
.
get
(
"header"
))
num_data
=
self
.
num_data
()
num_data
=
self
.
num_data
()
...
...
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