orionis 0.305.0__py3-none-any.whl → 0.306.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 (32) hide show
  1. orionis/metadata/framework.py +1 -1
  2. orionis/{services → support}/standard/std.py +2 -2
  3. {orionis-0.305.0.dist-info → orionis-0.306.0.dist-info}/METADATA +1 -1
  4. {orionis-0.305.0.dist-info → orionis-0.306.0.dist-info}/RECORD +23 -32
  5. tests/{services → support}/standard/test_services_std.py +3 -3
  6. tests/{services → support}/wrapper/test_services_wrapper_docdict.py +2 -2
  7. tests/support/inspection/fakes/fake_reflect_abstract.py +0 -276
  8. tests/support/inspection/fakes/fake_reflection_concrete.py +0 -44
  9. tests/support/inspection/fakes/fake_reflection_concrete_with_abstract.py +0 -78
  10. tests/support/inspection/fakes/fake_reflection_instance_with_abstract.py +0 -45
  11. tests/support/inspection/test_reflect_abstract.py +0 -334
  12. tests/support/inspection/test_reflect_instance.py +0 -288
  13. tests/support/inspection/test_reflection_concrete.py +0 -142
  14. tests/support/inspection/test_reflection_concrete_with_abstract.py +0 -87
  15. tests/support/inspection/test_reflection_instance_with_abstract.py +0 -79
  16. /orionis/{services → support}/standard/__init__.py +0 -0
  17. /orionis/{services → support}/standard/contracts/__init__.py +0 -0
  18. /orionis/{services → support}/standard/contracts/std.py +0 -0
  19. /orionis/{services → support}/standard/exceptions/__init__.py +0 -0
  20. /orionis/{services → support}/standard/exceptions/std_value_exception.py +0 -0
  21. /orionis/{services → support}/wrapper/__init__.py +0 -0
  22. /orionis/{services → support}/wrapper/dicts/__init__.py +0 -0
  23. /orionis/{services → support}/wrapper/dicts/dot_dict.py +0 -0
  24. {orionis-0.305.0.dist-info → orionis-0.306.0.dist-info}/WHEEL +0 -0
  25. {orionis-0.305.0.dist-info → orionis-0.306.0.dist-info}/licenses/LICENCE +0 -0
  26. {orionis-0.305.0.dist-info → orionis-0.306.0.dist-info}/top_level.txt +0 -0
  27. {orionis-0.305.0.dist-info → orionis-0.306.0.dist-info}/zip-safe +0 -0
  28. /tests/services/{standard → inspection/reflection}/__init__.py +0 -0
  29. /tests/services/{wrapper → inspection/reflection/mock}/__init__.py +0 -0
  30. /tests/{support/inspection/fakes → services/inspection/reflection/mock}/fake_reflect_instance.py +0 -0
  31. /tests/support/{inspection → standard}/__init__.py +0 -0
  32. /tests/support/{inspection/fakes → wrapper}/__init__.py +0 -0
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.305.0"
8
+ VERSION = "0.306.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,5 +1,5 @@
1
- from orionis.services.standard.contracts.std import IStdClass
2
- from orionis.services.standard.exceptions.std_value_exception import OrionisStdValueException
1
+ from orionis.support.standard.contracts.std import IStdClass
2
+ from orionis.support.standard.exceptions.std_value_exception import OrionisStdValueException
3
3
 
4
4
  class StdClass(IStdClass):
5
5
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.305.0
3
+ Version: 0.306.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -226,7 +226,7 @@ orionis/foundation/config/testing/entities/testing.py,sha256=AuhPU9O15Aeqs8jQVHW
226
226
  orionis/foundation/config/testing/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
227
227
  orionis/foundation/config/testing/enums/test_mode.py,sha256=IbFpauu7J-iSAfmC8jDbmTEYl8eZr-AexL-lyOh8_74,337
