character-encoding-utils 0.0.3__tar.gz → 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/PKG-INFO +1 -1
  2. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/pyproject.toml +1 -1
  3. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/src/character_encoding_utils/big5.py +1 -1
  4. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/src/character_encoding_utils/gb2312.py +2 -2
  5. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/src/character_encoding_utils/ksx1001.py +2 -2
  6. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/src/character_encoding_utils/shiftjis.py +2 -2
  7. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/src/character_encoding_utils.egg-info/PKG-INFO +1 -1
  8. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/LICENSE +0 -0
  9. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/README.md +0 -0
  10. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/setup.cfg +0 -0
  11. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/src/character_encoding_utils/__init__.py +0 -0
  12. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/src/character_encoding_utils.egg-info/SOURCES.txt +0 -0
  13. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/src/character_encoding_utils.egg-info/dependency_links.txt +0 -0
  14. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/src/character_encoding_utils.egg-info/top_level.txt +0 -0
  15. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/tests/test_big5.py +0 -0
  16. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/tests/test_gb2312.py +0 -0
  17. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/tests/test_ksx1001.py +0 -0
  18. {character-encoding-utils-0.0.3 → character-encoding-utils-0.0.4}/tests/test_shiftjis.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: character-encoding-utils
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Some character encoding utils.
5
5
  Author: TakWolf
6
6
  Maintainer: TakWolf
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "character-encoding-utils"
3
- version = "0.0.3"
3
+ version = "0.0.4"
4
4
  description = "Some character encoding utils."
5
5
  readme = "README.md"
6
6
  license = { text = "MIT License" }
@@ -98,7 +98,7 @@ def decode(bs: bytes | bytearray) -> str:
98
98
 
99
99
  def query_code(c: str) -> int:
100
100
  if len(c) != 1:
101
- raise Big5Exception('must be one character')
101
+ raise Big5Exception('Must be one character')
102
102
  try:
103
103
  bs = encode(c)
104
104
  except Big5EncodeError as e:
@@ -60,7 +60,7 @@ def decode(bs: bytes | bytearray) -> str:
60
60
 
61
61
  def query_coord(c: str) -> tuple[int, int]:
62
62
  if len(c) != 1:
63
- raise GB2312Exception('must be one character')
63
+ raise GB2312Exception('Must be one character')
64
64
  try:
65
65
  bs = encode(c)
66
66
  except GB2312EncodeError as e:
@@ -97,7 +97,7 @@ def query_category(c: str) -> str | None:
97
97
  elif 56 <= row <= 87:
98
98
  return 'level-2'
99
99
  else:
100
- raise None
100
+ return None
101
101
 
102
102
 
103
103
  def _build_alphabet_by_rows_between(row_start: int, row_end: int) -> list[str]:
@@ -74,7 +74,7 @@ def decode(bs: bytes | bytearray) -> str:
74
74
 
75
75
  def query_coord(c: str) -> tuple[int, int]:
76
76
  if len(c) != 1:
77
- raise KSX1001Exception('must be one character')
77
+ raise KSX1001Exception('Must be one character')
78
78
  try:
79
79
  bs = encode(c)
80
80
  except KSX1001EncodeError as e:
@@ -113,7 +113,7 @@ def query_category(c: str) -> str | None:
113
113
  elif 42 <= row <= 93:
114
114
  return 'hanja'
115
115
  else:
116
- raise None
116
+ return None
117
117
 
118
118
 
119
119
  def _build_alphabet_by_rows_between(row_start: int, row_end: int) -> list[str]:
@@ -91,7 +91,7 @@ def query_category(c: str) -> str | None:
91
91
  elif 0xA1 <= first_byte <= 0xDF:
92
92
  return 'single-byte-half-width-katakana'
93
93
  else:
94
- raise None
94
+ return None
95
95
  else:
96
96
  second_byte = bs[1]
97
97
  if 0x81 <= first_byte <= 0x87 or (first_byte == 0x88 and second_byte <= 0x9E):
@@ -99,7 +99,7 @@ def query_category(c: str) -> str | None:
99
99
  elif (first_byte == 0x88 and second_byte >= 0x9F) or 0x89 <= first_byte <= 0x9F or 0xE0 <= first_byte <= 0xEF:
100
100
  return 'double-byte-kanji'
101
101
  else:
102
- raise None
102
+ return None
103
103
 
104
104
 
105
105
  def _build_alphabet_single_byte(byte_start: int, byte_end: int) -> list[str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: character-encoding-utils
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Some character encoding utils.
5
5
  Author: TakWolf
6
6
  Maintainer: TakWolf