MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / rank

Method rank

scratchattach/site/user.py:1209–1222  ·  view source on GitHub ↗

Finds the rank of the user. Returns a member of the Rank enum: either Rank.NEW_SCRATCHER, Rank.SCRATCHER, or Rank.SCRATCH_TEAM. May replace user.scratchteam and user.is_new_scratcher in the future.

(self)

Source from the content-addressed store, hash-verified

1207 return v
1208
1209 def rank(self) -> Rank:
1210 """
1211 Finds the rank of the user.
1212 Returns a member of the Rank enum: either Rank.NEW_SCRATCHER, Rank.SCRATCHER, or Rank.SCRATCH_TEAM.
1213 May replace user.scratchteam and user.is_new_scratcher in the future.
1214 """
1215
1216 if self.is_new_scratcher():
1217 return Rank.NEW_SCRATCHER
1218
1219 if not self.scratchteam:
1220 return Rank.SCRATCHER
1221
1222 return Rank.SCRATCH_TEAM
1223
1224
1225# ------ #

Callers 1

test_userFunction · 0.80

Calls 1

is_new_scratcherMethod · 0.95

Tested by 1

test_userFunction · 0.64