winipedia-utils 0.4.41__py3-none-any.whl → 0.4.43__py3-none-any.whl

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.

Potentially problematic release.


This version of winipedia-utils might be problematic. Click here for more details.

@@ -49,7 +49,7 @@ def nested_structure_is_subset(
49
49
  Each value of a key must be equal to the value of the same key in the superset.
50
50
  If the value is dictionary, the function is called recursively.
51
51
  If the value is list, each item must be in the list of the same key in the superset.
52
- The order in lists matters.
52
+ The order in lists does not matter.
53
53
 
54
54
  Returns:
55
55
  True if subset is a nested subset of superset, False otherwise
@@ -68,6 +68,11 @@ def nested_structure_is_subset(
68
68
 
69
69
  def get_actual(key_or_index: Any) -> Any:
70
70
  """Get actual value from superset."""
71
+ subset_val = subset[key_or_index]
72
+ for superset_val in superset:
73
+ if nested_structure_is_subset(subset_val, superset_val):
74
+ return superset_val
75
+
71
76
  return superset[key_or_index] if key_or_index < len(superset) else None
72
77
  else:
73
78
  return subset == superset
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: winipedia-utils
3
- Version: 0.4.41
3
+ Version: 0.4.43
4
4
  Summary: A package with many utility functions
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -152,6 +152,10 @@ my_project/
152
152
 
153
153
  For each function, class, and method, skeleton tests are created with `NotImplementedError` placeholders for you to implement.
154
154
 
155
+ If you have autosuse fixtures just write and add them to the `tests/base/fixtures` directory. They will be automatically discovered, plugged into conftest and used in all tests according to defined scope.
156
+ The filenames in the fixtures folder are just for organisation purposes for your convenience. You still have to
157
+ apply the pytest.fixture decorator to the fixture function and define the scope. So a session scoped function defined on function.py will still run as a session scoped fixture.
158
+
155
159
  ## Configuration Files
156
160
 
157
161
  Configuration files are managed automatically by the setup system:
@@ -160,6 +164,7 @@ Configuration files are managed automatically by the setup system:
160
164
  - **Empty files** - If you want to disable a config file, make it empty. This signals that the file is unwanted and won't be modified
161
165
  - **Custom additions** - You can add custom configurations as long as the standard configurations remain intact
162
166
  - **Modified standards** - If you modify the standard configurations, they will be restored on the next setup run
167
+ - **Subclasses** - You can create custom config files by subclassing the standard ones. They will be automatically created and managed when you commit or run pytest. winipedia_utils automatically discovers and calls them. This way you can adjust or add some settings. It is however important the parent class stays a subset of the child class according to the description in the function `nested_structure_is_subset` in `winipedia_utils.iterating.iterate`.
163
168
 
164
169
  ## Branch Protection
165
170
 
@@ -28,7 +28,7 @@ winipedia_utils/git/pre_commit/config.py,sha256=UagrtEp_TSb0THjmXZpvtl7agekEVOWn
28
28
  winipedia_utils/git/pre_commit/hooks.py,sha256=jMGSRtesVBB6pCQNSQ-FubCoUql7gXn0xZeKn7x6Wbs,4241
29
29
  winipedia_utils/git/pre_commit/run_hooks.py,sha256=UIz1k3Hx5sB6LcdIJaPNWL-YDZzbkWd7NHCsC41nczQ,1495
30
30
  winipedia_utils/iterating/__init__.py,sha256=rlF9hzxbowq5yOfcXvOKOQdB-EQmfrislQpf659Zeu4,53
31
- winipedia_utils/iterating/iterate.py,sha256=zl1Df3PF9cn5zUGHzDm63-12hu81_mvIJW0Cmfl_ldE,3312
31
+ winipedia_utils/iterating/iterate.py,sha256=k4U6qrnE4zij-GJhI5X0wM3pveSi8wtEsA1i8xQrfG0,3522
32
32
  winipedia_utils/logging/__init__.py,sha256=AMt1LwA_E7hexYjMpGzUempoyDdAF-dowWvq59wC5aM,51
33
33
  winipedia_utils/logging/ansi.py,sha256=7Z-FITaUn5B1ZE0OUVARjNzuMui1V36iu4YTjlD6QfI,101
34
34
  winipedia_utils/logging/config.py,sha256=sdC3GHMkJqlY-WwIsOMeTcy1bihthWV2LbvxLt9dhc4,2895
@@ -88,7 +88,7 @@ winipedia_utils/testing/tests/conftest.py,sha256=BLgUJtLecOwuEsIyJ__0buqovd5AhiG
88
88
  winipedia_utils/text/__init__.py,sha256=j2bwtK6kyeHI6SnoBjpRju0C1W2n2paXBDlNjNtaUxA,48
89
89
  winipedia_utils/text/config.py,sha256=63AyQUNgjYZb5hlBIsmbAsFk38BYeaIo6XuVredkfkk,7578
90
90
  winipedia_utils/text/string.py,sha256=yXmwOab5hXyVQG1NwlWDpy2prj0U7Vb2F5HKLT2Y77Q,3382
91
- winipedia_utils-0.4.41.dist-info/METADATA,sha256=Q8FxnaxU_lPNzEBKjLDGk4Usv6mRScpPGKeay7TcguQ,13611
92
- winipedia_utils-0.4.41.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
93
- winipedia_utils-0.4.41.dist-info/licenses/LICENSE,sha256=o316mE2gGzd__JT69p7S_zlOmKiHh8YjpImCCcWyTvM,1066
94
- winipedia_utils-0.4.41.dist-info/RECORD,,
91
+ winipedia_utils-0.4.43.dist-info/METADATA,sha256=dsxBGDal_FJpJmnAbQXKhs8t4ijlbiupOuEujUKE9T4,14564
92
+ winipedia_utils-0.4.43.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
93
+ winipedia_utils-0.4.43.dist-info/licenses/LICENSE,sha256=o316mE2gGzd__JT69p7S_zlOmKiHh8YjpImCCcWyTvM,1066
94
+ winipedia_utils-0.4.43.dist-info/RECORD,,