Skip to content

clean up data.py #4001

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
13 tasks done
cpcloud opened this issue Jun 23, 2013 · 3 comments · Fixed by #4002
Closed
13 tasks done

clean up data.py #4001

cpcloud opened this issue Jun 23, 2013 · 3 comments · Fixed by #4002
Assignees
Labels
Bug IO Data IO issues that don't fit into a more specific label Testing pandas testing functions or related to the test suite
Milestone

Comments

@cpcloud
Copy link
Member

cpcloud commented Jun 23, 2013

  • remove isinstance(x, str) checks
  • handle urls with context managers
  • get rid of Exception and use appropriate exception types
  • pep8
  • remove redundant parens in conditionals
  • remove \ style line joins
  • range -> xrange
  • functions should not exit after a warning with None they should raise an exception
  • turn all the str + style concats into format strings
  • remove redundant calls to str
  • remove exception handlers with no exception type
  • replace calls to __setattr__ and __getattribute__ with setattr and getattr
  • code coverage at 99%

This should remove the connection reset by peer testing error and I thought I would perform a little housekeeping while I was at it.

@jreback
Copy link
Contributor

jreback commented Jun 24, 2013

I see that you moved #4002 to 0.12, this too?

@cpcloud
Copy link
Member Author

cpcloud commented Jun 24, 2013

yep thanks

@cpcloud
Copy link
Member Author

cpcloud commented Jun 25, 2013

this is getting a heaping helping of DRY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO Data IO issues that don't fit into a more specific label Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants