apexdevkit 1.8.2__tar.gz → 1.8.3__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 (35) hide show
  1. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/PKG-INFO +1 -1
  2. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/testing/rest.py +15 -15
  3. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/pyproject.toml +1 -1
  4. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/LICENSE +0 -0
  5. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/README.md +0 -0
  6. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/__init__.py +0 -0
  7. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/annotation/__init__.py +0 -0
  8. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/annotation/deprecate.py +0 -0
  9. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/error.py +0 -0
  10. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/fastapi/__init__.py +0 -0
  11. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/fastapi/builder.py +0 -0
  12. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/fastapi/dependable.py +0 -0
  13. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/fastapi/docs.py +0 -0
  14. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/fastapi/resource.py +0 -0
  15. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/fastapi/response.py +0 -0
  16. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/fastapi/router.py +0 -0
  17. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/fastapi/schema.py +0 -0
  18. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/fastapi/service.py +0 -0
  19. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/formatter.py +0 -0
  20. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/http/__init__.py +0 -0
  21. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/http/fake.py +0 -0
  22. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/http/fluent.py +0 -0
  23. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/http/httpx.py +0 -0
  24. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/http/json.py +0 -0
  25. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/http/url.py +0 -0
  26. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/py.typed +0 -0
  27. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/repository/__init__.py +0 -0
  28. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/repository/base.py +0 -0
  29. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/repository/connector.py +0 -0
  30. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/repository/database.py +0 -0
  31. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/repository/in_memory.py +0 -0
  32. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/repository/interface.py +0 -0
  33. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/testing/__init__.py +0 -0
  34. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/testing/database.py +0 -0
  35. {apexdevkit-1.8.2 → apexdevkit-1.8.3}/apexdevkit/testing/fake.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apexdevkit
3
- Version: 1.8.2
3
+ Version: 1.8.3
4
4
  Summary: Apex Development Tools for python.
5
5
  Author: Apex Dev
6
6
  Author-email: dev@apex.ge
@@ -120,21 +120,21 @@ class RestfulName:
120
120
  return HttpUrl(self.plural) + other
121
121
 
122
122
 
123
- def as_plural(singular: str) -> str: # pragma: no cover
124
- if singular.endswith("y"):
125
- return singular[:-1] + "ies"
126
-
127
- if singular.endswith("ch") or singular.endswith("sh") or singular.endswith("ss"):
128
- return singular[:-2] + "es"
129
-
130
- if singular.endswith("s") or singular.endswith("z") or singular.endswith("x"):
131
- return singular[:-1] + "es"
132
-
133
- if singular.endswith("fe"):
134
- return singular[:-2] + "ves"
135
-
136
- if singular.endswith("f"):
137
- return singular[:-1] + "ves"
123
+ def as_plural(singular: str) -> str:
124
+ suffixes = {
125
+ "y": "ies",
126
+ "ch": "ches",
127
+ "sh": "shes",
128
+ "s": "ses",
129
+ "z": "zes",
130
+ "x": "xes",
131
+ "fe": "ves",
132
+ "f": "ves",
133
+ }
134
+
135
+ for singular_suffix, plural_suffix in suffixes.items():
136
+ if singular.endswith(singular_suffix):
137
+ return singular.removesuffix(singular_suffix) + plural_suffix
138
138
 
139
139
  return singular + "s"
140
140
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "apexdevkit"
3
- version = "1.8.2"
3
+ version = "1.8.3"
4
4
  description = "Apex Development Tools for python."
5
5
  authors = ["Apex Dev <dev@apex.ge>"]
6
6
  readme = "README.md"
File without changes
File without changes