Fix with black 24.1.1. (#10014)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Custom hook to customize the behavior of Hatchling.
|
||||
Here, we customize the tag of the generated wheels.
|
||||
"""
|
||||
|
||||
import sysconfig
|
||||
from typing import Any, Dict
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Build configuration"""
|
||||
|
||||
import dataclasses
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""
|
||||
Functions for building libxgboost
|
||||
"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
@@ -4,6 +4,7 @@ Builds source distribution and binary wheels, following PEP 517 / PEP 660.
|
||||
Reuses components of Hatchling (https://github.com/pypa/hatch/tree/master/backend) for the sake
|
||||
of brevity.
|
||||
"""
|
||||
|
||||
import dataclasses
|
||||
import logging
|
||||
import os
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""
|
||||
Functions for building sdist
|
||||
"""
|
||||
|
||||
import logging
|
||||
import pathlib
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""
|
||||
Utility functions for implementing PEP 517 backend
|
||||
"""
|
||||
|
||||
import logging
|
||||
import pathlib
|
||||
import shutil
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""XGBoost collective communication related API."""
|
||||
|
||||
import ctypes
|
||||
import json
|
||||
import logging
|
||||
|
||||
@@ -64,13 +64,11 @@ class XGBoostError(ValueError):
|
||||
|
||||
|
||||
@overload
|
||||
def from_pystr_to_cstr(data: str) -> bytes:
|
||||
...
|
||||
def from_pystr_to_cstr(data: str) -> bytes: ...
|
||||
|
||||
|
||||
@overload
|
||||
def from_pystr_to_cstr(data: List[str]) -> ctypes.Array:
|
||||
...
|
||||
def from_pystr_to_cstr(data: List[str]) -> ctypes.Array: ...
|
||||
|
||||
|
||||
def from_pystr_to_cstr(data: Union[str, List[str]]) -> Union[bytes, ctypes.Array]:
|
||||
|
||||
@@ -1146,9 +1146,9 @@ async def _direct_predict_impl( # pylint: disable=too-many-branches
|
||||
if _can_output_df(isinstance(data, dd.DataFrame), output_shape):
|
||||
if base_margin is not None and isinstance(base_margin, da.Array):
|
||||
# Easier for map_partitions
|
||||
base_margin_df: Optional[
|
||||
Union[dd.DataFrame, dd.Series]
|
||||
] = base_margin.to_dask_dataframe()
|
||||
base_margin_df: Optional[Union[dd.DataFrame, dd.Series]] = (
|
||||
base_margin.to_dask_dataframe()
|
||||
)
|
||||
else:
|
||||
base_margin_df = base_margin
|
||||
predictions = dd.map_partitions(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Utilities for the XGBoost Dask interface."""
|
||||
|
||||
import logging
|
||||
from typing import TYPE_CHECKING, Any, Dict
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""XGBoost pyspark integration submodule for core code."""
|
||||
|
||||
import base64
|
||||
|
||||
# pylint: disable=fixme, too-many-ancestors, protected-access, no-member, invalid-name
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Xgboost pyspark integration submodule for estimator API."""
|
||||
|
||||
# pylint: disable=too-many-ancestors
|
||||
# pylint: disable=fixme, too-many-ancestors, protected-access, no-member, invalid-name
|
||||
# pylint: disable=unused-argument, too-many-locals
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Xgboost pyspark integration submodule for params."""
|
||||
|
||||
from typing import Dict
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
@@ -55,7 +56,6 @@ class HasFeaturesCols(Params):
|
||||
|
||||
|
||||
class HasEnableSparseDataOptim(Params):
|
||||
|
||||
"""
|
||||
This is a Params based class that is extended by _SparkXGBParams
|
||||
and holds the variable to store the boolean config of enabling sparse data optimization.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Xgboost pyspark integration submodule for helper functions."""
|
||||
|
||||
# pylint: disable=fixme
|
||||
|
||||
import inspect
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
change without notice.
|
||||
|
||||
"""
|
||||
|
||||
# pylint: disable=invalid-name,missing-function-docstring,import-error
|
||||
import gc
|
||||
import importlib.util
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Tests for training continuation."""
|
||||
|
||||
import json
|
||||
from typing import Any, Dict, TypeVar
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Tests for dask shared by different test modules."""
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
from dask import array as da
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Tests related to the `DataIter` interface."""
|
||||
|
||||
import numpy as np
|
||||
|
||||
import xgboost
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Tests for evaluation metrics."""
|
||||
|
||||
from typing import Dict, List
|
||||
|
||||
import numpy as np
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Testing code shared by other tests."""
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
import collections
|
||||
import importlib.util
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Tests for updaters."""
|
||||
|
||||
import json
|
||||
from functools import partial, update_wrapper
|
||||
from typing import Any, Dict, List
|
||||
|
||||
Reference in New Issue
Block a user