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

MAINT: Shorten __repr__ for different assets #1786

Merged
merged 1 commit into from Jun 22, 2017
Merged

Conversation

freddiev4
Copy link
Contributor

@freddiev4 freddiev4 commented May 8, 2017

x-ref #1675

This change shortens the __repr__ method for Asset, and uses the same repr for different Asset classes (e.g. Futures and Equities).

Only concern I have here is the comment from Eddie and others on the Futures repr:

image

@freddiev4 freddiev4 requested a review from ssanderson May 8, 2017 22:24
Copy link
Contributor

@ssanderson ssanderson left a comment

Choose a reason for hiding this comment

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

LGTM. We probably need to make sure that this doesn't break anything downstream. We've seen instances in the past where new-to-python Quantopian users were getting object attributes by doing regex matching on object reprs, so this might actually be a breaking change.

@freddiev4 freddiev4 force-pushed the assets-are-too-long branch 2 times, most recently from 1ab49ad to 4d8840d Compare May 8, 2017 22:43
@ssanderson
Copy link
Contributor

1.95s$ flake8 zipline tests
tests/test_assets.py:33:1: F401 'PY2' imported but unused
The command "flake8 zipline tests" exited with 1.

TST: Modify repr test for Futures

repr to reprd in test

Remove unused dependency
@freddiev4
Copy link
Contributor Author

@ssanderson Fixed the flake8 failure

@coveralls
Copy link

coveralls commented May 10, 2017

Coverage Status

Coverage remained the same at 87.716% when pulling 9c81f8b on assets-are-too-long into caed14a on master.

@freddiev4 freddiev4 merged commit 982947f into master Jun 22, 2017
@freddiev4 freddiev4 deleted the assets-are-too-long branch June 22, 2017 15:05
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.

None yet

4 participants