orionis 0.438.0__py3-none-any.whl → 0.439.0__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.
Files changed (23) hide show
  1. orionis/container/context/scope.py +1 -1
  2. orionis/metadata/framework.py +1 -1
  3. {orionis-0.438.0.dist-info → orionis-0.439.0.dist-info}/METADATA +1 -1
  4. {orionis-0.438.0.dist-info → orionis-0.439.0.dist-info}/RECORD +23 -23
  5. tests/container/context/test_manager.py +1 -0
  6. tests/container/context/test_scope.py +1 -0
  7. tests/container/core/test_container.py +45 -1
  8. tests/container/core/test_singleton.py +5 -0
  9. tests/container/core/test_thread_safety.py +2 -0
  10. tests/container/validators/test_is_not_subclass.py +0 -1
  11. tests/foundation/config/queue/test_foundation_config_queue_brokers.py +1 -0
  12. tests/foundation/config/startup/test_foundation_config_startup.py +0 -1
  13. tests/services/environment/test_services_environment.py +5 -4
  14. tests/services/introspection/reflection/mock/fake_reflect_instance.py +750 -267
  15. tests/services/introspection/reflection/test_reflection_abstract.py +167 -92
  16. tests/services/introspection/reflection/test_reflection_callable.py +85 -35
  17. tests/services/introspection/reflection/test_reflection_concrete.py +345 -226
  18. tests/services/introspection/reflection/test_reflection_instance.py +627 -273
  19. tests/services/introspection/reflection/test_reflection_module.py +346 -175
  20. {orionis-0.438.0.dist-info → orionis-0.439.0.dist-info}/WHEEL +0 -0
  21. {orionis-0.438.0.dist-info → orionis-0.439.0.dist-info}/licenses/LICENCE +0 -0
  22. {orionis-0.438.0.dist-info → orionis-0.439.0.dist-info}/top_level.txt +0 -0
  23. {orionis-0.438.0.dist-info → orionis-0.439.0.dist-info}/zip-safe +0 -0
@@ -7,171 +7,255 @@ __PRIVATE_CONSTANT = "private constant"
7
7
 
8
8
  def publicSyncFunction(x: int, y: int) -> int:
9
9
  """
10
- A public synchronous function that adds two integers.
11
-
12
- Args:
13
- x (int): The first integer.
14
- y (int): The second integer.
15
-
16
- Returns:
17
- int: The sum of x and y.
10
+ Adds two integers synchronously.
11
+
12
+ Parameters
13
+ ----------
14
+ x : int
15
+ The first integer.
16
+ y : int
17
+ The second integer.
18
+
19
+ Returns
20
+ -------
21
+ int
22
+ The sum of `x` and `y`.
18
23
  """
19
24
  return x + y
20
25
 
21
26
  async def publicAsyncFunction(x: int, y: int) -> int:
22
27
  """
23
- A public asynchronous function that adds two integers.
24
-
25
- Args:
26
- x (int): The first integer.
27
- y (int): The second integer.
28
-
29
- Returns:
30
- int: The sum of x and y.
28
+ Adds two integers asynchronously.
29
+
30
+ Parameters
31
+ ----------
32
+ x : int
33
+ The first integer.
34
+ y : int
35
+ The second integer.
36
+
37
+ Returns
38
+ -------
39
+ int
40
+ The sum of `x` and `y`.
31
41
  """
32
42
  await asyncio.sleep(0.1)
33
43
  return x + y
34
44
 
35
45
  def _protectedSyncFunction(x: int, y: int) -> int:
36
46
  """
37
- A protected synchronous function that adds two integers.
38
-
39
- Args:
40
- x (int): The first integer.
41
- y (int): The second integer.
42
-
43
- Returns:
44
- int: The sum of x and y.
47
+ Adds two integers synchronously (protected function).
48
+
49
+ Parameters
50
+ ----------
51
+ x : int
52
+ The first integer.
53
+ y : int
54
+ The second integer.
55
+
56
+ Returns
57
+ -------
58
+ int
59
+ The sum of `x` and `y`.
45
60
  """
46
61
  return x + y
47
62
 
48
63
  async def _protectedAsyncFunction(x: int, y: int) -> int:
49
64
  """
50
- A protected asynchronous function that adds two integers.
51
-
52
- Args:
53
- x (int): The first integer.
54
- y (int): The second integer.
55
-
56
- Returns:
57
- int: The sum of x and y.
65
+ Adds two integers asynchronously (protected function).
66
+
67
+ Parameters
68
+ ----------
69
+ x : int
70
+ The first integer.
71
+ y : int
72
+ The second integer.
73
+
74
+ Returns
75
+ -------
76
+ int
77
+ The sum of `x` and `y`.
58
78
  """
59
79
  await asyncio.sleep(0.1)
60
80
  return x + y
61
81
 
62
82
  def __privateSyncFunction(x: int, y: int) -> int:
63
83
  """
64
- A private synchronous function that adds two integers.
65
-
66
- Args:
67
- x (int): The first integer.
68
- y (int): The second integer.
69
-
70
- Returns:
71
- int: The sum of x and y.
84
+ Adds two integers synchronously (private function).
85
+
86
+ Parameters
87
+ ----------
88
+ x : int
89
+ The first integer.
90
+ y : int
91
+ The second integer.
92
+
93
+ Returns
94
+ -------
95
+ int
96
+ The sum of `x` and `y`.
72
97
  """
73
98
  return x + y
74
99
 
75
100
  async def __privateAsyncFunction(x: int, y: int) -> int:
76
101
  """
77
- A private asynchronous function that adds two integers.
78
-
79
- Args:
80
- x (int): The first integer.
81
- y (int): The second integer.
82
-
83
- Returns:
84
- int: The sum of x and y.
102
+ Adds two integers asynchronously (private function).
103
+
104
+ Parameters
105
+ ----------
106
+ x : int
107
+ The first integer.
108
+ y : int
109
+ The second integer.
110
+
111
+ Returns
112
+ -------
113
+ int
114
+ The sum of `x` and `y`.
85
115
  """
86
116
  await asyncio.sleep(0.1)
87
117
  return x + y
88
118
 
89
119
  class PublicFakeClass:
90
120
  """
91
- A public class for creating fake or mock classes in tests.
121
+ Public class used as a test double for inspection and mocking purposes.
122
+
123
+ This class acts as a simple parent class for test doubles in inspection-related tests.
124
+
125
+ Attributes
126
+ ----------
127
+ None
92
128
 
93
- This class serves as a simple parent class for test doubles used in inspection-related tests.
129
+ Methods
130
+ -------
131
+ None
94
132
  """
95
133
  pass
96
134
 
97
135
  class _ProtectedFakeClass:
98
136
  """
99
- A protected class for creating fake or mock classes in tests.
137
+ Protected class used as a test double for inspection and mocking purposes.
100
138
 
101
- This class serves as a simple parent class for test doubles used in inspection-related tests.
139
+ This class acts as a simple parent class for test doubles in inspection-related tests.
140
+
141
+ Attributes
142
+ ----------
143
+ None
144
+
145
+ Methods
146
+ -------
147
+ None
102
148
  """
103
149
  pass
104
150
 
105
151
  class __PrivateFakeClass:
106
152
  """
107
- A private class for creating fake or mock classes in tests.
153
+ Private class used as a test double for inspection and mocking purposes.
154
+
155
+ This class acts as a simple parent class for test doubles in inspection-related tests.
156
+
157
+ Attributes
158
+ ----------
159
+ None
108
160
 
109
- This class serves as a simple parent class for test doubles used in inspection-related tests.
161
+ Methods
162
+ -------
163
+ None
110
164
  """
111
165
  pass
112
166
 
113
167
  class BaseFakeClass:
114
168
  """
115
- A base class for creating fake or mock classes in tests.
169
+ Base class for creating fake or mock classes for testing and inspection.
116
170
 
117
- This class serves as a simple parent class for test doubles used in inspection-related tests.
171
+ This class serves as a foundational parent for test doubles used in inspection-related tests.
172
+
173
+ Attributes
174
+ ----------
175
+ None
176
+
177
+ Methods
178
+ -------
179
+ None
118
180
  """
119
181
  pass
120
182
 
121
183
  class FakeClass(BaseFakeClass):
