Skip to content

Commit bb26aeb

Browse files
committed
Fix format, typing, linting errors
1 parent b191a38 commit bb26aeb

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

arho_feature_template/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from typing import TYPE_CHECKING
33

44
from arho_feature_template.qgis_plugin_tools.infrastructure.debugging import (
5-
setup_debugpy, # noqa F401
6-
setup_ptvsd, # noqa F401
7-
setup_pydevd, # noqa F401
5+
setup_debugpy, # noqa: F401
6+
setup_ptvsd, # noqa: F401
7+
setup_pydevd, # noqa: F401
88
)
99

1010
if TYPE_CHECKING:

arho_feature_template/core/feature_template_library.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FeatureTemplateLibrary:
1313
"""Class for storing FeatureTemplates and loading them from a JSON (or other conf. file)."""
1414

1515
def __init__(self, json_path: str | PathLike):
16-
self.templates = []
16+
self.templates: list[FeatureTemplate] = []
1717
library_dict = self.read_json(json_path)
1818
self.build_templates(library_dict)
1919

@@ -23,13 +23,13 @@ def read_json(self, json_path: str | PathLike) -> dict:
2323
return json.load(f)
2424

2525
def build_templates(self, library_dict: dict):
26-
templates = []
26+
templates: list[FeatureTemplate] = []
2727

2828
_templates_raw = library_dict["templates"]
2929
# for template_raw in templates_raw:
30-
## ... build FeatureTemplate from dict here, in FeatureTemplate class or elsewhere?
31-
# template = FeatureTemplate()
32-
# templates.append(template)
30+
## ... build FeatureTemplate from dict here, in FeatureTemplate class or elsewhere?
31+
# template = FeatureTemplate()
32+
# templates.append(template)
3333
self.templates = templates
3434

3535
def get_templates(self) -> Sequence[FeatureTemplate]:

arho_feature_template/core/forms/add_feature_form.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __init__(self, feature_template: FeatureTemplate):
1010

1111
def _init_feature_attributes(self):
1212
# for feature_attribute in self.feature_template.feature_attributes:
13-
# # Create the form here, add rows with labels and input fields
13+
# # Create the form here, add rows with labels and input fields
1414
pass
1515

1616
def save(self):

arho_feature_template/core/forms/feature_attribute_form.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
ui_path = resources.files(__package__) / "feature_attribute_form.ui"
99
FormClass, _ = uic.loadUiType(ui_path)
1010

11-
class FeatureAttributeForm(QDialog, FormClass):
11+
12+
class FeatureAttributeForm(QDialog, FormClass): # type: ignore
1213
"""Parent class for feature forms for adding and modifying feature attribute data."""
1314

1415
def __init__(self, feature_template: FeatureTemplate):

arho_feature_template/core/panels/template_library_panel.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
ui_path = resources.files(__package__) / "template_library_panel.ui"
99
FormClass, _ = uic.loadUiType(ui_path)
1010

11-
class TemplateLibraryPanel(QWidget, FormClass):
11+
12+
class TemplateLibraryPanel(QWidget, FormClass): # type: ignore
1213
"""Dock widget for selecting a feature template."""
1314

1415
def __init__(self, feature_template_library: FeatureTemplateLibrary):

arho_feature_template/plugin.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
LIBRARY_JSON = resources_path("asemakaava-template-library-test.json")
1818

19+
1920
class Plugin:
2021
"""QGIS Plugin Implementation."""
2122

@@ -128,7 +129,7 @@ def unload(self) -> None:
128129
teardown_logger(Plugin.name)
129130

130131
def run(self) -> None:
131-
self.feature_template_dock= QgsDockWidget()
132+
self.feature_template_dock = QgsDockWidget()
132133
self.add_feature_panel = TemplateLibraryPanel(self.active_library)
133134
self.feature_template_dock.setWidget(self.add_feature_panel)
134135
self.feature_template_dock.setWindowTitle("ARHO") # NOTE: Placeholder name

0 commit comments

Comments
 (0)