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

Conversation

Projects
None yet
3 participants
@freddiev4
Contributor

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

@ssanderson

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 May 8, 2017

@ssanderson

This comment has been minimized.

Member

ssanderson commented May 8, 2017

1.95s$ flake8 zipline tests
tests/test_assets.py:33:1: F401 'PY2' imported but unused
The command "flake8 zipline tests" exited with 1.
MAINT: Shorten __repr__ for different assets
TST: Modify repr test for Futures

repr to reprd in test

Remove unused dependency

@freddiev4 freddiev4 force-pushed the assets-are-too-long branch from 4d8840d to 9c81f8b May 9, 2017

@freddiev4

This comment has been minimized.

Contributor

freddiev4 commented May 9, 2017

@ssanderson Fixed the flake8 failure

@coveralls

This comment has been minimized.

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

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@freddiev4 freddiev4 deleted the assets-are-too-long branch Jun 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment