Skip to content

Fix flake8 issues on v19, v20 and v21.0.rst #24236

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

Merged
merged 10 commits into from
Dec 13, 2018

Conversation

thoo
Copy link
Contributor

@thoo thoo commented Dec 11, 2018

closes #24219
closes #24220
closes #24222

@@ -319,15 +313,15 @@ These provide date offsets anchored (by default) to the 15th and end of month, a

.. ipython:: python

Timestamp('2016-01-01') + SemiMonthEnd()
pd.Timestamp('2016-01-01') + SemiMonthEnd()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to use pd.offsets.SemiMonthEnd()?
I find it more descriptive as the reader doesn't have to scroll around to find where SemiMonthEnd() came from.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean pd.tseries.offsets.SemiMonthEnd()? I think SemiMonthEnd() and SemiMonthBegin() are used right after importing from pandas.tseries.offsets and that was the only time they were used. I could be wrong. Let me know if it is the case.

Copy link
Contributor

Choose a reason for hiding this comment

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

pd.tseries.offsets is imported as pd.offsets. They are basically the same. But maybe it's better to leave it like pd.tseries.offsets.SemiMonthEnd() as I don't know whether it's been the case in v0.19.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The document for v0.19 also uses a single class name like BDay or DataOffset. So I will keep it as it is now for consistency.

@codecov
Copy link

codecov bot commented Dec 11, 2018

Codecov Report

Merging #24236 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24236   +/-   ##
=======================================
  Coverage   92.21%   92.21%           
=======================================
  Files         162      162           
  Lines       51763    51763           
=======================================
  Hits        47733    47733           
  Misses       4030     4030
Flag Coverage Δ
#multiple 90.61% <ø> (ø) ⬆️
#single 43% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6c7f6b...78372e4. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 11, 2018

Codecov Report

Merging #24236 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #24236      +/-   ##
==========================================
+ Coverage   92.21%   92.21%   +<.01%     
==========================================
  Files         162      162              
  Lines       51768    51768              
==========================================
+ Hits        47739    47740       +1     
+ Misses       4029     4028       -1
Flag Coverage Δ
#multiple 90.61% <ø> (ø) ⬆️
#single 43% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/util/testing.py 87.41% <0%> (-0.1%) ⬇️
pandas/io/json/json.py 93.09% <0%> (+0.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9bc42f9...aa8f5b4. Read the comment docs.

@jreback jreback added the Docs label Dec 11, 2018
branch = 'master',
path = 'pandas/tests/io/parser/data/salaries.csv.bz2',
)
url = (r'https://github.com/{repo}/raw/{branch}/{path}'
Copy link
Member

Choose a reason for hiding this comment

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

Why a raw string here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed now.

thoo added 2 commits December 12, 2018 07:54
* upstream/master:
  pct change bug issue 21200 (pandas-dev#21235)
  DOC: Fix summaries not ending with a period (pandas-dev#24190)
  DOC: Add back currentmodule to api.rst (pandas-dev#24232)
  DOC: Fixed implicit imports for whatsnew (v >= version 20.0) (pandas-dev#24199)
  remove enum import for PY2 compat, xref pandas-dev#22802 (pandas-dev#24170)
  CI: Simplify Azure Pipelines configuration files (pandas-dev#23111)
  REF/TST: Add more pytest idiom to indexing/multiindex/test_getitem.py (pandas-dev#24053)
'ask': [720.93, 51.96, 51.98, 52.00,
720.93, 98.01, 720.88, 52.03]},
columns=['time', 'ticker', 'bid', 'ask'])
trades = pd.DataFrame({
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the new standard to align not on the ipython (the i), but 1 space in? this seems odd

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

this seems inconsistent even in this file

df
df.resample('M', on='date').sum()
df.resample('M', level='d').sum()
df = pd.DataFrame({'date': pd.date_range('2015-01-01', freq='W', periods=5),
Copy link
Contributor

Choose a reason for hiding this comment

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

here its different

pd.Timestamp('20130101 09:00:05'),
pd.Timestamp('20130101 09:00:06')],
name='foo'))
dft = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]},
Copy link
Contributor

Choose a reason for hiding this comment

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

here too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I realigned all to overlap with the first letter "i" or "c". Let me know if I miss any block.

thoo added 2 commits December 12, 2018 10:20
* upstream/master:
  DOC: Fix PEP-8 issues in indexing-, missing_data-, options- and release.rst (pandas-dev#24089)
@jreback jreback added this to the 0.24.0 milestone Dec 13, 2018
@jreback jreback merged commit 1d18430 into pandas-dev:master Dec 13, 2018
@jreback
Copy link
Contributor

jreback commented Dec 13, 2018

thanks @thoo

@thoo thoo deleted the flake8_whatsnew21 branch January 2, 2019 20:26
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants