From d0f926f8d324c6dd9698b027fee4a07bf4d9addc Mon Sep 17 00:00:00 2001 From: Christian Ledermann Date: Mon, 25 Nov 2024 17:07:49 +0000 Subject: [PATCH] ruff update fixes --- fastkml/__init__.py | 46 ++++++++++++++++++++++----------------------- fastkml/base.py | 4 ++-- fastkml/registry.py | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/fastkml/__init__.py b/fastkml/__init__.py index d17b4a43..736054e2 100644 --- a/fastkml/__init__.py +++ b/fastkml/__init__.py @@ -62,36 +62,36 @@ __all__ = [ "KML", + "AtomAuthor", + "AtomContributor", + "AtomLink", + "BalloonStyle", + "Camera", + "Data", "Document", + "ExtendedData", "Folder", "GroundOverlay", - "Placemark", - "TimeSpan", - "TimeStamp", - "ExtendedData", - "Data", + "Icon", + "IconStyle", + "LabelStyle", + "LineString", + "LineStyle", + "LinearRing", + "Link", + "LookAt", + "MultiGeometry", "PhotoOverlay", + "Placemark", + "Point", + "PolyStyle", + "Polygon", "Schema", "SchemaData", "ScreenOverlay", - "StyleUrl", "Style", "StyleMap", - "IconStyle", - "LineStyle", - "PolyStyle", - "LabelStyle", - "BalloonStyle", - "AtomLink", - "Icon", - "Link", - "Point", - "LineString", - "LinearRing", - "Polygon", - "MultiGeometry", - "AtomAuthor", - "AtomContributor", - "Camera", - "LookAt", + "StyleUrl", + "TimeSpan", + "TimeStamp", ] diff --git a/fastkml/base.py b/fastkml/base.py index ca2c7c21..8fa9d875 100644 --- a/fastkml/base.py +++ b/fastkml/base.py @@ -83,8 +83,8 @@ def __init__( self.ns: str = ( self.name_spaces.get(self._default_nsid, "") if ns is None else ns ) - for arg in kwargs: - setattr(self, arg, kwargs[arg]) + for arg, val in kwargs.items(): + setattr(self, arg, val) self.__kwarg_keys = tuple(kwargs.keys()) def __repr__(self) -> str: diff --git a/fastkml/registry.py b/fastkml/registry.py index a2a5957e..76023093 100644 --- a/fastkml/registry.py +++ b/fastkml/registry.py @@ -189,4 +189,4 @@ def get(self, cls: Type["_XMLObject"]) -> List[RegistryItem]: registry = Registry() -__all__ = ["registry", "RegistryItem"] +__all__ = ["RegistryItem", "registry"]