mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-10 15:46:51 +02:00
Fix Pylint warnings.
This commit is contained in:
parent
11596c4cd8
commit
868a417afc
19 changed files with 137 additions and 148 deletions
|
@ -127,9 +127,9 @@ class OSMNode(Tagged):
|
|||
def from_xml_structure(cls, element: Element) -> "OSMNode":
|
||||
"""Parse node from OSM XML `<node>` element."""
|
||||
attributes = element.attrib
|
||||
tags: dict[str, str] = dict(
|
||||
[(x.attrib["k"], x.attrib["v"]) for x in element if x.tag == "tag"]
|
||||
)
|
||||
tags: dict[str, str] = {
|
||||
x.attrib["k"]: x.attrib["v"] for x in element if x.tag == "tag"
|
||||
}
|
||||
return cls(
|
||||
tags,
|
||||
int(attributes["id"]),
|
||||
|
@ -182,9 +182,9 @@ class OSMWay(Tagged):
|
|||
) -> "OSMWay":
|
||||
"""Parse way from OSM XML `<way>` element."""
|
||||
attributes = element.attrib
|
||||
tags: dict[str, str] = dict(
|
||||
[(x.attrib["k"], x.attrib["v"]) for x in element if x.tag == "tag"]
|
||||
)
|
||||
tags: dict[str, str] = {
|
||||
x.attrib["k"]: x.attrib["v"] for x in element if x.tag == "tag"
|
||||
}
|
||||
return cls(
|
||||
tags,
|
||||
int(element.attrib["id"]),
|
||||
|
@ -302,8 +302,6 @@ class NotWellFormedOSMDataException(Exception):
|
|||
OSM data structure is not well-formed.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class OSMData:
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue