Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vvmruder committed Dec 12, 2024
1 parent 50faba0 commit e858981
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/qgis_server_light/interface/qgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ class AbstractDataset(LayerLike):

@dataclass
class Source:
pass
@staticmethod
def decide_remote(path: str) -> bool:
return path.startswith("http")


@dataclass
Expand All @@ -98,6 +100,10 @@ class GdalSource(Source):
metadata={"name": "LayerName", "type": "Element", "required": False},
)

@property
def remote(self):
return self.decide_remote(self.path)


@dataclass
class OgrSource(GdalSource):
Expand Down Expand Up @@ -185,6 +191,10 @@ class VectorTileSource(Source):
zmax: str = field(metadata={"name": "Zmax", "type": "Element", "required": True})
zmin: str = field(metadata={"name": "Zmin", "type": "Element", "required": True})

@property
def remote(self):
return self.decide_remote(self.url)


@dataclass
class Crs:
Expand Down

0 comments on commit e858981

Please sign in to comment.