knify 1.8.43__tar.gz → 1.8.44__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.43
3
+ Version: 1.8.44
4
4
  Summary: Development tools for python
5
5
  Home-page: https://github.com/qicongsheng/knify
6
6
  Author: qicongsheng
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding:utf-8 -*-
3
+ # Author: qicongsheng
4
+
5
+
6
+ def read_to_string(file_path_: str, encoding_: str = 'utf-8') -> str:
7
+ with open(file_path_, 'r', encoding=encoding_) as file:
8
+ content = file.read()
9
+ return content
10
+
11
+
12
+ def read_lines(file_path_: str, encoding_: str = 'utf-8') -> list[str]:
13
+ with open(file_path_, 'r', encoding=encoding_) as file:
14
+ return file.readlines()
@@ -2,12 +2,13 @@
2
2
  # -*- coding:utf-8 -*-
3
3
  # Author: qicongsheng
4
4
 
5
+
5
6
  def get_pip_name():
6
7
  return 'knify'
7
8
 
8
9
 
9
10
  def get_version():
10
- return '1.8.43'
11
+ return '1.8.44'
11
12
 
12
13
 
13
14
  def print_version():
@@ -2,5 +2,6 @@
2
2
  # -*- coding:utf-8 -*-
3
3
  # Author: qicongsheng
4
4
 
5
+
5
6
  def partition(list_obj, partition_size):
6
7
  return [list_obj[i:i + partition_size] for i in range(0, len(list_obj), partition_size)]
@@ -2,5 +2,6 @@
2
2
  # -*- coding:utf-8 -*-
3
3
  # Author: qicongsheng
4
4
 
5
+
5
6
  def default_if_none(obj: object, default_value: object) -> object:
6
7
  return default_value if obj is None or obj == '' else obj
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: knify
3
- Version: 1.8.43
3
+ Version: 1.8.44
4
4
  Summary: Development tools for python
5
5
  Home-page: https://github.com/qicongsheng/knify
6
6
  Author: qicongsheng
@@ -3,6 +3,7 @@ README.md
3
3
  setup.py
4
4
  knify/__init__.py
5
5
  knify/dateutil.py
6
+ knify/fileutil.py
6
7
  knify/help.py
7
8
  knify/listutil.py
8
9
  knify/logger.py
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