mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Fix ruff rules ISC flake8-implicit-str-concat (#8892)
This commit is contained in:
@ -22,9 +22,7 @@ def is_sri_lankan_phone_number(phone: str) -> bool:
|
||||
False
|
||||
"""
|
||||
|
||||
pattern = re.compile(
|
||||
r"^(?:0|94|\+94|0{2}94)" r"7(0|1|2|4|5|6|7|8)" r"(-| |)" r"\d{7}$"
|
||||
)
|
||||
pattern = re.compile(r"^(?:0|94|\+94|0{2}94)7(0|1|2|4|5|6|7|8)(-| |)\d{7}$")
|
||||
|
||||
return bool(re.search(pattern, phone))
|
||||
|
||||
|
Reference in New Issue
Block a user