Skip to content
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

CLN: Remove unnecessary code #23696

Merged
merged 1 commit into from
Nov 14, 2018

Conversation

suminb
Copy link
Contributor

@suminb suminb commented Nov 14, 2018

frozenset() and frozenset([]) essentially produce identical results, and thus there is no need to pass an empty list to create an empty frozenset.

  • tests added / passed (CI is still running...)
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry (no new feature)

No need to pass an empty array to create an empty frozenset.
@pep8speaks
Copy link

Hello @suminb! Thanks for submitting the PR.

Line 62:18: E241 multiple spaces after ','

@jreback
Copy link
Contributor

jreback commented Nov 14, 2018

ok sure

@jreback jreback added the Clean label Nov 14, 2018
@codecov
Copy link

codecov bot commented Nov 14, 2018

Codecov Report

Merging #23696 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23696      +/-   ##
==========================================
+ Coverage   92.24%   92.24%   +<.01%     
==========================================
  Files         161      161              
  Lines       51318    51340      +22     
==========================================
+ Hits        47339    47361      +22     
  Misses       3979     3979
Flag Coverage Δ
#multiple 90.64% <100%> (ø) ⬆️
#single 42.34% <100%> (+0.03%) ⬆️
Impacted Files Coverage Δ
pandas/core/groupby/groupby.py 96.51% <100%> (ø) ⬆️
pandas/core/accessor.py 98.79% <100%> (ø) ⬆️
pandas/core/generic.py 96.82% <100%> (ø) ⬆️
pandas/core/indexes/datetimelike.py 97.74% <0%> (-0.28%) ⬇️
pandas/tseries/offsets.py 96.98% <0%> (-0.09%) ⬇️
pandas/core/arrays/period.py 98.44% <0%> (-0.05%) ⬇️
pandas/core/indexes/datetimes.py 96.11% <0%> (-0.01%) ⬇️
pandas/core/arrays/datetimes.py 98.47% <0%> (+0.03%) ⬆️
pandas/core/arrays/datetimelike.py 96.14% <0%> (+0.21%) ⬆️
pandas/core/dtypes/concat.py 96.66% <0%> (+0.4%) ⬆️
... and 1 more

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 302e4ca...eddd732. Read the comment docs.

@@ -59,7 +59,7 @@ def coerce(request):
({'a', 1}, 'set', 'set'), # noqa: E241
(set(), 'set', 'set-empty'), # noqa: E241
(frozenset({'a', 1}), 'set', 'frozenset'), # noqa: E241
(frozenset([]), 'set', 'frozenset-empty'), # noqa: E241
(frozenset(), 'set', 'frozenset-empty'), # noqa: E241
Copy link
Member

Choose a reason for hiding this comment

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

Is the noqa still needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, this has to do with liniing things up.

@jreback jreback added this to the 0.24.0 milestone Nov 14, 2018
@jreback jreback merged commit 3edc18d into pandas-dev:master Nov 14, 2018
@jreback
Copy link
Contributor

jreback commented Nov 14, 2018

thanks @suminb

thoo added a commit to thoo/pandas that referenced this pull request Nov 15, 2018
* upstream/master: (25 commits)
  DOC: Delete trailing blank lines in docstrings. (pandas-dev#23651)
  DOC: Change release and whatsnew (pandas-dev#21599)
  DOC: Fix format of the See Also descriptions (pandas-dev#23654)
  DOC: update pandas.core.groupby.DataFrameGroupBy.resample docstring. (pandas-dev#20374)
  ENH: Allow export of mixed columns to Stata strl (pandas-dev#23692)
  CLN: Remove unnecessary code (pandas-dev#23696)
  Pin flake8-rst version (pandas-dev#23699)
  Implement _most_ of the EA interface for DTA/TDA (pandas-dev#23643)
  CI: raise clone depth limit on CI
  BUG: Fix Series/DataFrame.rank(pct=True) with more than 2**24 rows (pandas-dev#23688)
  REF: Move Excel names parameter handling to CSV (pandas-dev#23690)
  DOC: Accessing files from a S3 bucket. (pandas-dev#23639)
  Fix errorbar visualization (pandas-dev#23674)
  DOC: Surface / doc mangle_dupe_cols in read_excel (pandas-dev#23678)
  DOC: Update is_sparse docstring (pandas-dev#19983)
  BUG: Fix read_excel w/parse_cols & empty dataset (pandas-dev#23661)
  Add to_flat_index method to MultiIndex (pandas-dev#22866)
  CLN: Move to_excel to generic.py (pandas-dev#23656)
  TST: IntervalTree.get_loc_interval should return platform int (pandas-dev#23660)
  CI: Allow to compile docs with ipython 7.11 pandas-dev#22990 (pandas-dev#23655)
  ...
thoo added a commit to thoo/pandas that referenced this pull request Nov 15, 2018
…fixed

* upstream/master:
  DOC: Delete trailing blank lines in docstrings. (pandas-dev#23651)
  DOC: Change release and whatsnew (pandas-dev#21599)
  DOC: Fix format of the See Also descriptions (pandas-dev#23654)
  DOC: update pandas.core.groupby.DataFrameGroupBy.resample docstring. (pandas-dev#20374)
  ENH: Allow export of mixed columns to Stata strl (pandas-dev#23692)
  CLN: Remove unnecessary code (pandas-dev#23696)
  Pin flake8-rst version (pandas-dev#23699)
  Implement _most_ of the EA interface for DTA/TDA (pandas-dev#23643)
  CI: raise clone depth limit on CI
  BUG: Fix Series/DataFrame.rank(pct=True) with more than 2**24 rows (pandas-dev#23688)
  REF: Move Excel names parameter handling to CSV (pandas-dev#23690)
  DOC: Accessing files from a S3 bucket. (pandas-dev#23639)
  Fix errorbar visualization (pandas-dev#23674)
  DOC: Surface / doc mangle_dupe_cols in read_excel (pandas-dev#23678)
  DOC: Update is_sparse docstring (pandas-dev#19983)
  BUG: Fix read_excel w/parse_cols & empty dataset (pandas-dev#23661)
  Add to_flat_index method to MultiIndex (pandas-dev#22866)
  CLN: Move to_excel to generic.py (pandas-dev#23656)
  TST: IntervalTree.get_loc_interval should return platform int (pandas-dev#23660)
@suminb suminb changed the title Remove unnecessary code CLN: Remove unnecessary code Nov 15, 2018
tm9k1 pushed a commit to tm9k1/pandas that referenced this pull request Nov 19, 2018
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
Development

Successfully merging this pull request may close these issues.

4 participants