122
184
  """
123
- FakeClass is a test double class designed to simulate a variety of attribute and method visibilities for inspection and testing purposes.
124
- This class provides:
125
- - Public, protected, and private class-level and instance-level attributes.
126
- - Public, protected, and private properties.
127
- - Synchronous and asynchronous instance methods with varying visibilities.
128
- - Synchronous and asynchronous class methods with varying visibilities.
129
- - Synchronous and asynchronous static methods with varying visibilities.
130
- public_attr (int): A public class and instance attribute set to 42.
131
- dynamic_attr: A public attribute initialized to None, can be set dynamically.
132
- _protected_attr (str): A protected class and instance attribute set to "protected".
133
- __private_attr (str): A private class and instance attribute set to "private".
134
- Properties:
135
- computed_public_property (str): Returns "public property".
136
- _computed_property_protected (str): Returns "protected property".
137
- __computed_property_private (str): Returns "private property".
138
- Methods:
139
- instanceSyncMethod(x: int, y: int) -> int:
140
- instanceAsyncMethod(x: int, y: int) -> int:
141
- _protectedsyncMethod(x: int, y: int) -> int:
142
- Protected synchronous addition method.
143
- _protectedAsyncMethod(x: int, y: int) -> int:
144
- Protected asynchronous addition method.
145
- __privateSyncMethod(x: int, y: int) -> int:
146
- Private synchronous addition method.
147
- __privateAsyncMethod(x: int, y: int) -> int:
148
- Private asynchronous addition method.
149
- Class Methods:
150
- classSyncMethod(x: int, y: int) -> int:
151
- classAsyncMethod(x: int, y: int) -> int:
152
- _classMethodProtected(x: int, y: int) -> int:
153
- Protected synchronous class addition method.
154
- _classAsyncMethodProtected(x: int, y: int) -> int:
155
- Protected asynchronous class addition method.
156
- __classMethodPrivate(x: int, y: int) -> int:
157
- Private synchronous class addition method.
158
- __classAsyncMethodPrivate(x: int, y: int) -> int:
159
- Private asynchronous class addition method.
160
- Static Methods:
161
- staticMethod(text: str) -> str:
162
- Synchronously converts the input text to uppercase.
163
- staticAsyncMethod(text: str) -> str:
164
- Asynchronously converts the input text to uppercase.
165
- _staticMethodProtected(text: str) -> str:
166
- Protected synchronous static method to uppercase text.
167
- _staticAsyncMethodProtected(text: str) -> str:
168
- Protected asynchronous static method to uppercase text.
169
- __staticMethodPrivate(text: str) -> str:
170
- Private synchronous static method to uppercase text.
171
- __staticAsyncMethodPrivate(text: str) -> str:
172
- Private asynchronous static method to uppercase text.
173
- Note:
174
- This class is intended for testing and inspection of attribute and method visibility, including Python's name mangling for private members.
185
+ FakeClass is a test double designed to simulate various attribute and method visibilities for inspection and testing.
186
+
187
+ This class provides public, protected, and private class-level and instance-level attributes, as well as properties and methods with different visibilities. It includes synchronous and asynchronous instance, class, and static methods to facilitate comprehensive testing of attribute and method access patterns, including Python's name mangling for private members.
188
+
189
+ Attributes
190
+ ----------
191
+ public_attr : int
192
+ Public class and instance attribute set to 42.
193
+ dynamic_attr
194
+ Public attribute initialized to None, can be set dynamically.
195
+ _protected_attr : str
196
+ Protected class and instance attribute set to "protected".
197
+ __private_attr : str
198
+ Private class and instance attribute set to "private".
199
+ __dd__ : str
200
+ Dunder (double underscore) attribute set to "dunder_value".
201
+
202
+ Properties
203
+ ----------
204
+ computed_public_property : str
205
+ Returns "public property".
206
+ _computed_property_protected : str
207
+ Returns "protected property".
208
+ __computed_property_private : str
209
+ Returns "private property".
210
+
211
+ Methods
212
+ -------
213
+ instanceSyncMethod(x: int, y: int) -> int
214
+ Synchronously adds two integers and returns the result.
215
+ instanceAsyncMethod(x: int, y: int) -> int
216
+ Asynchronously adds two integers and returns the result.
217
+ _protectedsyncMethod(x: int, y: int) -> int
218
+ Protected synchronous addition method.
219
+ _protectedAsyncMethod(x: int, y: int) -> int
220
+ Protected asynchronous addition method.
221
+ __privateSyncMethod(x: int, y: int) -> int
222
+ Private synchronous addition method.
223
+ __privateAsyncMethod(x: int, y: int) -> int
224
+ Private asynchronous addition method.
225
+
226
+ Class Methods
227
+ -------------
228
+ classSyncMethod(x: int, y: int) -> int
229
+ Synchronously adds two integers and returns the result (class method).
230
+ classAsyncMethod(x: int, y: int) -> int
231
+ Asynchronously adds two integers and returns the result (class method).
232
+ _classMethodProtected(x: int, y: int) -> int
233
+ Protected synchronous class addition method.
234
+ _classAsyncMethodProtected(x: int, y: int) -> int
235
+ Protected asynchronous class addition method.
236
+ __classMethodPrivate(x: int, y: int) -> int
237
+ Private synchronous class addition method.
238
+ __classAsyncMethodPrivate(x: int, y: int) -> int
239
+ Private asynchronous class addition method.
240
+
241
+ Static Methods
242
+ --------------
243
+ staticMethod(text: str) -> str
244
+ Synchronously converts the input text to uppercase.
245
+ staticAsyncMethod(text: str) -> str
246
+ Asynchronously converts the input text to uppercase.
247
+ _staticMethodProtected(text: str) -> str
248
+ Protected synchronous static method to convert text to uppercase.
249
+ _staticAsyncMethodProtected(text: str) -> str
250
+ Protected asynchronous static method to convert text to uppercase.
251
+ __staticMethodPrivate(text: str) -> str
252
+ Private synchronous static method to convert text to uppercase.
253
+ __staticAsyncMethodPrivate(text: str) -> str
254
+ Private asynchronous static method to convert text to uppercase.
255
+
256
+ Notes
257
+ -----
258
+ This class is intended for testing and inspection of attribute and method visibility, including Python's name mangling for private members.
175
259
  """
176
260
 
177
261
  # Class-level attribute (Public)
@@ -188,48 +272,62 @@ class FakeClass(BaseFakeClass):
188
272
  @property
189
273
  def computed_public_property(self) -> str:
190
274
  """
191
- Returns the string "public" as a computed property.
275
+ Returns a string indicating this is a public computed property.
192
276
 
193
- Returns:
194
- str: The string "public".
277
+ Returns
278
+ -------
279
+ str
280
+ The string "public property".
195
281
  """
196
282
  return f"public property"
197
283
 
198
284
  @property
199
285
  def _computed_property_protected(self) -> str:
200
286
  """
201
- Returns a string indicating that this is a protected computed property.
287
+ Returns a string indicating this is a protected computed property.
202
288
 
203
- Returns:
204
- str: The string "protected".
289
+ Returns
290
+ -------
291
+ str
292
+ The string "protected property".
205
293
  """
206
- """A computed property."""
294
+ # Protected computed property for testing attribute visibility
207
295
  return f"protected property"
208
296
 
209
297
  @property
210
298
  def __computed_property_private(self) -> str:
211
299
  """
212
- Returns the string "private".
300
+ Returns a string indicating this is a private computed property.
213
301
 
214
- This is a private computed property method, typically used for internal logic or testing purposes.
215
-
216
- Returns:
217
- str: The string "private".
302
+ Returns
303
+ -------
304
+ str
305
+ The string "private property".
218
306
  """
307
+ # Private computed property for internal use or testing
219
308
  return f"private property"
220
309
 
221
310
  def __init__(self) -> None:
