Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
library = client.library
buffer = bytearray(data)
mode = GameMode(consume_byte(buffer))
version = consume_int(buffer)
beatmap_md5 = consume_string(buffer)
player_name = consume_string(buffer)
replay_md5 = consume_string(buffer)
count_300 = consume_short(buffer)
count_100 = consume_short(buffer)
count_50 = consume_short(buffer)
count_geki = consume_short(buffer)
count_katu = consume_short(buffer)
count_miss = consume_short(buffer)
score = consume_int(buffer)
max_combo = consume_short(buffer)
full_combo = bool(consume_byte(buffer))
mod_mask = consume_int(buffer)
life_bar_graph = _consume_life_bar_graph(buffer)
timestamp = consume_datetime(buffer)
actions = _consume_actions(buffer)
mod_kwargs = Mod.unpack(mod_mask)
# delete the alias field names
del mod_kwargs['relax2']
del mod_kwargs['last_mod']
if retrieve_beatmap:
try:
beatmap = library.lookup_by_md5(beatmap_md5)
if library is not None:
raise ValueError(
'only one of library or client can be passed'
)
library = client.library
buffer = bytearray(data)
mode = GameMode(consume_byte(buffer))
version = consume_int(buffer)
beatmap_md5 = consume_string(buffer)
player_name = consume_string(buffer)
replay_md5 = consume_string(buffer)
count_300 = consume_short(buffer)
count_100 = consume_short(buffer)
count_50 = consume_short(buffer)
count_geki = consume_short(buffer)
count_katu = consume_short(buffer)
count_miss = consume_short(buffer)
score = consume_int(buffer)
max_combo = consume_short(buffer)
full_combo = bool(consume_byte(buffer))
mod_mask = consume_int(buffer)
life_bar_graph = _consume_life_bar_graph(buffer)
timestamp = consume_datetime(buffer)
actions = _consume_actions(buffer)
mod_kwargs = Mod.unpack(mod_mask)
# delete the alias field names
del mod_kwargs['relax2']
del mod_kwargs['last_mod']
buffer = bytearray(data)
mode = GameMode(consume_byte(buffer))
version = consume_int(buffer)
beatmap_md5 = consume_string(buffer)
player_name = consume_string(buffer)
replay_md5 = consume_string(buffer)
count_300 = consume_short(buffer)
count_100 = consume_short(buffer)
count_50 = consume_short(buffer)
count_geki = consume_short(buffer)
count_katu = consume_short(buffer)
count_miss = consume_short(buffer)
score = consume_int(buffer)
max_combo = consume_short(buffer)
full_combo = bool(consume_byte(buffer))
mod_mask = consume_int(buffer)
life_bar_graph = _consume_life_bar_graph(buffer)
timestamp = consume_datetime(buffer)
actions = _consume_actions(buffer)
mod_kwargs = Mod.unpack(mod_mask)
# delete the alias field names
del mod_kwargs['relax2']
del mod_kwargs['last_mod']
if retrieve_beatmap:
try:
beatmap = library.lookup_by_md5(beatmap_md5)
except KeyError:
if not use_client:
use_client = client is not None
if use_client:
if library is not None:
raise ValueError(
'only one of library or client can be passed'
)
library = client.library
buffer = bytearray(data)
mode = GameMode(consume_byte(buffer))
version = consume_int(buffer)
beatmap_md5 = consume_string(buffer)
player_name = consume_string(buffer)
replay_md5 = consume_string(buffer)
count_300 = consume_short(buffer)
count_100 = consume_short(buffer)
count_50 = consume_short(buffer)
count_geki = consume_short(buffer)
count_katu = consume_short(buffer)
count_miss = consume_short(buffer)
score = consume_int(buffer)
max_combo = consume_short(buffer)
full_combo = bool(consume_byte(buffer))
mod_mask = consume_int(buffer)
life_bar_graph = _consume_life_bar_graph(buffer)
timestamp = consume_datetime(buffer)
actions = _consume_actions(buffer)
mod_kwargs = Mod.unpack(mod_mask)
# delete the alias field names
del mod_kwargs['relax2']
if use_client:
if library is not None:
raise ValueError(
'only one of library or client can be passed'
)
library = client.library
buffer = bytearray(data)
mode = GameMode(consume_byte(buffer))
version = consume_int(buffer)
beatmap_md5 = consume_string(buffer)
player_name = consume_string(buffer)
replay_md5 = consume_string(buffer)
count_300 = consume_short(buffer)
count_100 = consume_short(buffer)
count_50 = consume_short(buffer)
count_geki = consume_short(buffer)
count_katu = consume_short(buffer)
count_miss = consume_short(buffer)
score = consume_int(buffer)
max_combo = consume_short(buffer)
full_combo = bool(consume_byte(buffer))
mod_mask = consume_int(buffer)
life_bar_graph = _consume_life_bar_graph(buffer)
timestamp = consume_datetime(buffer)
actions = _consume_actions(buffer)
mod_kwargs = Mod.unpack(mod_mask)
# delete the alias field names
del mod_kwargs['relax2']
del mod_kwargs['last_mod']
'only one of library or client can be passed'
)
library = client.library
buffer = bytearray(data)
mode = GameMode(consume_byte(buffer))
version = consume_int(buffer)
beatmap_md5 = consume_string(buffer)
player_name = consume_string(buffer)
replay_md5 = consume_string(buffer)
count_300 = consume_short(buffer)
count_100 = consume_short(buffer)
count_50 = consume_short(buffer)
count_geki = consume_short(buffer)
count_katu = consume_short(buffer)
count_miss = consume_short(buffer)
score = consume_int(buffer)
max_combo = consume_short(buffer)
full_combo = bool(consume_byte(buffer))
mod_mask = consume_int(buffer)
life_bar_graph = _consume_life_bar_graph(buffer)
timestamp = consume_datetime(buffer)
actions = _consume_actions(buffer)
mod_kwargs = Mod.unpack(mod_mask)
# delete the alias field names
del mod_kwargs['relax2']
del mod_kwargs['last_mod']
if retrieve_beatmap:
try:
raise ValueError(
'only one of library or client can be passed'
)
library = client.library
buffer = bytearray(data)
mode = GameMode(consume_byte(buffer))
version = consume_int(buffer)
beatmap_md5 = consume_string(buffer)
player_name = consume_string(buffer)
replay_md5 = consume_string(buffer)
count_300 = consume_short(buffer)
count_100 = consume_short(buffer)
count_50 = consume_short(buffer)
count_geki = consume_short(buffer)
count_katu = consume_short(buffer)
count_miss = consume_short(buffer)
score = consume_int(buffer)
max_combo = consume_short(buffer)
full_combo = bool(consume_byte(buffer))
mod_mask = consume_int(buffer)
life_bar_graph = _consume_life_bar_graph(buffer)
timestamp = consume_datetime(buffer)
actions = _consume_actions(buffer)
mod_kwargs = Mod.unpack(mod_mask)
# delete the alias field names
del mod_kwargs['relax2']
del mod_kwargs['last_mod']
if retrieve_beatmap: