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

Formatting for deltas column in leaderboard #63

Merged
merged 2 commits into from
Apr 19, 2014
Merged

Formatting for deltas column in leaderboard #63

merged 2 commits into from
Apr 19, 2014

Conversation

projectdelphai
Copy link
Contributor

This is hopefully a fix for #62. It's my first pull request to this project and I didn't really have a way to test it that I knew of, so let me know if I screwed anything up. Thanks!

@amorde
Copy link
Contributor

amorde commented Apr 18, 2014

Hey thanks for the pull request! And welcome.

Quick question - are you parsing the user's wiki page to get their total delta count? If you are, a much easier way to get the total is to just look at their current flair text.

Something like this:

flair_text = self.subreddit.get_flair(topscores[i]['user']) # ex "20∆"
total_deltas = int(flair[:-1]) # remove the delta

If I misunderstood your code, then ignore this!

@Snorrrlax
Copy link
Collaborator

Yeah, the user wiki pages are often inaccurate due to various bugs. If you're using flair text then it's all good.

@Snorrrlax
Copy link
Collaborator

And thank you for doing this :)

@projectdelphai
Copy link
Contributor Author

Alright, so I changed the code to reflect that flair text. You're right in that it makes much more sense this way.

Snorrrlax added a commit that referenced this pull request Apr 19, 2014
Formatting for deltas column in leaderboard
@Snorrrlax Snorrrlax merged commit 2a75d47 into alexames:master Apr 19, 2014
@projectdelphai projectdelphai deleted the issue62 branch April 24, 2014 06:17
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.

3 participants