222
311
  """
223
- Initializes the instance with various attributes for testing attribute visibility.
224
-
225
- Attributes:
226
- public_attr (int): A public attribute set to 42.
227
- _protected_attr (str): A protected attribute set to "protected".
228
- __private_attr (str): A private attribute set to "private".
229
- dynamic_attr: An attribute initialized to None, can be set dynamically.
230
- __dd__ (str): A dunder (double underscore) attribute set to "dunder_value".
312
+ Initialize a FakeClass instance with attributes of varying visibility.
313
+
314
+ Parameters
315
+ ----------
316
+ None
317
+
318
+ Attributes
319
+ ----------
320
+ public_attr : int
321
+ Public attribute set to 42.
322
+ dynamic_attr
323
+ Public attribute initialized to None, can be set dynamically.
324
+ _protected_attr : str
325
+ Protected attribute set to "protected".
326
+ __private_attr : str
327
+ Private attribute set to "private".
328
+ __dd__ : str
329
+ Dunder (double underscore) attribute set to "dunder_value".
231
330
  """
232
-
233
331
  # Initialize attributes (Publics)
234
332
  self.public_attr = 42
235
333
  self.dynamic_attr = None
@@ -243,81 +341,111 @@ class FakeClass(BaseFakeClass):
243
341
 
244
342
  def instanceSyncMethod(self, x: int, y: int) -> int:
245
343
  """
246
- Synchronously adds two integers and returns the result.
247
-
248
- Args:
249
- x (int): The first integer to add.
250
- y (int): The second integer to add.
251
-
252
- Returns:
253
- int: The sum of x and y.
344
+ Synchronously add two integers and return the result.
345
+
346
+ Parameters
347
+ ----------
348
+ x : int
349
+ The first integer to add.
350
+ y : int
351
+ The second integer to add.
352
+
353
+ Returns
354
+ -------
355
+ int
356
+ The sum of `x` and `y`.
254
357
  """
255
358
  return x + y
256
359
 
257
360
  async def instanceAsyncMethod(self, x: int, y: int) -> int:
258
361
  """
259
- Asynchronously adds two integers and returns the result.
260
-
261
- Args:
262
- x (int): The first integer to add.
263
- y (int): The second integer to add.
264
-
265
- Returns:
266
- int: The sum of x and y.
362
+ Asynchronously add two integers and return the result.
363
+
364
+ Parameters
365
+ ----------
366
+ x : int
367
+ First integer to add.
368
+ y : int
369
+ Second integer to add.
370
+
371
+ Returns
372
+ -------
373
+ int
374
+ The sum of `x` and `y`.
267
375
  """
268
376
  await asyncio.sleep(0.1)
269
377
  return x + y
270
378
 
271
379
  def _protectedsyncMethod(self, x: int, y: int) -> int:
272
380
  """
273
- Synchronously adds two integers and returns the result (protected method).
274
-
275
- Args:
276
- x (int): The first integer to add.
277
- y (int): The second integer to add.
278
-
279
- Returns:
280
- int: The sum of x and y.
381
+ Synchronously add two integers and return the result (protected method).
382
+
383
+ Parameters
384
+ ----------
385
+ x : int
386
+ First integer to add.
387
+ y : int
388
+ Second integer to add.
389
+
390
+ Returns
391
+ -------
392
+ int
393
+ The sum of `x` and `y`.
281
394
  """
282
395
  return x + y
283
396
 
284
397
  async def _protectedAsyncMethod(self, x: int, y: int) -> int:
285
398
  """
286
- Asynchronously adds two integers and returns the result (protected method).
287
-
288
- Args:
289
- x (int): The first integer to add.
290
- y (int): The second integer to add.
291
-
292
- Returns:
293
- int: The sum of x and y.
399
+ Asynchronously add two integers and return the result (protected method).
400
+
401
+ Parameters
402
+ ----------
403
+ x : int
404
+ First integer to add.
405
+ y : int
406
+ Second integer to add.
407
+
408
+ Returns
409
+ -------
410
+ int
411
+ The sum of `x` and `y`.
294
412
  """
295
413
  await asyncio.sleep(0.1)
296
414
  return x + y
297
415
 
298
416
  def __privateSyncMethod(self, x: int, y: int) -> int:
299
417
  """
300
- Synchronously adds two integers and returns the result (private method).
301
-
302
- Args:
303
- x (int): The first integer to add.
304
- y (int): The second integer to add.
305
-
306
- Returns:
307
- int: The sum of x and y.
418
+ Synchronously add two integers and return the result (private method).
419
+
420
+ Parameters
421
+ ----------
422
+ x : int
423
+ First integer to add.
424
+ y : int
425
+ Second integer to add.
426
+
427
+ Returns
428
+ -------
429
+ int
430
+ The sum of `x` and `y`.
308
431
  """
309
432
  return x + y
310
433
 
311
434
  async def __privateAsyncMethod(self, x: int, y: int) -> int:
312
435
  """
313
- Asynchronously adds two integers and returns the result (private method).
314
-
315
- Args:
316
- x (int): The first integer to add.
317
- y (int): The second integer to add.
318
-
319
- Returns:
320
- int: The sum of x and y.
436
+ Asynchronously add two integers and return the result (private method).
437
+
438
+ Parameters
439
+ ----------
440
+ x : int
441
+ First integer to add.
442
+ y : int
443
+ Second integer to add.
444
+
445
+ Returns
446
+ -------
447
+ int
448
+ The sum of `x` and `y`.
321
449
  """
322
450
  await asyncio.sleep(0.1)
323
451
  return x + y
@@ -325,28 +453,38 @@ class FakeClass(BaseFakeClass):
325
453
  @classmethod
326
454
  def classSyncMethod(cls, x: int, y: int) -> int:
327
455
  """
328
- Synchronously adds two integers and returns the result (class method).
329
-
330
- Args:
331
- x (int): The first integer to add.
332
- y (int): The second integer to add.
456
+ Synchronously adds two integers and returns the result.
333
457
 
334
- Returns:
335
- int: The sum of x and y.
458
+ Parameters
459
+ ----------
460
+ x : int
461
+ The first integer to add.
462
+ y : int
463
+ The second integer to add.
464
+
465
+ Returns
466
+ -------
467
+ int
468
+ The sum of `x` and `y`.
336
469
  """
337
470
  return x + y
338
471
 
339
472
  @classmethod
340
473
  async def classAsyncMethod(cls, x: int, y: int) -> int:
341
474
  """
342
- Asynchronously adds two integers and returns the result (class method).
343
-
344
- Args:
345
- x (int): The first integer to add.
346
- y (int): The second integer to add.
475
+ Asynchronously adds two integers and returns the result.
347
476
 
348
- Returns:
349
- int: The sum of x and y.
477
+ Parameters
478
+ ----------
479
+ x : int
480
+ The first integer to add.
481
+ y : int
482
+ The second integer to add.
483
+
484
+ Returns
485
+ -------
486
+ int
487
+ The sum of `x` and `y`.
350
488
  """
351
489
  await asyncio.sleep(0.1)
352
490
  return x + y
@@ -356,26 +494,36 @@ class FakeClass(BaseFakeClass):
356
494
  """
357
495
  Synchronously adds two integers and returns the result (protected class method).
358
496
 
359
- Args:
360
- x (int): The first integer to add.
361
- y (int): The second integer to add.
362
-
363
- Returns:
364
- int: The sum of x and y.
497
+ Parameters
498
+ ----------
499
+ x : int
500
+ The first integer to add.
501
+ y : int
502
+ The second integer to add.
503
+
504
+ Returns
505
+ -------
506
+ int
507
+ The sum of `x` and `y`.
365
508
  """
366
509
  return x + y
367
510
 
368
511
  @classmethod
369
512
  async def _classAsyncMethodProtected(cls, x: int, y: int) -> int:
370
513
  """
371
- Asynchronously adds two integers and returns the result (protected class method).
372
-
373
- Args:
374
- x (int): The first integer to add.
375
- y (int): The second integer to add.
376
-
377
- Returns:
378
- int: The sum of x and y.
514
+ Asynchronously add two integers and return the result (protected class method).
515
+
516
+ Parameters
517
+ ----------
518
+ x : int
519
+ The first integer to add.
520
+ y : int
521
+ The second integer to add.
522
+
523
+ Returns
524
+ -------
525
+ int
526
+ The sum of `x` and `y`.
379
527
  """
380
528
  await asyncio.sleep(0.1)
381
529
  return x + y
@@ -383,28 +531,38 @@ class FakeClass(BaseFakeClass):
383
531
  @classmethod
384
532
  def __classMethodPrivate(cls, x: int, y: int) -> int:
385
533
  """
386
- Synchronously adds two integers and returns the result (private class method).
387
-
388
- Args:
389
- x (int): The first integer to add.
390
- y (int): The second integer to add.
391
-
392
- Returns:
393
- int: The sum of x and y.
534
+ Synchronously add two integers and return the result (private class method).
535
+
536
+ Parameters
537
+ ----------
538
+ x : int
539
+ The first integer to add.
540
+ y : int
541
+ The second integer to add.
542
+
543
+ Returns
544
+ -------
545
+ int
546
+ The sum of `x` and `y`.
394
547
  """
395
548
  return x + y
396
549
 
397
550
  @classmethod
398
551
  async def __classAsyncMethodPrivate(cls, x: int, y: int) -> int:
399
552
  """
400
- Asynchronously adds two integers and returns the result (private class method).
401
-
402
- Args:
403
- x (int): The first integer to add.
404
- y (int): The second integer to add.
405
-
406
- Returns:
407
- int: The sum of x and y.
553
+ Asynchronously add two integers and return the result (private class method).
554
+
555
+ Parameters
556
+ ----------
557
+ x : int
558
+ First integer to add.
559
+ y : int
560
+ Second integer to add.
561
+
562
+ Returns
563
+ -------
564
+ int
565
+ The sum of `x` and `y`.
408
566
  """
409
567
  await asyncio.sleep(0.1)
410
568
  return x + y
@@ -412,26 +570,34 @@ class FakeClass(BaseFakeClass):
412
570
  @staticmethod
413
571
  def staticMethod(text: str) -> str:
414
572
  """
415
- Synchronously converts the input text to uppercase (static method).
573
+ Convert the input string to uppercase synchronously.
416
574
 
417
- Args:
418
- text (str): The input string.
575
+ Parameters
576
+ ----------
577
+ text : str
578
+ Input string to convert.
419
579
 
420
- Returns:
421
- str: The uppercase version of the input string.
580
+ Returns
581
+ -------
582
+ str
583
+ Uppercase version of the input string.
422
584
  """
423
585
  return text.upper()
424
586
 
425
587
  @staticmethod
426
588
  async def staticAsyncMethod(text: str) -> str:
427
589
  """
428
- Asynchronously converts the input text to uppercase (static method).
590
+ Convert the input string to uppercase asynchronously.
429
591
 
430
- Args:
431
- text (str): The input string.
592
+ Parameters
593
+ ----------
594
+ text : str
595
+ Input string to convert.
432
596
 
433
- Returns:
434
- str: The uppercase version of the input string.
597
+ Returns
598
+ -------
599
+ str
600
+ Uppercase version of the input string.
435
601
  """
436
602
  await asyncio.sleep(0.1)
437
603
  return text.upper()
@@ -439,26 +605,34 @@ class FakeClass(BaseFakeClass):
439
605
  @staticmethod
440
606
  def _staticMethodProtected(text: str) -> str:
441
607
  """
442
- Synchronously converts the input text to uppercase (protected static method).
608
+ Converts the input string to uppercase (protected static method).
443
609
 
444
- Args:
445
- text (str): The input string.
610
+ Parameters
611
+ ----------
612
+ text : str
613
+ The input string to convert.
446
614
 
447
- Returns:
448
- str: The uppercase version of the input string.
615
+ Returns
616
+ -------
617
+ str
618
+ The uppercase version of the input string.
449
619
  """
450
620
  return text.upper()
451
621
 
452
622
  @staticmethod
453
623
  async def _staticAsyncMethodProtected(text: str) -> str:
454
624
  """
455
- Asynchronously converts the input text to uppercase (protected static method).
625
+ Asynchronously converts the input string to uppercase (protected static method).
456
626
 
457
- Args:
458
- text (str): The input string.
627
+ Parameters
628
+ ----------
629
+ text : str
630
+ The input string to convert.
459
631
 
460
- Returns:
461
- str: The uppercase version of the input string.
632
+ Returns
633
+ -------
634
+ str
635
+ The uppercase version of the input string.
462
636
  """
463
637
  await asyncio.sleep(0.1)
464
638
  return text.upper()
@@ -466,38 +640,67 @@ class FakeClass(BaseFakeClass):
466
640
  @staticmethod
467
641
  def __staticMethodPrivate(text: str) -> str:
468
642
  """
469
- Synchronously converts the input text to uppercase (private static method).
643
+ Converts the input string to uppercase (private static method).
470
644
 
471
- Args:
472
- text (str): The input string.
645
+ Parameters
646
+ ----------
647
+ text : str
648
+ The input string to convert.
473
649
 
474
- Returns:
475
- str: The uppercase version of the input string.
650
+ Returns
651
+ -------
652
+ str
653
+ The uppercase version of the input string.
476
654
  """
477
655
  return text.upper()
478
656
 
479
657
  @staticmethod
480
658
  async def __staticAsyncMethodPrivate(text: str) -> str:
481
659
  """
482
- Asynchronously converts the input text to uppercase (private static method).
660
+ Asynchronously converts the input string to uppercase (private static method).
661
+
662
+ Parameters
663
+ ----------
664
+ text : str
665
+ The input string to be converted to uppercase.
483
666
 
484
- Args:
485
- text (str): The input string.
667
+ Returns
668
+ -------
669
+ str
670
+ The uppercase version of the input string.
486
671
 
487
- Returns:
488
- str: The uppercase version of the input string.
672
+ Notes
673
+ -----
674
+ This is a private static asynchronous method intended for internal use.
489
675
  """
490
676
  await asyncio.sleep(0.1)
491
677
  return text.upper()
492
678
 
493
679
  class AbstractFakeClass(ABC):
494
-
495
680
  """
496
- AbstractFakeClass es una clase abstracta basada en FakeClass, diseñada para simular atributos y métodos de diferentes niveles de visibilidad.
497
- Define métodos y propiedades abstractas para ser implementadas por subclases concretas.
681
+ Abstract base class that simulates attributes and methods with various visibility levels for testing and inspection.
682
+
683
+ This class defines abstract properties and methods, including public, protected, and private members, to be implemented by concrete subclasses. It is designed to facilitate comprehensive testing of attribute and method access patterns, including Python's name mangling for private members.
684
+
685
+ Attributes
686
+ ----------
687
+ public_attr : int
688
+ Public class and instance attribute set to 42.
689
+ dynamic_attr
690
+ Public attribute initialized to None, can be set dynamically.
691
+ _protected_attr : str
692
+ Protected class and instance attribute set to "protected".
693
+ __private_attr : str
694
+ Private class and instance attribute set to "private".
695
+ __dd__ : str
696
+ Dunder (double underscore) attribute set to "dunder_value".
697
+
698
+ Notes
699
+ -----
700
+ All properties and methods are abstract and must be implemented by subclasses.
498
701
  """
499
702
 
500
- # Atributos de clase
703
+ # Class-level attributes
501
704
  public_attr: int = 42
502
705
  dynamic_attr = None
503
706
  _protected_attr: str = "protected"
@@ -508,10 +711,12 @@ class AbstractFakeClass(ABC):
508
711
  @abstractmethod
509
712
  def computed_public_property(self) -> str:
510
713
  """
511
- Computes and returns the value of a public property.
714
+ Abstract property for a computed public property.
512
715
 
513
- Returns:
514
- str: The computed value of the public property.
716
+ Returns
717
+ -------
718
+ str
719
+ The computed value of the public property.
515
720
  """
516
721
  pass
517
722
 
@@ -519,10 +724,12 @@ class AbstractFakeClass(ABC):
519
724
  @abstractmethod
520
725
  def _computed_property_protected(self) -> str:
521
726
  """
522
- A protected method intended to compute and return a string property.
727
+ Abstract property for a computed protected property.
523
728
 
524
- Returns:
525
- str: The computed property as a string.
729
+ Returns
730
+ -------
731
+ str
732
+ The computed value of the protected property.
526
733
  """
527
734
  pass
528
735
 
@@ -530,103 +737,379 @@ class AbstractFakeClass(ABC):
530
737
  @abstractmethod
531
738
  def __computed_property_private(self) -> str:
532
739
  """
533
- A private computed property method.
740
+ Abstract property for a computed private property.
534
741
 
535
- Returns:
536
- str: The computed string value.
742
+ Returns
743
+ -------
744
+ str
745
+ The computed value of the private property.
537
746
  """
538
747
  pass
539
748
 
540
749
  def __init__(self) -> None:
750
+ """
751
+ Initialize an AbstractFakeClass instance with attributes of varying visibility.
752
+
753
+ Attributes
754
+ ----------
755
+ public_attr : int
756
+ Public attribute set to 42.
757
+ dynamic_attr
758
+ Public attribute initialized to None, can be set dynamically.
759
+ _protected_attr : str
760
+ Protected attribute set to "protected".
761
+ __private_attr : str
762
+ Private attribute set to "private".
763
+ __dd__ : str
764
+ Dunder (double underscore) attribute set to "dunder_value".
765
+ """
541
766
  self.public_attr = 42
542
767
  self.dynamic_attr = None
543
768
  self._protected_attr = "protected"
544
769
  self.__private_attr = "private"
545
770
  self.__dd__ = "dunder_value"
546
771
 
547
- # Métodos de instancia
772
+ # Instance methods
548
773
  @abstractmethod
549
774
  def instanceSyncMethod(self, x: int, y: int) -> int:
775
+ """
776
+ Abstract synchronous instance method to add two integers.
777
+
778
+ Parameters
779
+ ----------
780
+ x : int
781
+ First integer.
782
+ y : int
783
+ Second integer.
784
+
785
+ Returns
786
+ -------
787
+ int
788
+ The sum of `x` and `y`.
789
+ """
550
790
  pass
551
791
 
552
792
  @abstractmethod
553
793
  async def instanceAsyncMethod(self, x: int, y: int) -> int:
794
+ """
795
+ Abstract asynchronous instance method to add two integers.
796
+
797
+ Parameters
798
+ ----------
799
+ x : int
800
+ First integer.
801
+ y : int
802
+ Second integer.
803
+
804
+ Returns
805
+ -------
806
+ int
807
+ The sum of `x` and `y`.
808
+ """
554
809
  pass
555
810
 
556
811
  @abstractmethod
557
812
  def _protectedsyncMethod(self, x: int, y: int) -> int:
813
+ """
814
+ Abstract protected synchronous instance method to add two integers.
815
+
816
+ Parameters
817
+ ----------
818
+ x : int
819
+ First integer.
820
+ y : int
821
+ Second integer.
822
+
823
+ Returns
824
+ -------
825
+ int
826
+ The sum of `x` and `y`.
827
+ """
558
828
  pass
559
829
 
560
830
  @abstractmethod
561
831
  async def _protectedAsyncMethod(self, x: int, y: int) -> int:
832
+ """
833
+ Abstract protected asynchronous instance method to add two integers.
834
+
835
+ Parameters
836
+ ----------
837
+ x : int
838
+ First integer.
839
+ y : int
840
+ Second integer.
841
+
842
+ Returns
843
+ -------
844
+ int
845
+ The sum of `x` and `y`.
846
+ """
562
847
  pass
563
848
 
564
849
  @abstractmethod
565
850
  def __privateSyncMethod(self, x: int, y: int) -> int:
851
+ """
852
+ Abstract private synchronous instance method to add two integers.
853
+
854
+ Parameters
855
+ ----------
856
+ x : int
857
+ First integer.
858
+ y : int
859
+ Second integer.
860
+
861
+ Returns
862
+ -------
863
+ int
864
+ The sum of `x` and `y`.
865
+ """
566
866
  pass
567
867
 
568
868
  @abstractmethod
569
869
  async def __privateAsyncMethod(self, x: int, y: int) -> int:
870
+ """
871
+ Abstract private asynchronous instance method to add two integers.
872
+
873
+ Parameters
874
+ ----------
875
+ x : int
876
+ First integer.
877
+ y : int
878
+ Second integer.
879
+
880
+ Returns
881
+ -------
882
+ int
883
+ The sum of `x` and `y`.
884
+ """
570
885
  pass
571
886
 
572
- # Métodos de clase
887
+ # Class methods
573
888
  @classmethod
574
889
  @abstractmethod
575
890
  def classSyncMethod(cls, x: int, y: int) -> int:
891
+ """
892
+ Abstract synchronous class method to add two integers.
893
+
894
+ Parameters
895
+ ----------
896
+ x : int
897
+ First integer.
898
+ y : int
899
+ Second integer.
900
+
901
+ Returns
902
+ -------
903
+ int
904
+ The sum of `x` and `y`.
905
+ """
576
906
  pass
577
907
 
578
908
  @classmethod
579
909
  @abstractmethod
580
910
  async def classAsyncMethod(cls, x: int, y: int) -> int:
