Skip to content

Commit

Permalink
enhance documentation for Registry class usage and its singleton pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Nov 17, 2024
1 parent bc3fd96 commit 539f545
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions fastkml/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
This approach allows for flexible, declarative mapping between XML and Python objects,
with the registry acting as a central configuration for these mappings.
Direct ``Registry`` class use is typically only for library internals or advanced
customization. For normal usage, stick with the ``registry`` instance:
- The library is designed around this global instance.
- Ensures all parts of the library use the same registry.
- Pre-populated with standard KML mappings.
- Singleton pattern: Avoids multiple conflicting registries.
"""

from dataclasses import dataclass
Expand Down Expand Up @@ -116,14 +124,6 @@ class Registry:
- Enable consistent handling of attributes across different KML classes.
- Facilitate extensibility and maintainability of the library.
Direct ``Registry`` class use is typically only for library internals or advanced
customization. For normal usage, stick with the ``registry`` instance:
- The library is designed around this global instance.
- Ensures all parts of the library use the same registry.
- Pre-populated with standard KML mappings.
- Singleton pattern: Avoids multiple conflicting registries.
"""

_registry: Dict[Type["_XMLObject"], List[RegistryItem]]
Expand Down

0 comments on commit 539f545

Please sign in to comment.