Dyndesign

Latest version: v1.1.0

Safety actively analyzes 632592 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.1.0

Class Builder:
- To support different local configurations for specific groups of class configurations, the `dyconfig` decorator now allows multiple configuration units to be passed as positional arguments.
- Added the `structured_component_type` component configuration setting to instantiate components within a data structure of the specified type assigned to the `component_attr` attribute, instead of directly within `component_attr`.
- Added the `init_args_from_option` component configuration setting to initialize a Component Dependency using the value of the corresponding Building Option as the first argument for the constructor.
- Added the `force_add` configuration setting to force a dependency to be added to the built class regardless of the value of the associated Building Option.
- To emphasize that the configuration passed within a unit is specific to that unit, the keywords "GLOBAL_DYNCONFIG" and "GlobalClassConfig" have been renamed to "DYNDESIGN_LOCAL_CONFIG" and "LocalClassConfig", respectively.
- Fixed an issue where the class assigned to `dynconfig.SWITCH_DEFAULT` was not instantiated when building a class with a Building Option that is not among the available switch options.

1.0.0

Introducing the `classbuilder` function for building a new class through the integration of Dependent Classes into a Base class, driven by selected Configuration Options.
The Dependent Classes can be either **Parent** classes or **Component** classes.

Additional Changes:
- In `safeinvoke`, the `fallback` parameter has been relocated after the positional `args` parameters that are to be passed to the function/method.
- `safesuper` is now available as a standalone function as well as method inherited from `DynInheritance`.

0.9.8

Dynamic Inheritance feature is added to DynDesign, enabling classes to dynamically modify their superclass set and enhance flexibility in class design.

0.9.7

Default `strict_merged_args` value is set to True, so that a `TypeError` exception is raised by default if positional arguments are missing when invoking constructor `__init__` or other methods listed in `invoke_all`. If `strict_merged_args` is set to False, then the methods are silently skipped in case of missing positional arguments.

0.9.6

If positional arguments are missing when invoking constructor `__init__` and other methods listed in `invoke_all`, the methods are skipped unless option `strict_merged_args` of `mergeclasses` is set to True. In the latter case, a `TypeError` exception is raised.

0.9.5

Method decoration using Dynamic Decorators can be disabled at runtime through the instance property whose name is passed as the argument `disable_property` of `decoratewith`.
If the property is found in the instance object and is True, then the wrapped function is not decorated.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.