knify 1.8.44__tar.gz → 1.8.46__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {knify-1.8.44 → knify-1.8.46}/PKG-INFO +1 -1
- {knify-1.8.44 → knify-1.8.46}/knify/fileutil.py +3 -4
- {knify-1.8.44 → knify-1.8.46}/knify/help.py +1 -1
- {knify-1.8.44 → knify-1.8.46}/knify.egg-info/PKG-INFO +1 -1
- {knify-1.8.44 → knify-1.8.46}/LICENSE +0 -0
- {knify-1.8.44 → knify-1.8.46}/README.md +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify/__init__.py +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify/dateutil.py +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify/listutil.py +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify/logger.py +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify/objutil.py +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify/threadutil.py +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify/warnutil.py +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify.egg-info/SOURCES.txt +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify.egg-info/dependency_links.txt +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify.egg-info/requires.txt +0 -0
- {knify-1.8.44 → knify-1.8.46}/knify.egg-info/top_level.txt +0 -0
- {knify-1.8.44 → knify-1.8.46}/setup.cfg +0 -0
- {knify-1.8.44 → knify-1.8.46}/setup.py +0 -0
@@ -5,10 +5,9 @@
|
|
5
5
|
|
6
6
|
def read_to_string(file_path_: str, encoding_: str = 'utf-8') -> str:
|
7
7
|
with open(file_path_, 'r', encoding=encoding_) as file:
|
8
|
-
|
9
|
-
return content
|
8
|
+
return file.read()
|
10
9
|
|
11
10
|
|
12
|
-
def read_lines(file_path_: str, encoding_: str = 'utf-8') -> list[str]:
|
11
|
+
def read_lines(file_path_: str, encoding_: str = 'utf-8', trim: bool = True) -> list[str]:
|
13
12
|
with open(file_path_, 'r', encoding=encoding_) as file:
|
14
|
-
return file.readlines()
|
13
|
+
return [line_.strip() for line_ in file.readlines()] if trim else file.readlines()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|