228
228
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
229
- orionis/metadata/framework.py,sha256=pNDQY58vhSufu48I0aurRcZ8rtwladNjfp7t_51X3E4,4960
229
+ orionis/metadata/framework.py,sha256=GImOCrMN7mWsb01QmgRxKwSjebYym2MWgAVOgJkbQiM,4960
230
230
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
231
231
  orionis/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
232
232
  orionis/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -291,12 +291,6 @@ orionis/services/paths/contracts/resolver.py,sha256=v7uTgByE2nQS2ZM_b1rtMzY6HH03
291
291
  orionis/services/paths/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
292
292
  orionis/services/paths/exceptions/not_found_exceptions.py,sha256=J3BXNqMjt9NFH2yYpxlE2gIeuV6es5GEgNatT5PYKXc,814
293
293
  orionis/services/paths/exceptions/path_value_exceptions.py,sha256=kQnUPBjfHgRyjGfrOSFKa1DPluMFJQv-1nUe_f76lUs,879
294
- orionis/services/standard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
295
- orionis/services/standard/std.py,sha256=nmZh0nQecPwyB9Pk09OUGQhTnVgXGRPA4AYyybSt-W8,3701
296
- orionis/services/standard/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
297
- orionis/services/standard/contracts/std.py,sha256=w4F0fIHIOhCPPiBgTLIIWR9EFdjeTjLsDktiLaUgmj8,3108
298
- orionis/services/standard/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
299
- orionis/services/standard/exceptions/std_value_exception.py,sha256=PPrh58fyaARULFo7NUn36oLWF3ac3N5Bkc2pCHKpQVc,681
300
294
  orionis/services/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
301
295
  orionis/services/system/imports.py,sha256=5j2Rkf6vMLnCQjqcox4-0y0tZoxgPfv7EP8eruG7vnA,4990
302
296
  orionis/services/system/runtime_imports.py,sha256=eWp_MmrvxWHl-lsNO0M5FC9OsCcY1BXsiJTlPk0cfRU,2550
@@ -304,10 +298,16 @@ orionis/services/system/workers.py,sha256=VB0BBrx3ks0vqc0-aPLQj2VK4cO7s_44YhJOKY
304
298
  orionis/services/system/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
305
299
  orionis/services/system/contracts/imports.py,sha256=nE2fDS2bDbwltHCmzOsEMhUymYy092zoGX-NOXLE4J4,1167
306
300
  orionis/services/system/contracts/workers.py,sha256=aZfQlij6mkPM2TcodDai7JYpTFNKL4YFAEj8Bd9Y4nw,707
307
- orionis/services/wrapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
308
- orionis/services/wrapper/dicts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
309
- orionis/services/wrapper/dicts/dot_dict.py,sha256=VdAUH-DO6y86pl_9N6v-vU9mdLraWh5HjVzI5iC1dMs,5295
310
301
  orionis/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
302
+ orionis/support/standard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
303
+ orionis/support/standard/std.py,sha256=_EtIoAxKImQto6Le7RYzuEI6wh2PuoF5C50Rrhrv5Zw,3699
304
+ orionis/support/standard/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
305
+ orionis/support/standard/contracts/std.py,sha256=w4F0fIHIOhCPPiBgTLIIWR9EFdjeTjLsDktiLaUgmj8,3108
306
+ orionis/support/standard/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
307
+ orionis/support/standard/exceptions/std_value_exception.py,sha256=PPrh58fyaARULFo7NUn36oLWF3ac3N5Bkc2pCHKpQVc,681
308
+ orionis/support/wrapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
309
+ orionis/support/wrapper/dicts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
310
+ orionis/support/wrapper/dicts/dot_dict.py,sha256=VdAUH-DO6y86pl_9N6v-vU9mdLraWh5HjVzI5iC1dMs,5295
311
311
  orionis/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
312
312
  orionis/test/test_suite.py,sha256=Aqjfh_HcuudckUbM5aK7hjH_kE-Rwr_8NyGaioWuQZw,4941
313
313
  orionis/test/cases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -339,7 +339,7 @@ orionis/test/suite/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
339
339
  orionis/test/suite/contracts/test_unit.py,sha256=YWpzXhjD-f-IGncKkGyE9C7tYCFbt9mxZPw1O_d5HOE,7532
340
340
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
341
341
  orionis/test/view/render.py,sha256=jXZkbITBknbUwm_mD8bcTiwLDvsFkrO9qrf0ZgPwqxc,4903
342
- orionis-0.305.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
342
+ orionis-0.306.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
343
343
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
344
344
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
345
345
  tests/example/test_example.py,sha256=kvWgiW3ADEZf718dGsMPtDh_rmOSx1ypEInKm7_6ZPQ,601
@@ -414,37 +414,28 @@ tests/services/inspection/dependencies/mocks/__init__.py,sha256=47DEQpj8HBSa-_TI
414
414
  tests/services/inspection/dependencies/mocks/mock_user.py,sha256=RxATxe0-Vm4HfX5jKz9Tny42E2fmrdtEN6ZEntbqRL8,912
415
415
  tests/services/inspection/dependencies/mocks/mock_user_controller.py,sha256=P3sOUXVZ55auudwiNtvNCEQuTz0cgAZjvhicLZ4xaz4,1208
416
416
  tests/services/inspection/dependencies/mocks/mock_users_permissions.py,sha256=oENXbS2qmQUudYSmnhB8fgHBqXZdbplplB-Y2nbx4hw,1388
417
+ tests/services/inspection/reflection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
418
+ tests/services/inspection/reflection/mock/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
419
+ tests/services/inspection/reflection/mock/fake_reflect_instance.py,sha256=WZsXKb8WQcP6Xz72ejrtqw6m2FMPl9HhhurkF1OyUC4,18248
417
420
  tests/services/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
418
421
  tests/services/parsers/test_services_parser_exceptions.py,sha256=fCi_nUsXSh80r7HzQibXbUuYMpqjBefsP-QPF76MLfM,2650
419
422
  tests/services/parsers/mocks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
420
423
  tests/services/parsers/mocks/mock_custom_error.py,sha256=LWgjeog2rpmfw6j7Bgzvfvmeby8uSBuB1B3d_DgRcFQ,752
421
424
  tests/services/path/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
422
425
  tests/services/path/test_services_resolver.py,sha256=ny6vyx_psF9iWXyMhqI95SJs84_dD1NIOXt0k1MfBQA,3902
423
- tests/services/standard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
424
- tests/services/standard/test_services_std.py,sha256=ChEUcUNSSrKEaLczoDGphHlUhTnaXknzMBMVLNRgbG0,5518
425
426
  tests/services/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
426
427
  tests/services/system/test_services_system_imports.py,sha256=dqNFspZCVHIupSV9u7mGCUlyJImmExURp-p0PhwpvRI,2945
427
428
  tests/services/system/test_services_system_workers.py,sha256=g9Nq0V-xmrLAl089Nz3t7xEjeSJxNaplAt_KgzMqJ5o,3002
428
- tests/services/wrapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
429
- tests/services/wrapper/test_services_wrapper_docdict.py,sha256=EhV6uIp0OX5t1YZjVAtZlASMgm576CQjwNHVhrvxU1w,4986
430
429
  tests/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
431
- tests/support/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
432
- tests/support/inspection/test_reflect_abstract.py,sha256=CkQP2neysJGaQuskvsHCnBurlogFF5hH0AR1EGpP9BE,13448
433
- tests/support/inspection/test_reflect_instance.py,sha256=RsBilqAZMRYIrhp7pOY7AJMkga-eV5NWQkIWrSUJ9VY,14037
434
- tests/support/inspection/test_reflection_concrete.py,sha256=lqmcvaJr-K_u60jlFtk4EFOyPFGUyrLveKR-u78hxX0,6751
435
- tests/support/inspection/test_reflection_concrete_with_abstract.py,sha256=Qzd87JxKDXPpItNg_cVrxinN42wNfaBllucnhH30gXs,4655
436
- tests/support/inspection/test_reflection_instance_with_abstract.py,sha256=L3nQy2l95yEIyvAHErqxGRVVF5x8YkyM82uGm0wUlxk,4064
437
- tests/support/inspection/fakes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
438
- tests/support/inspection/fakes/fake_reflect_abstract.py,sha256=woE15uLmoD3fLgPBMjNh5XkwvMDmW2VDbADYPIS_88o,6387
439
- tests/support/inspection/fakes/fake_reflect_instance.py,sha256=WZsXKb8WQcP6Xz72ejrtqw6m2FMPl9HhhurkF1OyUC4,18248
440
- tests/support/inspection/fakes/fake_reflection_concrete.py,sha256=j6gzsxE3xq5oJ30H_Hm1RsUwEY3jOYBu4sclxtD1ayo,1047
441
- tests/support/inspection/fakes/fake_reflection_concrete_with_abstract.py,sha256=ibCjrtNM6BMf5Z5VMvat7E6zOAk5g9z--gj4ykKJWY8,2118
442
- tests/support/inspection/fakes/fake_reflection_instance_with_abstract.py,sha256=SfL8FuFmr650RlzXTrP4tGMfsPVZLhOxVnBXu_g1POg,1471
430
+ tests/support/standard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
431
+ tests/support/standard/test_services_std.py,sha256=jRL3QbfbDaMH2Qs9W6tmMgzM-fhrVqOUnD-JeMAK0uA,5515
432
+ tests/support/wrapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
433
+ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=yeVwl-VcwkWSQYyxZu3qfqT7YtP8LIEJgHo2ejzISh0,4984
443
434
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
444
435
  tests/testing/test_testing_result.py,sha256=MrGK3ZimedL0b5Ydu69Dg8Iul017AzLTm7VPxpXlpfU,4315
445
436
  tests/testing/test_testing_unit.py,sha256=A6QkiOkP7GPC1Szh_GqsrV7GxjWjK8cIwFez6YfrzmM,7683
446
- orionis-0.305.0.dist-info/METADATA,sha256=6yq515Gn8B3eqR0DjiTMY8U3l7WNCjHkRg9_xr0XMXI,4772
447
- orionis-0.305.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
448
- orionis-0.305.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
449
- orionis-0.305.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
450
- orionis-0.305.0.dist-info/RECORD,,
437
+ orionis-0.306.0.dist-info/METADATA,sha256=8CLPP3IUOw-YheRrX-OFVFBSUyR-4kO4LqoX49dyMWU,4772
438
+ orionis-0.306.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
439
+ orionis-0.306.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
440
+ orionis-0.306.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
441
+ orionis-0.306.0.dist-info/RECORD,,
@@ -1,8 +1,8 @@
1
- from orionis.services.standard.exceptions.std_value_exception import OrionisStdValueException
2
- from orionis.services.standard.std import StdClass
1
+ from orionis.support.standard.exceptions.std_value_exception import OrionisStdValueException
2
+ from orionis.support.standard.std import StdClass
3
3
  from orionis.unittesting import TestCase
4
4
 
5
- class TestServicesStd(TestCase):
5
+ class TestSupportStd(TestCase):
6
6
 
7
7
  async def testInitializationAndAccess(self):
8
8
  """
@@ -1,7 +1,7 @@
1
- from orionis.services.wrapper.dicts.dot_dict import DotDict
1
+ from orionis.support.wrapper.dicts.dot_dict import DotDict
2
2
  from orionis.unittesting import TestCase
3
3
 
4
- class TestServicesWrapperDocDict(TestCase):
4
+ class TestSupportWrapperDocDict(TestCase):
5
5
  """
6
6
  Test cases for the DotDict class which provides dictionary with dot notation access.
7
7
 
@@ -1,276 +0,0 @@
1
- from abc import ABC, abstractmethod
2
- from typing import Callable
3
- from functools import wraps
4
-
5
- def decorator_example(func: Callable) -> Callable:
6
- """Example decorator for testing purposes.
7
-
8
- Parameters
9
- ----------
10
- func : Callable
11
- The function to be decorated
12
-
13
- Returns
14
- -------
15
- Callable
16
- The wrapped function
17
-
18
- Notes
19
- -----
20
- This is a simple identity decorator used for testing decorator detection.
21
- """
22
- @wraps(func)
23
- def wrapper(*args, **kwargs):
24
- return func(*args, **kwargs)
25
- return wrapper
26
-
27
-
28
- def another_decorator(func: Callable) -> Callable:
29
- """Another example decorator for testing multiple decorators.
30
-
31
- Parameters
32
- ----------
33
- func : Callable
34
- The function to be decorated
35
-
36
- Returns
37
- -------
38
- Callable
39
- The wrapped function with added prefix
40
-
41
- Examples
42
- --------
43
- >>> @another_decorator
44
- ... def test(): return "hello"
45
- >>> test()
46
- 'Decorated: hello'
47
- """
48
- @wraps(func)
49
- def wrapper(*args, **kwargs):
50
- return f"Decorated: {func(*args, **kwargs)}"
51
- return wrapper
52
-
53
- class FakeAbstractClass(ABC):
54
- """A fake abstract class for testing reflection capabilities.
55
-
56
- This class contains all elements needed to test ReflexionAbstract functionality:
57
- - Abstract methods
58
- - Concrete methods
59
- - Static methods
60
- - Class methods
61
- - Properties
62
- - Decorated methods
63
- - Type annotations
64
- - Protected/private methods
65
-
66
- Attributes
67
- ----------
68
- class_attr : str
69
- A class-level attribute with type annotation
70
- _value : float
71
- Protected attribute used by computed_property setter
72
- """
73
-
74
- public_class_attribute: str = "class_value"
75
- _protected_class_attribute: str = "protected_class_attr"
76
- __private_class_attribute: str = "private_class_attr"
77
-
78
- @abstractmethod
79
- def abstract_method(self, x: int, y: int) -> int:
80
- """Required abstract method.
81
-
82
- Parameters
83
- ----------
84
- x : int
85
- First integer parameter
86
- y : int
87
- Second integer parameter
88
-
89
- Returns
90
- -------
91
- int
92
- The result of some operation
93
-
94
- Notes
95
- -----
96
- This method must be implemented by concrete subclasses.
97
- """
98
- pass
99
-
100
- @abstractmethod
101
- def another_abstract(self, text: str) -> str:
102
- """Another required abstract method.
103
-
104
- Parameters
105
- ----------
106
- text : str
107
- Input string to process
108
-
109
- Returns
110
- -------
111
- str
112
- Processed string result
113
- """
114
- pass
115
-
116
- def concrete_method(self, value: float) -> str:
117
- """Concrete implemented method.
118
-
119
- Parameters
120
- ----------
121
- value : float
122
- Numeric value to format
123
-
124
- Returns
125
- -------
126
- str
127
- Formatted string representation
128
- """
129
- return f"Value: {value}"
130
-
131
- @staticmethod
132
- def static_helper(flag: bool) -> str:
133
- """Static helper method.
134
-
135
- Parameters
136
- ----------
137
- flag : bool
138
- Boolean flag to determine output
139
-
140
- Returns
141
- -------
142
- str
143
- "Enabled" if flag is True, "Disabled" otherwise
144
- """
145
- return "Enabled" if flag else "Disabled"
146
-
147
- @classmethod
148
- def create_instance(cls) -> 'FakeAbstractClass':
149
- """Class method factory.
150
-
151
- Returns
152
- -------
153
- FakeAbstractClass
154
- New instance of the class
155
-
156
- Notes
157
- -----
158
- This cannot actually instantiate the abstract class, but serves
159
- as an example of a class method.
160
- """
161
- return cls()
162
-
163
- @property
164
- def computed_property(self) -> float:
165
- """Computed property example.
166
-
167
- Returns
168
- -------
169
- float
170
- The value of pi approximation
171
- """
172
- return 3.1416
173
-
174
- @computed_property.setter
175
- def computed_property(self, value: float):
176
- """Setter for computed property.
177
-
178
- Parameters
179
- ----------
180
- value : float
181
- New value to set
182
- """
183
- self._value = value
184
-
185
- @decorator_example
186
- @another_decorator
187
- def decorated_method(self) -> str:
188
- """Method with multiple decorators.
189
-
190
- Returns
191
- -------
192
- str
193
- Always returns "decorated" with decorator transformations
194
-
195
- Notes
196
- -----
197
- Used to test decorator inspection functionality.
198
- """
199
- return "decorated"
200
-
201
- def _protected_method(self) -> str:
202
- """Protected method (should be filtered in results).
203
-
204
- Returns
205
- -------
206
- str
207
- Constant string "protected"
208
- """
209
- return "protected"
210
-
211
- def __private_method(self) -> str:
212
- """Private method (should be filtered in results).
213
-
214
- Returns
215
- -------
216
- str
217
- Constant string "private"
218
- """
219
- return "private"
220
-
221
- async def asynchronous(self) -> str:
222
- """Asynchronous method example.
223
-
224
- Returns
225
- -------
226
- str
227
- Constant string "asynchronous"
228
- """
229
- return "asynchronous"
230
-
231
- @staticmethod
232
- async def asynchronous_static() -> str:
233
- """Asynchronous static method example.
234
-
235
- Returns
236
- -------
237
- str
238
- Constant string "asynchronous static"
239
- """
240
- return "asynchronous static"
241
-
242
- @property
243
- @abstractmethod
244
- def abstract_properties(self) -> str:
245
- """Abstract property example.
246
-
247
- Returns
248
- -------
249
- str
250
- Abstract property value
251
- """
252
- pass
253
-
254
- @classmethod
255
- @abstractmethod
256
- def abstract_class_method(cls) -> str:
257
- """Abstract class method example.
258
-
259
- Returns
260
- -------
261
- str
262
- Abstract class method value
263
- """
264
- pass
265
-
266
- @staticmethod
267
- @abstractmethod
268
- def abstract_static_method() -> str:
269
- """Abstract static method example.
270
-
271
- Returns
272
- -------
273
- str
274
- Abstract static method value
275
- """
276
- pass
@@ -1,44 +0,0 @@
1
- class BaseExample:
2
- """Base class to test inheritance."""
3
-
4
- def baseMethod(self) -> str:
5
- return "Base method called"
6
-
7
- class FakeExample(BaseExample):
8
- """This is a fake example class for testing reflection."""
9
-
10
- class_attr: int = 42
11
- another_attr = "hello"
12
-
13
- def __init__(self, value: int = 10) -> None:
14
- self.instance_attr = value
15
-
16
- @property
17
- def prop(self) -> int:
18
- """A read-only property returning a fixed number."""
19
- return 10
20
-
21
- @property
22
- def prop_with_getter(self) -> str:
23
- return "read-only"
24
-
25
- def method_one(self, x: int) -> int:
26
- return x * 2
27
-
28
- def method_two(self, a: str, b: str = "default") -> str:
29
- return a + b
30
-
31
- @staticmethod
32
- def static_method() -> str:
33
- return "I am static"
34
-
35
- @staticmethod
36
- def _private_static():
37
- pass
38
-
39
- @classmethod
40
- def class_method(cls) -> str:
41
- return f"I am class method of {cls.__name__}"
42
-
43
- def _private_method(self):
44
- pass
@@ -1,78 +0,0 @@
1
- import abc
2
- from typing import Any, Dict, List
3
-
4
- class AbstractService(abc.ABC):
5
- """
6
- Abstract interface for service-like behavior.
7
-
8
- Methods
9
- -------
10
- process(data: str) -> bool
11
- Perform processing on input data.
12
-
13
- reset() -> None
14
- Reset the internal state of the service.
15
-
16
- configure(options: Dict[str, Any]) -> None
17
- Apply configuration settings to the service.
18
-
19
- get_logs(limit: int = 10) -> List[str]
20
- Retrieve a limited number of log messages.
21
-
22
- Properties
23
- ----------
24
- status : str
25
- Current status of the service.
26
- """
27
-
28
- @abc.abstractmethod
29
- def process(self, data: str) -> bool:
30
- """Perform processing on input data."""
31
- pass
32
-
33
- @abc.abstractmethod
34
- def reset(self) -> None:
35
- """Reset the internal state of the service."""
36
- pass
37
-
38
- @abc.abstractmethod
39
- def configure(self, options: Dict[str, Any]) -> None:
40
- """Apply configuration settings to the service."""
41
- pass
42
-
43
- @abc.abstractmethod
44
- def get_logs(self, limit: int = 10) -> List[str]:
45
- """Retrieve a limited number of log messages."""
46
- pass
47
-
48
- @property
49
- @abc.abstractmethod
50
- def status(self) -> str:
51
- """Current status of the service."""
52
- pass
53
-
54
- class PartiallyImplementedService:
55
- """
56
- A partial implementation of AbstractService.
57
-
58
- This class mimics the interface but lacks some methods/properties,
59
- making it useful for testing reflection-based validation.
60
- """
61
-
62
- def process(self, data: str) -> bool:
63
- """Basic processing implementation."""
64
- return bool(data)
65
-
66
- def get_logs(self, limit: int = 10) -> List[str]:
67
- """Return a fixed list of logs (mock implementation)."""
68
- return [f"log {i}" for i in range(limit)]
69
-
70
- # ❌ Missing: reset()
71
- # ❌ Missing: configure()
72
- # ❌ Missing: status (property)
73
-
74
- def extra(self) -> str:
75
- """An extra method not part of the abstract interface."""
76
- return "Just extra"
77
-
78
- version: str = "1.0"
@@ -1,45 +0,0 @@
1
- from abc import ABC, abstractmethod
2
- from typing import List, Dict
3
-
4
- class IDataProcessor(ABC):
5
- """Interfaz para procesamiento de datos."""
6
-
7
- @property
8
- @abstractmethod
9
- def config(self) -> Dict[str, str]:
10
- """Configuración del procesador."""
11
- pass
12
-
13
- @abstractmethod
14
- def process(self, data: List[float]) -> Dict[str, float]:
15
- """Procesa una lista de números y devuelve métricas."""
16
- pass
17
-
18
- @abstractmethod
19
- def validate_input(self, raw_data: str) -> bool:
20
- """Valida si los datos en crudo pueden ser procesados."""
21
- pass
22
-
23
- class FakeDataProcessor:
24
- """Implementación concreta fake de IDataProcessor."""
25
-
26
- def __init__(self):
27
- self._config = {"mode": "standard"}
28
- self._version = "1.0"
29
-
30
- @property
31
- def config(self) -> Dict[str, str]:
32
- """Implementación correcta de la propiedad."""
33
- return self._config
34
-
35
- def process(self, values: List[float]) -> Dict[str, float]:
36
- """Implementación con tipo de retorno incorrecto (float vs Dict)."""
37
- return sum(values) / len(values) if values else 0.0
38
-
39
- def validate_input(self, source: str) -> bool:
40
- """Implementación con parámetro renombrado (source vs raw_data)."""
41
- return bool(source)
42
-
43
- def extra_method(self) -> str:
44
- """Método adicional no definido en la interfaz."""
45
- return f"Processing with version {self._version}"