Skip to content

HDFStore.__iter__ #539

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 3 commits into from
Feb 16, 2023
Merged

HDFStore.__iter__ #539

merged 3 commits into from
Feb 16, 2023

Conversation

twoertwein
Copy link
Member

Without this PR

for key in pd.HDFStore(...):
   ...

would cause error: "List[str]" has no attribute "__next__" [attr-defined]

@twoertwein
Copy link
Member Author

twoertwein commented Feb 16, 2023

Enabled Y034 which in theory should have caught this (PyCQA/flake8-pyi#348). Also added Self wherever Y034 was suggesting it (could be used in many more places).

xref pandas-dev/pandas#51233

edit: Y034 has nothing do to with __iter__ If you want to postpone the introduction of Self, I can revert that part.

@twoertwein twoertwein requested a review from Dr-Irv February 16, 2023 02:36
Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

Glad you found the Y034 thing. Thanks @twoertwein

@twoertwein
Copy link
Member Author

The CI seems kind of slow (most runs are queued). Should we:

  • only test on the latest and oldest python versions
  • still test on all python versions but test them disjointly across different platforms
  • same as above but always test oldest/newest on all platforms

@Dr-Irv Dr-Irv merged commit 0fd68ab into pandas-dev:main Feb 16, 2023
@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Feb 16, 2023

The CI seems kind of slow (most runs are queued). Should we:

  • only test on the latest and oldest python versions
  • still test on all python versions but test them disjointly across different platforms
  • same as above but always test oldest/newest on all platforms

I think we should leave it as is. It seems the runs being queued depends on time of day, and happens more with Windows and MacOS than Linux.

twoertwein added a commit to twoertwein/pandas-stubs that referenced this pull request Apr 1, 2023
* HDFStore.__iter__

* enable Y034

* added missing IntervalIndex.closed
@twoertwein twoertwein deleted the hdf_iter branch February 10, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants