knify 1.8.44__tar.gz → 1.8.45__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: knify
3
- Version: 1.8.44
3
+ Version: 1.8.45
4
4
  Summary: Development tools for python
5
5
  Home-page: https://github.com/qicongsheng/knify
6
6
  Author: qicongsheng
@@ -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
- content = file.read()
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 = False) -> 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()
@@ -8,7 +8,7 @@ def get_pip_name():
8
8
 
9
9
 
10
10
  def get_version():
11
- return '1.8.44'
11
+ return '1.8.45'
12
12
 
13
13
 
14
14
  def print_version():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: knify
3
- Version: 1.8.44
3
+ Version: 1.8.45
4
4
  Summary: Development tools for python
5
5
  Home-page: https://github.com/qicongsheng/knify
6
6
  Author: qicongsheng
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