Skip to content

Conversation

@spilchen
Copy link
Owner

Travis Hunter is a dual-position player (WR and DB) in Yahoo Fantasy, and the JSON response includes a linked_player field with his defensive player data. The old roster parsing code used a deep recursive ObjectPath query ($..) that picked up fields from inside the linked_player object, causing the sequential next() calls to misalign and crash.

I completely rewrote the roster() method to avoid deep recursion. Instead, I navigate directly to the roster structure.

Closes #65

Travis Hunter is a dual-position player (WR and DB) in Yahoo Fantasy,
and the JSON response includes a linked_player field with his defensive
player data.  The old roster parsing code used a deep recursive
ObjectPath query ($..) that picked up fields from inside the
linked_player object, causing the sequential next() calls to misalign
and crash.

I completely rewrote the roster() method to avoid deep recursion.
Instead, I navigate directly to the roster structure.
@spilchen spilchen self-assigned this Nov 27, 2025
This is an auto-generated PR with fixes by autopep8.

Co-authored-by: spilchen <spilchen@users.noreply.github.com>
@spilchen spilchen merged commit 0a75982 into master Nov 27, 2025
2 checks passed
@spilchen spilchen deleted the travis-hunter-fix branch November 27, 2025 01:03
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.

Travis Hunter breaks the team.roster() function

2 participants