From e9e0addd580405354ec903321415f2c2609f03ff Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Tue, 18 Oct 2011 18:13:13 -0400 Subject: [PATCH] Add docstring to is_real_player --- xonstat/views/submission.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 3b8f8a0..c40a711 100755 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -10,6 +10,15 @@ from xonstat.util import strip_colors log = logging.getLogger(__name__) def is_real_player(events): + """ + Determines if a given set of player events correspond with a player who + + 1) is not a bot (P event does not look like a bot) + 2) played in the game (matches 1) + 3) was present at the end of the game (scoreboardvalid 1) + + Returns True if the player meets the above conditions, and false otherwise. + """ flg_is_real = False if not events['P'].startswith('bot'): -- 2.39.2