Skip to content

Commit

Permalink
🏷️ Quick typing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed May 22, 2024
1 parent 1bac703 commit 8eff1f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/openforms/config/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def is_plugin(plugin: Any) -> TypeIs[AbstractBasePlugin]:


class ConfigurationCheck:
def __init__(self, requested_plugin: AbstractBasePlugin = None) -> None:
def __init__(self, requested_plugin: str | None = None) -> None:
self.requested_plugin = requested_plugin

def get_configuration_results(
Expand All @@ -54,9 +54,9 @@ def get_configuration_results(
"name": _("Address lookup plugins"),
"entries": [
self.get_plugin_entry(
BAGCheck,
BAGCheck(),
), # Location client
self.get_plugin_entry(LocatieServerCheck), # Kadaster search
self.get_plugin_entry(LocatieServerCheck()), # Kadaster search
],
},
]
Expand All @@ -67,8 +67,8 @@ def get_configuration_results(
"name": _("Validator plugins"),
"entries": [
# uses KVK 'zoeken' client
self.get_plugin_entry(KVKRemoteValidatorCheck),
self.get_plugin_entry(BRKValidatorCheck),
self.get_plugin_entry(KVKRemoteValidatorCheck()),
self.get_plugin_entry(BRKValidatorCheck()),
],
},
]
Expand Down Expand Up @@ -121,7 +121,7 @@ def get_plugin_entry(self, plugin: AbstractBasePlugin | ConfigCheckable) -> Entr
try:
actions = plugin.get_config_actions()
except Exception as e:
actions = [
actions: list[tuple[str, str]] = [

Check warning on line 124 in src/openforms/config/checks.py

View check run for this annotation

Codecov / codecov/patch

src/openforms/config/checks.py#L124

Added line #L124 was not covered by tests
(
_("Internal error: {exception}").format(exception=e),
"",
Expand Down
2 changes: 1 addition & 1 deletion src/openforms/formio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get_readable_path_from_configuration_path(
return " > ".join(keys_path)


def is_layout_component(component):
def is_layout_component(component: Component) -> bool:
# Adapted from isLayoutComponent util function in Formio
# https://github.com/formio/formio.js/blob/4.13.x/src/utils/formUtils.js#L25
column = component.get("columns")
Expand Down

0 comments on commit 8eff1f3

Please sign in to comment.