MarcoGorelli / pyladieslondon-sprints

4 stars 0 forks source link

Add YD01 to validate_docstrings codes #45

Open MarcoGorelli opened 2 years ago

MarcoGorelli commented 2 years ago

and fix related errors:

/Users/marcogorelli/pandas-dev/pandas/core/groupby/groupby.py:753:YD01:pandas.core.resample.Resampler.iter:No Yields section found /Users/marcogorelli/pandas-dev/pandas/core/groupby/groupby.py:753:YD01:pandas.core.groupby.GroupBy.iter:No Yields section found /Users/marcogorelli/pandas-dev/pandas/core/groupby/groupby.py:2364:YD01:pandas.core.groupby.GroupBy.ohlc:No Yields section found /Users/marcogorelli/pandas-dev/pandas/core/frame.py:1345:YD01:pandas.DataFrame.itertuples:No Yields section found /Users/marcogorelli/pandas-dev/pandas/core/frame.py:9552:YD01:pandas.DataFrame.round:No Yields section found

MarcoGorelli commented 2 years ago

first: run:

python scripts/validate_docstrings.py --errors YD01
MarcoGorelli commented 2 years ago

should give these errors:

/Users/marcogorelli/pandas-dev/pandas/core/groupby/groupby.py:753:YD01:pandas.core.resample.Resampler.__iter__:No Yields section found
/Users/marcogorelli/pandas-dev/pandas/core/groupby/groupby.py:753:YD01:pandas.core.groupby.GroupBy.__iter__:No Yields section found
/Users/marcogorelli/pandas-dev/pandas/core/groupby/groupby.py:2364:YD01:pandas.core.groupby.GroupBy.ohlc:No Yields section found
/Users/marcogorelli/pandas-dev/pandas/core/frame.py:1345:YD01:pandas.DataFrame.itertuples:No Yields section found
/Users/marcogorelli/pandas-dev/pandas/core/frame.py:9552:YD01:pandas.DataFrame.round:No Yields section found
MarcoGorelli commented 2 years ago

first: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.info.html

MarcoGorelli commented 2 years ago

remove data from:

https://github.com/pandas-dev/pandas/blob/06d230151e6f18fdb8139d09abf539867a8cd481/pandas/io/formats/info.py#L251-L262