Skip to content

Commit 93f5e3a

Browse files
authored
STYLE: flake8 upgraded to 3.3 on conda (#15412)
fixes for E305, 2 blank lines after a class definition
1 parent e351ed0 commit 93f5e3a

38 files changed

+74
-6
lines changed

pandas/compat/numpy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def np_array_datetime64_compat(arr, *args, **kwargs):
6767

6868
return np.array(arr, *args, **kwargs)
6969

70+
7071
__all__ = ['np',
7172
'_np_version_under1p8',
7273
'_np_version_under1p9',

pandas/compat/numpy/function.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def __call__(self, args, kwargs, fname=None,
5555
raise ValueError("invalid validation method "
5656
"'{method}'".format(method=method))
5757

58+
5859
ARGMINMAX_DEFAULTS = dict(out=None)
5960
validate_argmin = CompatValidator(ARGMINMAX_DEFAULTS, fname='argmin',
6061
method='both', max_fname_arg_count=1)
@@ -97,6 +98,7 @@ def validate_argmax_with_skipna(skipna, args, kwargs):
9798
validate_argmax(args, kwargs)
9899
return skipna
99100

101+
100102
ARGSORT_DEFAULTS = OrderedDict()
101103
ARGSORT_DEFAULTS['axis'] = -1
102104
ARGSORT_DEFAULTS['kind'] = 'quicksort'
@@ -121,6 +123,7 @@ def validate_argsort_with_ascending(ascending, args, kwargs):
121123
validate_argsort(args, kwargs, max_fname_arg_count=1)
122124
return ascending
123125

126+
124127
CLIP_DEFAULTS = dict(out=None)
125128
validate_clip = CompatValidator(CLIP_DEFAULTS, fname='clip',
126129
method='both', max_fname_arg_count=3)
@@ -141,6 +144,7 @@ def validate_clip_with_axis(axis, args, kwargs):
141144
validate_clip(args, kwargs)
142145
return axis
143146

147+
144148
COMPRESS_DEFAULTS = OrderedDict()
145149
COMPRESS_DEFAULTS['axis'] = None
146150
COMPRESS_DEFAULTS['out'] = None
@@ -170,6 +174,7 @@ def validate_cum_func_with_skipna(skipna, args, kwargs, name):
170174
validate_cum_func(args, kwargs, fname=name)
171175
return skipna
172176

177+
173178
LOGICAL_FUNC_DEFAULTS = dict(out=None)
174179
validate_logical_func = CompatValidator(LOGICAL_FUNC_DEFAULTS, method='kwargs')
175180

@@ -236,6 +241,7 @@ def validate_take_with_convert(convert, args, kwargs):
236241
validate_take(args, kwargs, max_fname_arg_count=3, method='both')
237242
return convert
238243

244+
239245
TRANSPOSE_DEFAULTS = dict(axes=None)
240246
validate_transpose = CompatValidator(TRANSPOSE_DEFAULTS, fname='transpose',
241247
method='both', max_fname_arg_count=0)
@@ -318,6 +324,7 @@ def validate_groupby_func(name, args, kwargs, allowed=None):
318324
"with groupby. Use .groupby(...)."
319325
"{func}() instead".format(func=name)))
320326

327+
321328
RESAMPLER_NUMPY_OPS = ('min', 'max', 'sum', 'prod',
322329
'mean', 'std', 'var')
323330

pandas/computation/expr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@ def visitor(x, y):
669669
operands = node.values
670670
return reduce(visitor, operands)
671671

672+
672673
# ast.Call signature changed on 3.5,
673674
# conditionally change which methods is named
674675
# visit_Call depending on Python version, #11097

pandas/core/algorithms.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,7 @@ def _finalize_nsmallest(arr, kth_val, n, keep, narr):
926926
else:
927927
return inds
928928

929+
929930
_dtype_map = {'datetime64[ns]': 'int64', 'timedelta64[ns]': 'int64'}
930931

931932

@@ -959,6 +960,7 @@ def _hashtable_algo(f, values, return_dtype=None):
959960
# use Object
960961
return f(htable.PyObjectHashTable, _ensure_object)
961962

963+
962964
_hashtables = {
963965
'float64': (htable.Float64HashTable, htable.Float64Vector),
964966
'uint64': (htable.UInt64HashTable, htable.UInt64Vector),

pandas/core/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,7 @@ def inner(x):
804804

805805
return inner
806806

807+
807808
# common type validators, for convenience
808809
# usage: register_option(... , validator = is_int)
809810
is_int = is_type_factory(int)

pandas/core/config_init.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ def mpl_style_cb(key):
278278

279279
return val
280280

281+
281282
with cf.config_prefix('display'):
282283
cf.register_option('precision', 6, pc_precision_doc, validator=is_int)
283284
cf.register_option('float_format', None, float_format_doc,
@@ -380,6 +381,7 @@ def use_inf_as_null_cb(key):
380381
from pandas.types.missing import _use_inf_as_null
381382
_use_inf_as_null(key)
382383

384+
383385
with cf.config_prefix('mode'):
384386
cf.register_option('use_inf_as_null', False, use_inf_as_null_doc,
385387
cb=use_inf_as_null_cb)

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5741,9 +5741,9 @@ def _from_nested_dict(data):
57415741
def _put_str(s, space):
57425742
return ('%s' % s)[:space].ljust(space)
57435743

5744+
57445745
# ----------------------------------------------------------------------
57455746
# Add plotting methods to DataFrame
5746-
57475747
DataFrame.plot = base.AccessorProperty(gfx.FramePlotMethods,
57485748
gfx.FramePlotMethods)
57495749
DataFrame.hist = gfx.hist_frame

pandas/core/indexing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def get_indexers_list():
3636
('iat', _iAtIndexer),
3737
]
3838

39+
3940
# "null slice"
4041
_NS = slice(None, None)
4142

@@ -1850,6 +1851,7 @@ def _convert_key(self, key, is_setter=False):
18501851
"indexers")
18511852
return key
18521853

1854+
18531855
# 32-bit floating point machine epsilon
18541856
_eps = np.finfo('f4').eps
18551857

pandas/formats/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2479,9 +2479,9 @@ def _has_names(index):
24792479
else:
24802480
return index.name is not None
24812481

2482+
24822483
# -----------------------------------------------------------------------------
24832484
# Global formatting options
2484-
24852485
_initial_defencoding = None
24862486

24872487

pandas/indexes/numeric.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def _assert_safe_casting(cls, data, subarr):
159159
raise TypeError('Unsafe NumPy casting, you must '
160160
'explicitly cast')
161161

162+
162163
Int64Index._add_numeric_methods()
163164
Int64Index._add_logical_methods()
164165

@@ -238,6 +239,7 @@ def _assert_safe_casting(cls, data, subarr):
238239
raise TypeError('Unsafe NumPy casting, you must '
239240
'explicitly cast')
240241

242+
241243
UInt64Index._add_numeric_methods()
242244
UInt64Index._add_logical_methods()
243245

@@ -391,5 +393,6 @@ def isin(self, values, level=None):
391393
return lib.ismember_nans(np.array(self), value_set,
392394
isnull(list(value_set)).any())
393395

396+
394397
Float64Index._add_numeric_methods()
395398
Float64Index._add_logical_methods_disabled()

0 commit comments

Comments
 (0)