dextercipher 0.1.0__tar.gz → 0.1.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dextercipher
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: A simple text cipher
5
5
  Requires-Python: >=3.8
6
6
  Description-Content-Type: text/markdown
@@ -5,6 +5,10 @@ def cipher(word: object) -> str:
5
5
  """Reverse the characters in each half of the input text."""
6
6
  text = str(word)
7
7
  middle = len(text) // 2
8
- first_half = text[:middle]
9
- second_half = text[middle:] if len(text) % 2 == 0 else text[middle + 1 :]
8
+ if len(text) % 2 == 0:
9
+ first_half = text[:middle]
10
+ second_half = text[middle:]
11
+ else:
12
+ first_half = text[:middle + 1]
13
+ second_half = text[middle:]
10
14
  return first_half[::-1] + second_half[::-1]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dextercipher
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: A simple text cipher
5
5
  Requires-Python: >=3.8
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dextercipher"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  description = "A simple text cipher"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
File without changes
File without changes