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

Move get 'trailingPegRatio' into _get_info(), simplify & optimise #1138

Merged
merged 1 commit into from Nov 2, 2022

Conversation

ValueRaider
Copy link
Collaborator

Resolve #1114, which was caused by redundant code so just removed it.

Move the logic into _get_info() - I introduced this bug in my big timezone update (#1048), so 'trailingPegRatio' would have disappeared from info[].

Simplify the code as loop is unnecessary. Also disable it, replacing with a direct GET - scraping a whole page for one variable is a waste. Keep the original code in case do want all key statistics in future.

@rickturner2001 I believe you first requested that 'trailingPegRatio' be fixed (#903).

@rickturner2001
Copy link
Contributor

I completely forgot about this!

@ValueRaider Why are we setting keys to a set with a string inside, just to check if len(keys) > 0 one line below?

@ValueRaider
Copy link
Collaborator Author

@rickturner2001 Just habit of defensive coding - I made an iterable so check length. No harm.

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

2 participants