npb_data_app / utils.py
patrickramos's picture
Increase width of name column
153b79c
Raw History Blame Contribute Delete
423 Bytes
def get_col_width(col, player_team_type):
match col:
case "Pitcher" | "Batter":
return 140
case "Team":
return 75
case "Throws" | "Bats":
return 60
case "IP":
return 60 if player_team_type == "team pitching" else 50
case "Pitch" | "Pitch (General)":
return 125
case _:
return max(50, 10 * len(col))