diff --git a/app/data/heroes.csv b/app/data/heroes.csv index 5e992fb6..b513c8a5 100644 --- a/app/data/heroes.csv +++ b/app/data/heroes.csv @@ -16,13 +16,13 @@ junkrat,Junkrat,damage,200,0,0 kiriko,Kiriko,support,200,0,0 lifeweaver,Lifeweaver,support,175,0,50 lucio,LĂșcio,support,200,0,0 -mauga,Mauga,tank,650,0,0 +mauga,Mauga,tank,350,150,0 mei,Mei,damage,250,0,0 mercy,Mercy,support,200,0,0 moira,Moira,support,200,0,0 orisa,Orisa,tank,275,275,0 pharah,Pharah,damage,200,0,0 -ramattra,Ramattra,tank,450,0,0 +ramattra,Ramattra,tank,200,100,0 reaper,Reaper,damage,250,0,0 reinhardt,Reinhardt,tank,350,250,0 roadhog,Roadhog,tank,700,0,0 diff --git a/app/parsers/helpers.py b/app/parsers/helpers.py index eb129f1c..0d3d8e47 100644 --- a/app/parsers/helpers.py +++ b/app/parsers/helpers.py @@ -27,8 +27,8 @@ def get_computed_stat_value(input_str: str) -> str | float | int: return int(result[1]) * 60 + int(result[2]) # Int format - if re.match(r"^-?\d+%?$", input_str): - return int(input_str.replace("%", "")) + if re.match(r"^-?\d+(,\d+)*%?$", input_str): + return int(input_str.replace("%", "").replace(",", "")) # Float format if re.match(r"^-?\d+\.\d+$", input_str): diff --git a/pyproject.toml b/pyproject.toml index e2d4886f..4248b4e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "overfast-api" -version = "2.22.1" +version = "2.23.0" description = "Overwatch API giving data about heroes, maps, and players statistics." license = "MIT" authors = ["Valentin PORCHET "] diff --git a/tests/parsers/test_helpers.py b/tests/parsers/test_helpers.py index ce2b6f17..16d3fcee 100644 --- a/tests/parsers/test_helpers.py +++ b/tests/parsers/test_helpers.py @@ -26,8 +26,8 @@ ("-86", -86), ("46%", 46), ("208", 208), - ("12585", 12585), - ("68236356", 68236356), + ("12,585", 12585), + ("68,236,356", 68236356), # Float format ("7.58", 7.58), ("37.89", 37.89),