Skip to content

Commit

Permalink
STYLE upgrade black formatter (#51348)
Browse files Browse the repository at this point in the history
upgrade black formatter

Co-authored-by: MarcoGorelli <>
  • Loading branch information
MarcoGorelli authored Feb 14, 2023
1 parent b196a09 commit fe85cbf
Show file tree
Hide file tree
Showing 471 changed files with 43 additions and 1,655 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ repos:
language: python
require_serial: true
types_or: [python, pyi]
additional_dependencies: [black==22.10.0]
additional_dependencies: [black==23.1.0]
- id: pyright
# note: assumes python env is setup and activated
name: pyright
Expand Down
3 changes: 0 additions & 3 deletions asv_bench/benchmarks/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


class Factorize:

params = [
[True, False],
[True, False],
Expand Down Expand Up @@ -65,7 +64,6 @@ def time_factorize(self, unique, sort, dtype):


class Duplicated:

params = [
[True, False],
["first", "last", False],
Expand Down Expand Up @@ -96,7 +94,6 @@ def time_duplicated(self, unique, keep, dtype):


class DuplicatedMaskedArray:

params = [
[True, False],
["first", "last", False],
Expand Down
2 changes: 0 additions & 2 deletions asv_bench/benchmarks/algos/isin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


class IsIn:

params = [
"int64",
"uint64",
Expand Down Expand Up @@ -183,7 +182,6 @@ def time_isin(self, dtype, M, offset_factor):


class IsInFloat64:

params = [
[np.float64, "Float64"],
["many_different_values", "few_different_values", "only_nans_values"],
Expand Down
5 changes: 0 additions & 5 deletions asv_bench/benchmarks/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ def time_op_same_blocks(self, op, shape):


class Ops:

params = [[True, False], ["default", 1]]
param_names = ["use_numexpr", "threads"]

Expand Down Expand Up @@ -257,7 +256,6 @@ def time_frame_series_dot(self):


class Timeseries:

params = [None, "US/Eastern"]
param_names = ["tz"]

Expand Down Expand Up @@ -316,7 +314,6 @@ def time_categorical_op(self, op):


class IndexArithmetic:

params = ["float", "int"]
param_names = ["dtype"]

Expand Down Expand Up @@ -387,7 +384,6 @@ def time_add_timedeltas(self, df):


class AddOverflowScalar:

params = [1, -1, 0]
param_names = ["scalar"]

Expand Down Expand Up @@ -455,7 +451,6 @@ def time_add_overflow_both_arg_nan(self):


class OffsetArrayArithmetic:

params = offsets
param_names = ["offset"]

Expand Down
2 changes: 0 additions & 2 deletions asv_bench/benchmarks/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def time_from_list(self):


class ArrowStringArray:

params = [False, True]
param_names = ["multiple_chunks"]

Expand Down Expand Up @@ -107,7 +106,6 @@ def time_tolist(self, multiple_chunks):


class ArrowExtensionArray:

params = [
[
"boolean[pyarrow]",
Expand Down
1 change: 0 additions & 1 deletion asv_bench/benchmarks/attrs_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def time_set_index(self):


class SeriesArrayAttribute:

params = [["numeric", "object", "category", "datetime64", "datetime64tz"]]
param_names = ["dtype"]

Expand Down
2 changes: 0 additions & 2 deletions asv_bench/benchmarks/categoricals.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ def time_concat_non_overlapping_index(self):


class ValueCounts:

params = [True, False]
param_names = ["dropna"]

Expand Down Expand Up @@ -254,7 +253,6 @@ def time_categorical_contains(self):


class CategoricalSlicing:

params = ["monotonic_incr", "monotonic_decr", "non_monotonic"]
param_names = ["index"]

Expand Down
2 changes: 0 additions & 2 deletions asv_bench/benchmarks/ctors.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def list_of_lists_with_none(arr):


class SeriesConstructors:

param_names = ["data_fmt", "with_index", "dtype"]
params = [
[
Expand Down Expand Up @@ -124,7 +123,6 @@ def time_multiindex_from_iterables(self):

class DatetimeIndexConstructor:
def setup(self):

N = 20_000
dti = date_range("1900-01-01", periods=N)

Expand Down
1 change: 0 additions & 1 deletion asv_bench/benchmarks/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def time_pandas_dtype_invalid(self, dtype):


class SelectDtypes:

try:
params = [
tm.ALL_INT_NUMPY_DTYPES
Expand Down
1 change: 0 additions & 1 deletion asv_bench/benchmarks/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@


class Eval:

params = [["numexpr", "python"], [1, "all"]]
param_names = ["engine", "threads"]

Expand Down
5 changes: 0 additions & 5 deletions asv_bench/benchmarks/frame_ctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def time_mi_series(self):


class FromDictwithTimestamp:

params = [Nano(1), Hour(1)]
param_names = ["offset"]

Expand All @@ -89,7 +88,6 @@ def time_dict_with_timestamp_offsets(self, offset):


class FromRecords:

params = [None, 1000]
param_names = ["nrows"]

Expand All @@ -116,7 +114,6 @@ def time_frame_from_ndarray(self):


class FromLists:

goal_time = 0.2

def setup(self):
Expand All @@ -129,7 +126,6 @@ def time_frame_from_lists(self):


class FromRange:

goal_time = 0.2

def setup(self):
Expand Down Expand Up @@ -162,7 +158,6 @@ def time_frame_from_scalar_ea_float64_na(self):


class FromArrays:

goal_time = 0.2

def setup(self):
Expand Down
8 changes: 0 additions & 8 deletions asv_bench/benchmarks/frame_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ def time_isnull_obj(self):


class Fillna:

params = (
[True, False],
["pad", "bfill"],
Expand Down Expand Up @@ -412,7 +411,6 @@ def time_frame_fillna(self, inplace, method, dtype):


class Dropna:

params = (["all", "any"], [0, 1])
param_names = ["how", "axis"]

Expand All @@ -432,7 +430,6 @@ def time_dropna_axis_mixed_dtypes(self, how, axis):


class Count:

params = [0, 1]
param_names = ["axis"]

Expand Down Expand Up @@ -531,7 +528,6 @@ def time_frame_object_unequal(self):


class Interpolate:

params = [None, "infer"]
param_names = ["downcast"]

Expand Down Expand Up @@ -616,7 +612,6 @@ def time_frame_duplicated_subset(self):


class XS:

params = [0, 1]
param_names = ["axis"]

Expand All @@ -629,7 +624,6 @@ def time_frame_xs(self, axis):


class SortValues:

params = [True, False]
param_names = ["ascending"]

Expand Down Expand Up @@ -657,7 +651,6 @@ def time_frame_sort_values_by_columns(self):


class Quantile:

params = [0, 1]
param_names = ["axis"]

Expand Down Expand Up @@ -697,7 +690,6 @@ def time_info(self):


class NSort:

params = ["first", "last", "all"]
param_names = ["keep"]

Expand Down
14 changes: 0 additions & 14 deletions asv_bench/benchmarks/gil.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,10 @@ def inner(*args, **kwargs):


class ParallelGroupbyMethods:

params = ([2, 4, 8], ["count", "last", "max", "mean", "min", "prod", "sum", "var"])
param_names = ["threads", "method"]

def setup(self, threads, method):

N = 10**6
ngroups = 10**3
df = DataFrame(
Expand All @@ -119,12 +117,10 @@ def time_loop(self, threads, method):


class ParallelGroups:

params = [2, 4, 8]
param_names = ["threads"]

def setup(self, threads):

size = 2**22
ngroups = 10**3
data = Series(np.random.randint(0, ngroups, size=size))
Expand All @@ -140,12 +136,10 @@ def time_get_groups(self, threads):


class ParallelTake1D:

params = ["int64", "float64"]
param_names = ["dtype"]

def setup(self, dtype):

N = 10**6
df = DataFrame({"col": np.arange(N, dtype=dtype)})
indexer = np.arange(100, len(df) - 100)
Expand All @@ -167,7 +161,6 @@ class ParallelKth:
repeat = 5

def setup(self):

N = 10**7
k = 5 * 10**5
kwargs_list = [{"arr": np.random.randn(N)}, {"arr": np.random.randn(N)}]
Expand All @@ -184,7 +177,6 @@ def time_kth_smallest(self):

class ParallelDatetimeFields:
def setup(self):

N = 10**6
self.dti = date_range("1900-01-01", periods=N, freq="T")
self.period = self.dti.to_period("D")
Expand Down Expand Up @@ -233,12 +225,10 @@ def run(period):


class ParallelRolling:

params = ["median", "mean", "min", "max", "var", "skew", "kurt", "std"]
param_names = ["method"]

def setup(self, method):

win = 100
arr = np.random.rand(100000)
if hasattr(DataFrame, "rolling"):
Expand Down Expand Up @@ -274,14 +264,12 @@ def time_rolling(self, method):


class ParallelReadCSV(BaseIO):

number = 1
repeat = 5
params = ["float", "object", "datetime"]
param_names = ["dtype"]

def setup(self, dtype):

rows = 10000
cols = 50
data = {
Expand Down Expand Up @@ -309,14 +297,12 @@ def time_read_csv(self, dtype):


class ParallelFactorize:

number = 1
repeat = 5
params = [2, 4, 8]
param_names = ["threads"]

def setup(self, threads):

strings = tm.makeStringIndex(100000)

@test_parallel(num_threads=threads)
Expand Down
Loading

0 comments on commit fe85cbf

Please sign in to comment.