Skip to content

PEP: pandas/core round 5 (nanops, ops, panel*) #12079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

rockg
Copy link
Contributor

@rockg rockg commented Jan 18, 2016

No description provided.

@jreback jreback added the Code Style Code style, linting, code_checks label Jan 19, 2016
@@ -400,7 +398,7 @@ def nanvar(values, axis=None, skipna=True, ddof=1):
avg = _ensure_numeric(values.sum(axis=axis, dtype=np.float64)) / count
if axis is not None:
avg = np.expand_dims(avg, axis)
sqr = _ensure_numeric((avg - values) ** 2)
sqr = _ensure_numeric((avg - values)**2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need spaces around this operator?

@wesm
Copy link
Member

wesm commented Jan 19, 2016

Looks good, but:

$ flake8 pandas/core/nanops.py 
pandas/core/nanops.py:401:41: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:491:16: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:491:42: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:492:16: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:492:42: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:499:45: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:528:16: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:528:42: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:529:16: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:529:42: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:530:17: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:530:43: E226 missing whitespace around arithmetic operator
pandas/core/nanops.py:545:33: E226 missing whitespace around arithmetic operator

$ flake8 pandas/core/ops.py 
pandas/core/ops.py:94:41: E226 missing whitespace around arithmetic operator

@jreback jreback added this to the 0.18.0 milestone Jan 19, 2016
@rockg
Copy link
Contributor Author

rockg commented Jan 19, 2016

Well this is fun:

(development)roch@roch ~/Software/pandas $ flake8 pandas/core/nanops.py
(development)roch@roch ~/Software/pandas $ flake8 pandas/core/ops.py
(development)roch@roch ~/Software/pandas $ git status
On branch pep8-round5
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    pandas/version.py

nothing added to commit but untracked files present (use "git add" to track)
(development)roch@roch ~/Software/pandas $ 

@jreback
Copy link
Contributor

jreback commented Jan 19, 2016

that's pretty old file. how did that slip in?

@rockg
Copy link
Contributor Author

rockg commented Jan 19, 2016

I was just doing that to show no local changes. Seems in pep8 version 1.6 they no longer enforce whitespace around the operator. I'm using 1.6.2.

@wesm
Copy link
Member

wesm commented Jan 19, 2016

@rockg that's super fun! for the preservation of our sanity let's settle on the >= 1.6 behavior; ** isn't all that common anyhow

@wesm wesm closed this in 5b5b2fe Jan 19, 2016
@wesm
Copy link
Member

wesm commented Jan 19, 2016

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants