orionis 0.437.0__py3-none-any.whl → 0.438.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.
- orionis/metadata/framework.py +1 -1
- {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/METADATA +1 -1
- {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/RECORD +25 -24
- tests/container/core/__init__.py +0 -0
- tests/container/mocks/mock_complex_classes.py +502 -192
- tests/container/mocks/mock_simple_classes.py +72 -6
- tests/container/validators/test_is_valid_alias.py +1 -1
- tests/foundation/config/database/test_foundation_config_database.py +54 -28
- tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +40 -22
- tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +75 -48
- tests/foundation/config/logging/test_foundation_config_logging_channels.py +49 -37
- tests/foundation/config/logging/test_foundation_config_logging_monthly.py +80 -42
- tests/foundation/config/logging/test_foundation_config_logging_stack.py +46 -22
- tests/foundation/config/root/test_foundation_config_root_paths.py +37 -44
- tests/foundation/config/session/test_foundation_config_session.py +65 -20
- tests/foundation/config/startup/test_foundation_config_startup.py +37 -33
- tests/services/introspection/dependencies/test_reflect_dependencies.py +77 -25
- tests/services/introspection/reflection/test_reflection_abstract.py +403 -47
- {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/WHEEL +0 -0
- {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/top_level.txt +0 -0
- {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/zip-safe +0 -0
- /tests/container/{test_container.py → core/test_container.py} +0 -0
- /tests/container/{test_singleton.py → core/test_singleton.py} +0 -0
- /tests/container/{test_thread_safety.py → core/test_thread_safety.py} +0 -0
|
@@ -1,16 +1,51 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
import asyncio
|
|
3
|
-
|
|
4
3
|
from tests.container.mocks.mock_simple_classes import ICar
|
|
5
4
|
|
|
6
5
|
def ejemplo(x:int = 3, y:int = 2):
|
|
6
|
+
"""
|
|
7
|
+
Add two integers together.
|
|
8
|
+
|
|
9
|
+
Parameters
|
|
10
|
+
----------
|
|
11
|
+
x : int, default 3
|
|
12
|
+
First integer operand.
|
|
13
|
+
y : int, default 2
|
|
14
|
+
Second integer operand.
|
|
15
|
+
|
|
16
|
+
Returns
|
|
17
|
+
-------
|
|
18
|
+
int
|
|
19
|
+
Sum of x and y.
|
|
20
|
+
"""
|
|
7
21
|
return x + y
|
|
8
22
|
|
|
9
23
|
class AbstractFakeClass(ABC):
|
|
10
|
-
|
|
11
24
|
"""
|
|
12
|
-
|
|
13
|
-
|
|
25
|
+
Abstract base class for testing attribute and method visibility patterns.
|
|
26
|
+
|
|
27
|
+
This class defines abstract methods and properties with different visibility
|
|
28
|
+
levels (public, protected, private) for testing purposes. It includes
|
|
29
|
+
synchronous and asynchronous methods as instance, class, and static methods.
|
|
30
|
+
|
|
31
|
+
Attributes
|
|
32
|
+
----------
|
|
33
|
+
public_attr : int
|
|
34
|
+
Public class attribute with default value 42.
|
|
35
|
+
dynamic_attr : Any
|
|
36
|
+
Dynamic attribute that can be set at runtime, initially None.
|
|
37
|
+
_protected_attr : str
|
|
38
|
+
Protected class attribute with default value "protected".
|
|
39
|
+
__private_attr : str
|
|
40
|
+
Private class attribute with default value "private".
|
|
41
|
+
__dd__ : str
|
|
42
|
+
Dunder attribute with default value "dunder_value".
|
|
43
|
+
|
|
44
|
+
Notes
|
|
45
|
+
-----
|
|
46
|
+
All methods are abstract and must be implemented by concrete subclasses.
|
|
47
|
+
This class serves as a template for testing different method and property
|
|
48
|
+
visibility patterns in Python.
|
|
14
49
|
"""
|
|
15
50
|
|
|
16
51
|
# Atributos de clase
|
|
@@ -24,10 +59,12 @@ class AbstractFakeClass(ABC):
|
|
|
24
59
|
@abstractmethod
|
|
25
60
|
def computed_public_property(self) -> str:
|
|
26
61
|
"""
|
|
27
|
-
|
|
62
|
+
Abstract property that computes and returns a public property value.
|
|
28
63
|
|
|
29
|
-
Returns
|
|
30
|
-
|
|
64
|
+
Returns
|
|
65
|
+
-------
|
|
66
|
+
str
|
|
67
|
+
The computed value of the public property.
|
|
31
68
|
"""
|
|
32
69
|
pass
|
|
33
70
|
|
|
@@ -35,10 +72,12 @@ class AbstractFakeClass(ABC):
|
|
|
35
72
|
@abstractmethod
|
|
36
73
|
def _computed_property_protected(self) -> str:
|
|
37
74
|
"""
|
|
38
|
-
|
|
75
|
+
Abstract protected property that computes and returns a string value.
|
|
39
76
|
|
|
40
|
-
Returns
|
|
41
|
-
|
|
77
|
+
Returns
|
|
78
|
+
-------
|
|
79
|
+
str
|
|
80
|
+
The computed property as a string.
|
|
42
81
|
"""
|
|
43
82
|
pass
|
|
44
83
|
|
|
@@ -52,116 +91,262 @@ class AbstractFakeClass(ABC):
|
|
|
52
91
|
# Métodos de instancia
|
|
53
92
|
@abstractmethod
|
|
54
93
|
def instanceSyncMethod(self, x: int, y: int) -> int:
|
|
94
|
+
"""
|
|
95
|
+
Abstract synchronous instance method for integer operations.
|
|
96
|
+
|
|
97
|
+
Parameters
|
|
98
|
+
----------
|
|
99
|
+
x : int
|
|
100
|
+
First integer operand.
|
|
101
|
+
y : int
|
|
102
|
+
Second integer operand.
|
|
103
|
+
|
|
104
|
+
Returns
|
|
105
|
+
-------
|
|
106
|
+
int
|
|
107
|
+
Result of the operation.
|
|
108
|
+
"""
|
|
55
109
|
pass
|
|
56
110
|
|
|
57
111
|
@abstractmethod
|
|
58
112
|
async def instanceAsyncMethod(self, x: int, y: int) -> int:
|
|
113
|
+
"""
|
|
114
|
+
Abstract asynchronous instance method for integer operations.
|
|
115
|
+
|
|
116
|
+
Parameters
|
|
117
|
+
----------
|
|
118
|
+
x : int
|
|
119
|
+
First integer operand.
|
|
120
|
+
y : int
|
|
121
|
+
Second integer operand.
|
|
122
|
+
|
|
123
|
+
Returns
|
|
124
|
+
-------
|
|
125
|
+
int
|
|
126
|
+
Result of the operation.
|
|
127
|
+
"""
|
|
59
128
|
pass
|
|
60
129
|
|
|
61
130
|
@abstractmethod
|
|
62
131
|
def _protectedsyncMethod(self, x: int, y: int) -> int:
|
|
132
|
+
"""
|
|
133
|
+
Abstract protected synchronous instance method for integer operations.
|
|
134
|
+
|
|
135
|
+
Parameters
|
|
136
|
+
----------
|
|
137
|
+
x : int
|
|
138
|
+
First integer operand.
|
|
139
|
+
y : int
|
|
140
|
+
Second integer operand.
|
|
141
|
+
|
|
142
|
+
Returns
|
|
143
|
+
-------
|
|
144
|
+
int
|
|
145
|
+
Result of the operation.
|
|
146
|
+
"""
|
|
63
147
|
pass
|
|
64
148
|
|
|
65
149
|
@abstractmethod
|
|
66
150
|
async def _protectedAsyncMethod(self, x: int, y: int) -> int:
|
|
151
|
+
"""
|
|
152
|
+
Abstract protected asynchronous instance method for integer operations.
|
|
153
|
+
|
|
154
|
+
Parameters
|
|
155
|
+
----------
|
|
156
|
+
x : int
|
|
157
|
+
First integer operand.
|
|
158
|
+
y : int
|
|
159
|
+
Second integer operand.
|
|
160
|
+
|
|
161
|
+
Returns
|
|
162
|
+
-------
|
|
163
|
+
int
|
|
164
|
+
Result of the operation.
|
|
165
|
+
"""
|
|
67
166
|
pass
|
|
68
167
|
|
|
69
168
|
# Métodos de clase
|
|
70
169
|
@classmethod
|
|
71
170
|
@abstractmethod
|
|
72
171
|
def classSyncMethod(cls, x: int, y: int) -> int:
|
|
172
|
+
"""
|
|
173
|
+
Abstract synchronous class method for integer operations.
|
|
174
|
+
|
|
175
|
+
Parameters
|
|
176
|
+
----------
|
|
177
|
+
x : int
|
|
178
|
+
First integer operand.
|
|
179
|
+
y : int
|
|
180
|
+
Second integer operand.
|
|
181
|
+
|
|
182
|
+
Returns
|
|
183
|
+
-------
|
|
184
|
+
int
|
|
185
|
+
Result of the operation.
|
|
186
|
+
"""
|
|
73
187
|
pass
|
|
74
188
|
|
|
75
189
|
@classmethod
|
|
76
190
|
@abstractmethod
|
|
77
191
|
async def classAsyncMethod(cls, x: int, y: int) -> int:
|
|
192
|
+
"""
|
|
193
|
+
Abstract asynchronous class method for integer operations.
|
|
194
|
+
|
|
195
|
+
Parameters
|
|
196
|
+
----------
|
|
197
|
+
x : int
|
|
198
|
+
First integer operand.
|
|
199
|
+
y : int
|
|
200
|
+
Second integer operand.
|
|
201
|
+
|
|
202
|
+
Returns
|
|
203
|
+
-------
|
|
204
|
+
int
|
|
205
|
+
Result of the operation.
|
|
206
|
+
"""
|
|
78
207
|
pass
|
|
79
208
|
|
|
80
209
|
@classmethod
|
|
81
210
|
@abstractmethod
|
|
82
211
|
def _classMethodProtected(cls, x: int, y: int) -> int:
|
|
212
|
+
"""
|
|
213
|
+
Abstract protected synchronous class method for integer operations.
|
|
214
|
+
|
|
215
|
+
Parameters
|
|
216
|
+
----------
|
|
217
|
+
x : int
|
|
218
|
+
First integer operand.
|
|
219
|
+
y : int
|
|
220
|
+
Second integer operand.
|
|
221
|
+
|
|
222
|
+
Returns
|
|
223
|
+
-------
|
|
224
|
+
int
|
|
225
|
+
Result of the operation.
|
|
226
|
+
"""
|
|
83
227
|
pass
|
|
84
228
|
|
|
85
229
|
@classmethod
|
|
86
230
|
@abstractmethod
|
|
87
231
|
async def _classAsyncMethodProtected(cls, x: int, y: int) -> int:
|
|
232
|
+
"""
|
|
233
|
+
Abstract protected asynchronous class method for integer operations.
|
|
234
|
+
|
|
235
|
+
Parameters
|
|
236
|
+
----------
|
|
237
|
+
x : int
|
|
238
|
+
First integer operand.
|
|
239
|
+
y : int
|
|
240
|
+
Second integer operand.
|
|
241
|
+
|
|
242
|
+
Returns
|
|
243
|
+
-------
|
|
244
|
+
int
|
|
245
|
+
Result of the operation.
|
|
246
|
+
"""
|
|
88
247
|
pass
|
|
89
248
|
|
|
90
249
|
# Métodos estáticos
|
|
91
250
|
@staticmethod
|
|
92
251
|
@abstractmethod
|
|
93
252
|
def staticMethod(text: str) -> str:
|
|
253
|
+
"""
|
|
254
|
+
Abstract static method for text processing.
|
|
255
|
+
|
|
256
|
+
Parameters
|
|
257
|
+
----------
|
|
258
|
+
text : str
|
|
259
|
+
Input text string to process.
|
|
260
|
+
|
|
261
|
+
Returns
|
|
262
|
+
-------
|
|
263
|
+
str
|
|
264
|
+
Processed text string.
|
|
265
|
+
"""
|
|
94
266
|
pass
|
|
95
267
|
|
|
96
268
|
@staticmethod
|
|
97
269
|
@abstractmethod
|
|
98
270
|
async def staticAsyncMethod(text: str) -> str:
|
|
271
|
+
"""
|
|
272
|
+
Abstract asynchronous static method for text processing.
|
|
273
|
+
|
|
274
|
+
Parameters
|
|
275
|
+
----------
|
|
276
|
+
text : str
|
|
277
|
+
Input text string to process.
|
|
278
|
+
|
|
279
|
+
Returns
|
|
280
|
+
-------
|
|
281
|
+
str
|
|
282
|
+
Processed text string.
|
|
283
|
+
"""
|
|
99
284
|
pass
|
|
100
285
|
|
|
101
286
|
@staticmethod
|
|
102
287
|
@abstractmethod
|
|
103
288
|
def _staticMethodProtected(text: str) -> str:
|
|
289
|
+
"""
|
|
290
|
+
Abstract protected static method for text processing.
|
|
291
|
+
|
|
292
|
+
Parameters
|
|
293
|
+
----------
|
|
294
|
+
text : str
|
|
295
|
+
Input text string to process.
|
|
296
|
+
|
|
297
|
+
Returns
|
|
298
|
+
-------
|
|
299
|
+
str
|
|
300
|
+
Processed text string.
|
|
301
|
+
"""
|
|
104
302
|
pass
|
|
105
303
|
|
|
106
304
|
@staticmethod
|
|
107
305
|
@abstractmethod
|
|
108
306
|
async def _staticAsyncMethodProtected(text: str) -> str:
|
|
307
|
+
"""
|
|
308
|
+
Abstract protected asynchronous static method for text processing.
|
|
309
|
+
|
|
310
|
+
Parameters
|
|
311
|
+
----------
|
|
312
|
+
text : str
|
|
313
|
+
Input text string to process.
|
|
314
|
+
|
|
315
|
+
Returns
|
|
316
|
+
-------
|
|
317
|
+
str
|
|
318
|
+
Processed text string.
|
|
319
|
+
"""
|
|
109
320
|
pass
|
|
110
321
|
|
|
111
322
|
class FakeClass(AbstractFakeClass):
|
|
112
323
|
"""
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
Class Methods:
|
|
140
|
-
classSyncMethod(x: int, y: int) -> int:
|
|
141
|
-
classAsyncMethod(x: int, y: int) -> int:
|
|
142
|
-
_classMethodProtected(x: int, y: int) -> int:
|
|
143
|
-
Protected synchronous class addition method.
|
|
144
|
-
_classAsyncMethodProtected(x: int, y: int) -> int:
|
|
145
|
-
Protected asynchronous class addition method.
|
|
146
|
-
__classMethodPrivate(x: int, y: int) -> int:
|
|
147
|
-
Private synchronous class addition method.
|
|
148
|
-
__classAsyncMethodPrivate(x: int, y: int) -> int:
|
|
149
|
-
Private asynchronous class addition method.
|
|
150
|
-
Static Methods:
|
|
151
|
-
staticMethod(text: str) -> str:
|
|
152
|
-
Synchronously converts the input text to uppercase.
|
|
153
|
-
staticAsyncMethod(text: str) -> str:
|
|
154
|
-
Asynchronously converts the input text to uppercase.
|
|
155
|
-
_staticMethodProtected(text: str) -> str:
|
|
156
|
-
Protected synchronous static method to uppercase text.
|
|
157
|
-
_staticAsyncMethodProtected(text: str) -> str:
|
|
158
|
-
Protected asynchronous static method to uppercase text.
|
|
159
|
-
__staticMethodPrivate(text: str) -> str:
|
|
160
|
-
Private synchronous static method to uppercase text.
|
|
161
|
-
__staticAsyncMethodPrivate(text: str) -> str:
|
|
162
|
-
Private asynchronous static method to uppercase text.
|
|
163
|
-
Note:
|
|
164
|
-
This class is intended for testing and inspection of attribute and method visibility, including Python's name mangling for private members.
|
|
324
|
+
Concrete implementation of AbstractFakeClass for testing attribute and method visibility.
|
|
325
|
+
|
|
326
|
+
This test double class provides concrete implementations of all abstract methods
|
|
327
|
+
and properties defined in AbstractFakeClass. It demonstrates various visibility
|
|
328
|
+
levels (public, protected, private) for attributes, properties, and methods
|
|
329
|
+
including synchronous and asynchronous variants for instance, class, and static methods.
|
|
330
|
+
|
|
331
|
+
Attributes
|
|
332
|
+
----------
|
|
333
|
+
public_attr : int
|
|
334
|
+
Public attribute accessible from anywhere, default value 42.
|
|
335
|
+
dynamic_attr : Any
|
|
336
|
+
Dynamic attribute that can be set at runtime, initially None.
|
|
337
|
+
_protected_attr : str
|
|
338
|
+
Protected attribute following Python naming convention, default "protected".
|
|
339
|
+
__private_attr : str
|
|
340
|
+
Private attribute using name mangling, default "private".
|
|
341
|
+
__dd__ : str
|
|
342
|
+
Dunder attribute demonstrating double underscore usage, default "dunder_value".
|
|
343
|
+
|
|
344
|
+
Notes
|
|
345
|
+
-----
|
|
346
|
+
This class is intended for testing and inspection of Python's attribute and
|
|
347
|
+
method visibility patterns, including name mangling behavior for private members.
|
|
348
|
+
All methods perform simple operations (addition for numeric methods, uppercase
|
|
349
|
+
conversion for string methods) with optional async delays for testing purposes.
|
|
165
350
|
"""
|
|
166
351
|
|
|
167
352
|
# Class-level attribute (Public)
|
|
@@ -178,48 +363,65 @@ class FakeClass(AbstractFakeClass):
|
|
|
178
363
|
@property
|
|
179
364
|
def computed_public_property(self) -> str:
|
|
180
365
|
"""
|
|
181
|
-
|
|
366
|
+
Compute and return a public property value.
|
|
182
367
|
|
|
183
|
-
Returns
|
|
184
|
-
|
|
368
|
+
Returns
|
|
369
|
+
-------
|
|
370
|
+
str
|
|
371
|
+
The string "public property".
|
|
185
372
|
"""
|
|
186
373
|
return f"public property"
|
|
187
374
|
|
|
188
375
|
@property
|
|
189
376
|
def _computed_property_protected(self) -> str:
|
|
190
377
|
"""
|
|
191
|
-
|
|
378
|
+
Compute and return a protected property value.
|
|
192
379
|
|
|
193
|
-
Returns
|
|
194
|
-
|
|
380
|
+
Returns
|
|
381
|
+
-------
|
|
382
|
+
str
|
|
383
|
+
The string "protected property".
|
|
195
384
|
"""
|
|
196
|
-
|
|
385
|
+
# A computed property.
|
|
197
386
|
return f"protected property"
|
|
198
387
|
|
|
199
388
|
@property
|
|
200
389
|
def __computed_property_private(self) -> str:
|
|
201
390
|
"""
|
|
202
|
-
|
|
391
|
+
Compute and return a private property value.
|
|
203
392
|
|
|
204
|
-
|
|
393
|
+
Returns
|
|
394
|
+
-------
|
|
395
|
+
str
|
|
396
|
+
The string "private property".
|
|
205
397
|
|
|
206
|
-
|
|
207
|
-
|
|
398
|
+
Notes
|
|
399
|
+
-----
|
|
400
|
+
This is a private computed property method using name mangling,
|
|
401
|
+
typically used for internal logic or testing purposes.
|
|
208
402
|
"""
|
|
209
403
|
return f"private property"
|
|
210
404
|
|
|
211
405
|
def __init__(self, carro:ICar, *, edad:int=10, callback:ejemplo) -> None:
|
|
212
406
|
"""
|
|
213
|
-
|
|
407
|
+
Initialize the FakeClass instance with various attributes for testing visibility.
|
|
214
408
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
409
|
+
Parameters
|
|
410
|
+
----------
|
|
411
|
+
carro : ICar
|
|
412
|
+
Car instance dependency.
|
|
413
|
+
edad : int, default 10
|
|
414
|
+
Age parameter (keyword-only).
|
|
415
|
+
callback : callable
|
|
416
|
+
Callback function, typically the ejemplo function.
|
|
222
417
|
|
|
418
|
+
Notes
|
|
419
|
+
-----
|
|
420
|
+
Initializes attributes with different visibility levels:
|
|
421
|
+
- Public attributes: public_attr, dynamic_attr
|
|
422
|
+
- Protected attributes: _protected_attr
|
|
423
|
+
- Private attributes: __private_attr, __dd__
|
|
424
|
+
"""
|
|
223
425
|
# Initialize attributes (Publics)
|
|
224
426
|
self.public_attr = 42
|
|
225
427
|
self.dynamic_attr = None
|
|
@@ -233,250 +435,358 @@ class FakeClass(AbstractFakeClass):
|
|
|
233
435
|
|
|
234
436
|
def instanceSyncMethod(self, x: int, y: int) -> int:
|
|
235
437
|
"""
|
|
236
|
-
Synchronously
|
|
438
|
+
Synchronously add two integers.
|
|
237
439
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
440
|
+
Parameters
|
|
441
|
+
----------
|
|
442
|
+
x : int
|
|
443
|
+
The first integer to add.
|
|
444
|
+
y : int
|
|
445
|
+
The second integer to add.
|
|
241
446
|
|
|
242
|
-
Returns
|
|
243
|
-
|
|
447
|
+
Returns
|
|
448
|
+
-------
|
|
449
|
+
int
|
|
450
|
+
The sum of x and y.
|
|
244
451
|
"""
|
|
245
452
|
return x + y
|
|
246
453
|
|
|
247
454
|
async def instanceAsyncMethod(self, x: int, y: int) -> int:
|
|
248
455
|
"""
|
|
249
|
-
Asynchronously
|
|
456
|
+
Asynchronously add two integers with a brief delay.
|
|
250
457
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
458
|
+
Parameters
|
|
459
|
+
----------
|
|
460
|
+
x : int
|
|
461
|
+
The first integer to add.
|
|
462
|
+
y : int
|
|
463
|
+
The second integer to add.
|
|
254
464
|
|
|
255
|
-
Returns
|
|
256
|
-
|
|
465
|
+
Returns
|
|
466
|
+
-------
|
|
467
|
+
int
|
|
468
|
+
The sum of x and y.
|
|
257
469
|
"""
|
|
258
|
-
await asyncio.sleep(0.1)
|
|
470
|
+
await asyncio.sleep(0.1) # Brief async delay for testing
|
|
259
471
|
return x + y
|
|
260
472
|
|
|
261
473
|
def _protectedsyncMethod(self, x: int, y: int) -> int:
|
|
262
474
|
"""
|
|
263
|
-
|
|
475
|
+
Protected synchronous method to add two integers.
|
|
264
476
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
477
|
+
Parameters
|
|
478
|
+
----------
|
|
479
|
+
x : int
|
|
480
|
+
The first integer to add.
|
|
481
|
+
y : int
|
|
482
|
+
The second integer to add.
|
|
268
483
|
|
|
269
|
-
Returns
|
|
270
|
-
|
|
484
|
+
Returns
|
|
485
|
+
-------
|
|
486
|
+
int
|
|
487
|
+
The sum of x and y.
|
|
271
488
|
"""
|
|
272
489
|
return x + y
|
|
273
490
|
|
|
274
491
|
async def _protectedAsyncMethod(self, x: int, y: int) -> int:
|
|
275
492
|
"""
|
|
276
|
-
|
|
493
|
+
Protected asynchronous method to add two integers with a brief delay.
|
|
277
494
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
495
|
+
Parameters
|
|
496
|
+
----------
|
|
497
|
+
x : int
|
|
498
|
+
The first integer to add.
|
|
499
|
+
y : int
|
|
500
|
+
The second integer to add.
|
|
281
501
|
|
|
282
|
-
Returns
|
|
283
|
-
|
|
502
|
+
Returns
|
|
503
|
+
-------
|
|
504
|
+
int
|
|
505
|
+
The sum of x and y.
|
|
284
506
|
"""
|
|
285
|
-
await asyncio.sleep(0.1)
|
|
507
|
+
await asyncio.sleep(0.1) # Brief async delay for testing
|
|
286
508
|
return x + y
|
|
287
509
|
|
|
288
510
|
def __privateSyncMethod(self, x: int, y: int) -> int:
|
|
289
511
|
"""
|
|
290
|
-
|
|
512
|
+
Private synchronous method to add two integers.
|
|
513
|
+
|
|
514
|
+
Parameters
|
|
515
|
+
----------
|
|
516
|
+
x : int
|
|
517
|
+
The first integer to add.
|
|
518
|
+
y : int
|
|
519
|
+
The second integer to add.
|
|
291
520
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
521
|
+
Returns
|
|
522
|
+
-------
|
|
523
|
+
int
|
|
524
|
+
The sum of x and y.
|
|
295
525
|
|
|
296
|
-
|
|
297
|
-
|
|
526
|
+
Notes
|
|
527
|
+
-----
|
|
528
|
+
This method uses name mangling due to the double underscore prefix.
|
|
298
529
|
"""
|
|
299
530
|
return x + y
|
|
300
531
|
|
|
301
532
|
async def __privateAsyncMethod(self, x: int, y: int) -> int:
|
|
302
533
|
"""
|
|
303
|
-
|
|
534
|
+
Private asynchronous method to add two integers with a brief delay.
|
|
304
535
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
536
|
+
Parameters
|
|
537
|
+
----------
|
|
538
|
+
x : int
|
|
539
|
+
The first integer to add.
|
|
540
|
+
y : int
|
|
541
|
+
The second integer to add.
|
|
308
542
|
|
|
309
|
-
Returns
|
|
310
|
-
|
|
543
|
+
Returns
|
|
544
|
+
-------
|
|
545
|
+
int
|
|
546
|
+
The sum of x and y.
|
|
547
|
+
|
|
548
|
+
Notes
|
|
549
|
+
-----
|
|
550
|
+
This method uses name mangling due to the double underscore prefix.
|
|
311
551
|
"""
|
|
312
|
-
await asyncio.sleep(0.1)
|
|
552
|
+
await asyncio.sleep(0.1) # Brief async delay for testing
|
|
313
553
|
return x + y
|
|
314
554
|
|
|
315
555
|
@classmethod
|
|
316
556
|
def classSyncMethod(cls, x: int, y: int) -> int:
|
|
317
557
|
"""
|
|
318
|
-
|
|
558
|
+
Synchronous class method to add two integers.
|
|
319
559
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
560
|
+
Parameters
|
|
561
|
+
----------
|
|
562
|
+
x : int
|
|
563
|
+
The first integer to add.
|
|
564
|
+
y : int
|
|
565
|
+
The second integer to add.
|
|
323
566
|
|
|
324
|
-
Returns
|
|
325
|
-
|
|
567
|
+
Returns
|
|
568
|
+
-------
|
|
569
|
+
int
|
|
570
|
+
The sum of x and y.
|
|
326
571
|
"""
|
|
327
572
|
return x + y
|
|
328
573
|
|
|
329
574
|
@classmethod
|
|
330
575
|
async def classAsyncMethod(cls, x: int, y: int) -> int:
|
|
331
576
|
"""
|
|
332
|
-
|
|
577
|
+
Asynchronous class method to add two integers with a brief delay.
|
|
333
578
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
579
|
+
Parameters
|
|
580
|
+
----------
|
|
581
|
+
x : int
|
|
582
|
+
The first integer to add.
|
|
583
|
+
y : int
|
|
584
|
+
The second integer to add.
|
|
337
585
|
|
|
338
|
-
Returns
|
|
339
|
-
|
|
586
|
+
Returns
|
|
587
|
+
-------
|
|
588
|
+
int
|
|
589
|
+
The sum of x and y.
|
|
340
590
|
"""
|
|
341
|
-
await asyncio.sleep(0.1)
|
|
591
|
+
await asyncio.sleep(0.1) # Brief async delay for testing
|
|
342
592
|
return x + y
|
|
343
593
|
|
|
344
594
|
@classmethod
|
|
345
595
|
def _classMethodProtected(cls, x: int, y: int) -> int:
|
|
346
596
|
"""
|
|
347
|
-
|
|
597
|
+
Protected synchronous class method to add two integers.
|
|
348
598
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
599
|
+
Parameters
|
|
600
|
+
----------
|
|
601
|
+
x : int
|
|
602
|
+
The first integer to add.
|
|
603
|
+
y : int
|
|
604
|
+
The second integer to add.
|
|
352
605
|
|
|
353
|
-
Returns
|
|
354
|
-
|
|
606
|
+
Returns
|
|
607
|
+
-------
|
|
608
|
+
int
|
|
609
|
+
The sum of x and y.
|
|
355
610
|
"""
|
|
356
611
|
return x + y
|
|
357
612
|
|
|
358
613
|
@classmethod
|
|
359
614
|
async def _classAsyncMethodProtected(cls, x: int, y: int) -> int:
|
|
360
615
|
"""
|
|
361
|
-
|
|
616
|
+
Protected asynchronous class method to add two integers with a brief delay.
|
|
362
617
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
618
|
+
Parameters
|
|
619
|
+
----------
|
|
620
|
+
x : int
|
|
621
|
+
The first integer to add.
|
|
622
|
+
y : int
|
|
623
|
+
The second integer to add.
|
|
366
624
|
|
|
367
|
-
Returns
|
|
368
|
-
|
|
625
|
+
Returns
|
|
626
|
+
-------
|
|
627
|
+
int
|
|
628
|
+
The sum of x and y.
|
|
369
629
|
"""
|
|
370
|
-
await asyncio.sleep(0.1)
|
|
630
|
+
await asyncio.sleep(0.1) # Brief async delay for testing
|
|
371
631
|
return x + y
|
|
372
632
|
|
|
373
633
|
@classmethod
|
|
374
634
|
def __classMethodPrivate(cls, x: int, y: int) -> int:
|
|
375
635
|
"""
|
|
376
|
-
|
|
636
|
+
Private synchronous class method to add two integers.
|
|
637
|
+
|
|
638
|
+
Parameters
|
|
639
|
+
----------
|
|
640
|
+
x : int
|
|
641
|
+
The first integer to add.
|
|
642
|
+
y : int
|
|
643
|
+
The second integer to add.
|
|
377
644
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
645
|
+
Returns
|
|
646
|
+
-------
|
|
647
|
+
int
|
|
648
|
+
The sum of x and y.
|
|
381
649
|
|
|
382
|
-
|
|
383
|
-
|
|
650
|
+
Notes
|
|
651
|
+
-----
|
|
652
|
+
This method uses name mangling due to the double underscore prefix.
|
|
384
653
|
"""
|
|
385
654
|
return x + y
|
|
386
655
|
|
|
387
656
|
@classmethod
|
|
388
657
|
async def __classAsyncMethodPrivate(cls, x: int, y: int) -> int:
|
|
389
658
|
"""
|
|
390
|
-
|
|
659
|
+
Private asynchronous class method to add two integers with a brief delay.
|
|
391
660
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
661
|
+
Parameters
|
|
662
|
+
----------
|
|
663
|
+
x : int
|
|
664
|
+
The first integer to add.
|
|
665
|
+
y : int
|
|
666
|
+
The second integer to add.
|
|
395
667
|
|
|
396
|
-
Returns
|
|
397
|
-
|
|
668
|
+
Returns
|
|
669
|
+
-------
|
|
670
|
+
int
|
|
671
|
+
The sum of x and y.
|
|
672
|
+
|
|
673
|
+
Notes
|
|
674
|
+
-----
|
|
675
|
+
This method uses name mangling due to the double underscore prefix.
|
|
398
676
|
"""
|
|
399
|
-
await asyncio.sleep(0.1)
|
|
677
|
+
await asyncio.sleep(0.1) # Brief async delay for testing
|
|
400
678
|
return x + y
|
|
401
679
|
|
|
402
680
|
@staticmethod
|
|
403
681
|
def staticMethod(text: str) -> str:
|
|
404
682
|
"""
|
|
405
|
-
|
|
683
|
+
Static method to convert text to uppercase.
|
|
406
684
|
|
|
407
|
-
|
|
408
|
-
|
|
685
|
+
Parameters
|
|
686
|
+
----------
|
|
687
|
+
text : str
|
|
688
|
+
Input text string to convert.
|
|
409
689
|
|
|
410
|
-
Returns
|
|
411
|
-
|
|
690
|
+
Returns
|
|
691
|
+
-------
|
|
692
|
+
str
|
|
693
|
+
The uppercase version of the input string.
|
|
412
694
|
"""
|
|
413
695
|
return text.upper()
|
|
414
696
|
|
|
415
697
|
@staticmethod
|
|
416
698
|
async def staticAsyncMethod(text: str) -> str:
|
|
417
699
|
"""
|
|
418
|
-
|
|
700
|
+
Asynchronous static method to convert text to uppercase with a brief delay.
|
|
419
701
|
|
|
420
|
-
|
|
421
|
-
|
|
702
|
+
Parameters
|
|
703
|
+
----------
|
|
704
|
+
text : str
|
|
705
|
+
Input text string to convert.
|
|
422
706
|
|
|
423
|
-
Returns
|
|
424
|
-
|
|
707
|
+
Returns
|
|
708
|
+
-------
|
|
709
|
+
str
|
|
710
|
+
The uppercase version of the input string.
|
|
425
711
|
"""
|
|
426
|
-
await asyncio.sleep(0.1)
|
|
712
|
+
await asyncio.sleep(0.1) # Brief async delay for testing
|
|
427
713
|
return text.upper()
|
|
428
714
|
|
|
429
715
|
@staticmethod
|
|
430
716
|
def _staticMethodProtected(text: str) -> str:
|
|
431
717
|
"""
|
|
432
|
-
|
|
718
|
+
Protected static method to convert text to uppercase.
|
|
433
719
|
|
|
434
|
-
|
|
435
|
-
|
|
720
|
+
Parameters
|
|
721
|
+
----------
|
|
722
|
+
text : str
|
|
723
|
+
Input text string to convert.
|
|
436
724
|
|
|
437
|
-
Returns
|
|
438
|
-
|
|
725
|
+
Returns
|
|
726
|
+
-------
|
|
727
|
+
str
|
|
728
|
+
The uppercase version of the input string.
|
|
439
729
|
"""
|
|
440
730
|
return text.upper()
|
|
441
731
|
|
|
442
732
|
@staticmethod
|
|
443
733
|
async def _staticAsyncMethodProtected(text: str) -> str:
|
|
444
734
|
"""
|
|
445
|
-
|
|
735
|
+
Protected asynchronous static method to convert text to uppercase with a brief delay.
|
|
446
736
|
|
|
447
|
-
|
|
448
|
-
|
|
737
|
+
Parameters
|
|
738
|
+
----------
|
|
739
|
+
text : str
|
|
740
|
+
Input text string to convert.
|
|
449
741
|
|
|
450
|
-
Returns
|
|
451
|
-
|
|
742
|
+
Returns
|
|
743
|
+
-------
|
|
744
|
+
str
|
|
745
|
+
The uppercase version of the input string.
|
|
452
746
|
"""
|
|
453
|
-
await asyncio.sleep(0.1)
|
|
747
|
+
await asyncio.sleep(0.1) # Brief async delay for testing
|
|
454
748
|
return text.upper()
|
|
455
749
|
|
|
456
750
|
@staticmethod
|
|
457
751
|
def __staticMethodPrivate(text: str) -> str:
|
|
458
752
|
"""
|
|
459
|
-
|
|
753
|
+
Private static method to convert text to uppercase.
|
|
754
|
+
|
|
755
|
+
Parameters
|
|
756
|
+
----------
|
|
757
|
+
text : str
|
|
758
|
+
Input text string to convert.
|
|
460
759
|
|
|
461
|
-
|
|
462
|
-
|
|
760
|
+
Returns
|
|
761
|
+
-------
|
|
762
|
+
str
|
|
763
|
+
The uppercase version of the input string.
|
|
463
764
|
|
|
464
|
-
|
|
465
|
-
|
|
765
|
+
Notes
|
|
766
|
+
-----
|
|
767
|
+
This method uses name mangling due to the double underscore prefix.
|
|
466
768
|
"""
|
|
467
769
|
return text.upper()
|
|
468
770
|
|
|
469
771
|
@staticmethod
|
|
470
772
|
async def __staticAsyncMethodPrivate(text: str) -> str:
|
|
471
773
|
"""
|
|
472
|
-
|
|
774
|
+
Private asynchronous static method to convert text to uppercase with a brief delay.
|
|
775
|
+
|
|
776
|
+
Parameters
|
|
777
|
+
----------
|
|
778
|
+
text : str
|
|
779
|
+
Input text string to convert.
|
|
473
780
|
|
|
474
|
-
|
|
475
|
-
|
|
781
|
+
Returns
|
|
782
|
+
-------
|
|
783
|
+
str
|
|
784
|
+
The uppercase version of the input string.
|
|
476
785
|
|
|
477
|
-
|
|
478
|
-
|
|
786
|
+
Notes
|
|
787
|
+
-----
|
|
788
|
+
This method uses name mangling due to the double underscore prefix.
|
|
479
789
|
"""
|
|
480
|
-
await asyncio.sleep(0.1)
|
|
790
|
+
await asyncio.sleep(0.1) # Brief async delay for testing
|
|
481
791
|
return text.upper()
|
|
482
792
|
|