Skip to content

Commit 0f3c633

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ba356ca commit 0f3c633

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

maths/is_ip_v4_address_valid.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,25 @@ def is_ip_v4_address_valid(ip: str) -> bool:
5151
False
5252
"""
5353

54-
parts = ip.split('.')
54+
parts = ip.split(".")
5555

5656
if len(parts) != 4:
5757
return False
58-
58+
5959
for part in parts:
6060
if not part:
6161
return False
62-
62+
6363
for i in range(len(part)):
6464
if not part[i].isdigit():
6565
return False
6666

67-
if part[0] == '0' and len(part) > 1:
67+
if part[0] == "0" and len(part) > 1:
6868
return False
69-
70-
if not (0 <= int(part) <= 255):
69+
70+
if not (0 <= int(part) <= 255):
7171
return False
72-
72+
7373
return True
7474

7575

0 commit comments

Comments
 (0)