Skip to content

Commit

Permalink
Update VIN regex (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikroe authored Jan 23, 2024
1 parent 3962024 commit 8498511
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bimmer_connected/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from bimmer_connected.models import AnonymizedResponse, MyBMWAPIError, MyBMWAuthError, MyBMWQuotaError

UNICODE_CHARACTER_SET = string.ascii_letters + string.digits + "-._~"
RE_VIN = re.compile(r"(?P<vin>WB[a-zA-Z0-9]{15})")
RE_VIN = re.compile(r"(?P<vin>\b[(A-H|J-N|P|R-Z|0-9)]{17}\b)")
ANONYMIZED_VINS: Dict[str, str] = {}


Expand Down
2 changes: 1 addition & 1 deletion bimmer_connected/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_anonymize_data():
"licensePlate": "secret",
"public": "public_data",
"a_list": [
{"vin": "WBA000000SECRET01"},
{"vin": "4US000000SECRET01"},
{
"lon": 666,
"public": "more_public_data",
Expand Down

0 comments on commit 8498511

Please sign in to comment.