Skip to content

Commit

Permalink
Add a couple of typing annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Jun 1, 2024
1 parent 85f9dd8 commit 796810d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/hatch_odoo/build_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import shutil
import tempfile
from pathlib import Path
from typing import Any

from hatchling.builders.hooks.plugin.interface import BuildHookInterface

Expand All @@ -19,7 +20,7 @@ class OdooAddonsDirsBuildHook(BuildHookInterface):

PLUGIN_NAME = "odoo-addons-dirs"

def initialize(self, version, build_data):
def initialize(self, version: str, build_data: dict[str, Any]) -> None:
if self.target_name != "wheel":
return
hatch_odoo_config = load_hatch_odoo_config(self.root)
Expand Down
2 changes: 1 addition & 1 deletion src/hatch_odoo/metadata_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _get_odooo_addons_dependencies(self) -> List[str]:
dependencies.update(addon_dependencies)
return list(dependencies)

def update(self, metadata):
def update(self, metadata: dict) -> None:
"""Update the project table's metadata."""
if "dependencies" in metadata:
raise ValueError(
Expand Down

0 comments on commit 796810d

Please sign in to comment.