Skip to content

Commit

Permalink
[ci] upgrade linters to latest version (#6472)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Jun 3, 2024
1 parent 89a4704 commit ebac9e8
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .ci/get_workflow_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
TRIGGER_PHRASE: Code phrase that triggers workflow.
"""

import json
from os import environ
from sys import argv, exit
Expand Down
1 change: 1 addition & 0 deletions .nuget/create_nuget.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding: utf-8
"""Script for generating files with NuGet package metadata."""

import datetime
import sys
from pathlib import Path
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude: |
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -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.2.1
rev: v0.4.7
hooks:
# Run the linter.
- id: ruff
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute.
"""Sphinx configuration file."""

import datetime
import os
import sys
Expand Down
1 change: 1 addition & 0 deletions helpers/check_dynamic_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* GLIBCXX: https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
* OMP/GOMP: https://github.com/gcc-mirror/gcc/blob/master/libgomp/libgomp.map
"""

import re
import sys
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions helpers/parameter_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
along with parameters description in LightGBM/docs/Parameters.rst file
from the information in LightGBM/include/LightGBM/config.h file.
"""

import re
from collections import defaultdict
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions python-package/lightgbm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Contributors: https://github.com/microsoft/LightGBM/graphs/contributors.
"""

from pathlib import Path

from .basic import Booster, Dataset, Sequence, register_logger
Expand Down
1 change: 1 addition & 0 deletions python-package/lightgbm/basic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding: utf-8
"""Wrapper for C API of LightGBM."""

import abc
import ctypes
import inspect
Expand Down
1 change: 1 addition & 0 deletions python-package/lightgbm/callback.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding: utf-8
"""Callbacks library."""

from collections import OrderedDict
from dataclasses import dataclass
from functools import partial
Expand Down
1 change: 1 addition & 0 deletions python-package/lightgbm/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
It is based on dask-lightgbm, which was based on dask-xgboost.
"""

import operator
import socket
from collections import defaultdict
Expand Down
1 change: 1 addition & 0 deletions python-package/lightgbm/engine.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding: utf-8
"""Library with training routines of LightGBM."""

import copy
import json
import warnings
Expand Down
1 change: 1 addition & 0 deletions python-package/lightgbm/libpath.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding: utf-8
"""Find the path to LightGBM dynamic library files."""

from pathlib import Path
from platform import system
from typing import List
Expand Down
1 change: 1 addition & 0 deletions python-package/lightgbm/plotting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding: utf-8
"""Plotting library."""

import math
from copy import deepcopy
from io import BytesIO
Expand Down
1 change: 1 addition & 0 deletions python-package/lightgbm/sklearn.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding: utf-8
"""Scikit-learn wrapper interface for LightGBM."""

import copy
from inspect import signature
from pathlib import Path
Expand Down

0 comments on commit ebac9e8

Please sign in to comment.