911
+ """
912
+ Abstract asynchronous class method to add two integers.
913
+
914
+ Parameters
915
+ ----------
916
+ x : int
917
+ First integer.
918
+ y : int
919
+ Second integer.
920
+
921
+ Returns
922
+ -------
923
+ int
924
+ The sum of `x` and `y`.
925
+ """
581
926
  pass
582
927
 
583
928
  @classmethod
584
929
  @abstractmethod
585
930
  def _classMethodProtected(cls, x: int, y: int) -> int:
931
+ """
932
+ Abstract protected synchronous class method to add two integers.
933
+
934
+ Parameters
935
+ ----------
936
+ x : int
937
+ First integer.
938
+ y : int
939
+ Second integer.
940
+
941
+ Returns
942
+ -------
943
+ int
944
+ The sum of `x` and `y`.
945
+ """
586
946
  pass
587
947
 
588
948
  @classmethod
589
949
  @abstractmethod
590
950
  async def _classAsyncMethodProtected(cls, x: int, y: int) -> int:
951
+ """
952
+ Abstract protected asynchronous class method to add two integers.
953
+
954
+ Parameters
955
+ ----------
956
+ x : int
957
+ First integer.
958
+ y : int
959
+ Second integer.
960
+
961
+ Returns
962
+ -------
963
+ int
964
+ The sum of `x` and `y`.
965
+ """
591
966
  pass
592
967
 
593
968
  @classmethod
594
969
  @abstractmethod
595
970
  def __classMethodPrivate(cls, x: int, y: int) -> int:
971
+ """
972
+ Abstract private synchronous class method to add two integers.
973
+
974
+ Parameters
975
+ ----------
976
+ x : int
977
+ First integer.
978
+ y : int
979
+ Second integer.
980
+
981
+ Returns
982
+ -------
983
+ int
984
+ The sum of `x` and `y`.
985
+ """
596
986
  pass
597
987
 
598
988
  @classmethod
599
989
  @abstractmethod
600
990
  async def __classAsyncMethodPrivate(cls, x: int, y: int) -> int:
991
+ """
992
+ Abstract private asynchronous class method to add two integers.
993
+
994
+ Parameters
995
+ ----------
996
+ x : int
997
+ First integer.
998
+ y : int
999
+ Second integer.
1000
+
1001
+ Returns
1002
+ -------
1003
+ int
1004
+ The sum of `x` and `y`.
1005
+ """
601
1006
  pass
602
1007
 
603
- # Métodos estáticos
1008
+ # Static methods
604
1009
  @staticmethod
605
1010
  @abstractmethod
606
1011
  def staticMethod(text: str) -> str:
1012
+ """
1013
+ Abstract synchronous static method to convert a string to uppercase.
1014
+
1015
+ Parameters
1016
+ ----------
1017
+ text : str
1018
+ Input string.
1019
+
1020
+ Returns
1021
+ -------
1022
+ str
1023
+ Uppercase version of the input string.
1024
+ """
607
1025
  pass
608
1026
 
609
1027
  @staticmethod
610
1028
  @abstractmethod
611
1029
  async def staticAsyncMethod(text: str) -> str:
1030
+ """
1031
+ Abstract asynchronous static method to convert a string to uppercase.
1032
+
1033
+ Parameters
1034
+ ----------
1035
+ text : str
1036
+ Input string.
1037
+
1038
+ Returns
1039
+ -------
1040
+ str
1041
+ Uppercase version of the input string.
1042
+ """
612
1043
  pass
613
1044
 
614
1045
  @staticmethod
615
1046
  @abstractmethod
616
1047
  def _staticMethodProtected(text: str) -> str:
1048
+ """
1049
+ Abstract protected synchronous static method to convert a string to uppercase.
1050
+
1051
+ Parameters
1052
+ ----------
1053
+ text : str
1054
+ Input string.
1055
+
1056
+ Returns
1057
+ -------
1058
+ str
1059
+ Uppercase version of the input string.
1060
+ """
617
1061
  pass
618
1062
 
619
1063
  @staticmethod
620
1064
  @abstractmethod
621
1065
  async def _staticAsyncMethodProtected(text: str) -> str:
1066
+ """
1067
+ Abstract protected asynchronous static method to convert a string to uppercase.
1068
+
1069
+ Parameters
1070
+ ----------
1071
+ text : str
1072
+ Input string.
1073
+
1074
+ Returns
1075
+ -------
1076
+ str
1077
+ Uppercase version of the input string.
1078
+ """
622
1079
  pass
623
1080
 
624
1081
  @staticmethod
625
1082
  @abstractmethod
626
1083
  def __staticMethodPrivate(text: str) -> str:
1084
+ """
1085
+ Abstract private synchronous static method to convert a string to uppercase.
1086
+
1087
+ Parameters
1088
+ ----------
1089
+ text : str
1090
+ Input string.
1091
+
1092
+ Returns
1093
+ -------
1094
+ str
1095
+ Uppercase version of the input string.
1096
+ """
627
1097
  pass
628
1098
 
629
1099
  @staticmethod
630
1100
  @abstractmethod
631
1101
  async def __staticAsyncMethodPrivate(text: str) -> str:
1102
+ """
1103
+ Abstract private asynchronous static method to convert a string to uppercase.
1104
+
1105
+ Parameters
1106
+ ----------
1107
+ text : str
1108
+ Input string.
1109
+
1110
+ Returns
1111
+ -------
1112
+ str
1113
+ Uppercase version of the input string.
1114
+ """
632
1115
  pass