Skip to content

Commit 6df142b

Browse files
committed
forced utf-8 file encoding
1 parent eccbbe7 commit 6df142b

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

string_utils.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
13
import json
24
import re
35
from uuid import uuid4
@@ -13,6 +15,7 @@
1315
'is_snake_case',
1416
'is_json',
1517
'is_uuid',
18+
'is_ip',
1619
'camel_case_to_snake',
1720
'snake_case_to_camel',
1821
'reverse',
@@ -208,6 +211,10 @@ def is_uuid(string):
208211
return bool(UUID_RE.match(str(string)))
209212

210213

214+
def is_ip(string):
215+
pass
216+
217+
211218
# string manipulation functions
212219

213220
def reverse(string):
@@ -289,7 +296,6 @@ def shuffle(string):
289296
random.shuffle(s) # shuffle the list
290297
return ''.join(s) # convert the shuffled list back to string
291298

292-
293299
# NEW FUNCTIONS
294300
# def is_multiline(string):
295301
# pass
@@ -303,9 +309,6 @@ def shuffle(string):
303309
# def slugify(string):
304310
# pass
305311
#
306-
# def is_ip(string):
307-
# pass
308-
#
309312
# def contains_html(string):
310313
# pass
311314
#

tests.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import re
2-
from unittest.case import TestCase
3-
4-
from string_utils import *
1+
# -*- coding: utf-8 -*-
52

3+
from unittest.case import TestCase
64
from uuid import uuid4
7-
85
import json
96

7+
from string_utils import *
8+
109

1110
# string checking tests
1211

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy