Skip to content

Commit

Permalink
chore: Enable type checking in meltano.core.hub (meltano#6708)
Browse files Browse the repository at this point in the history
chore: Enable type checking in meltano.core.hub
  • Loading branch information
edgarrmondragon committed Sep 6, 2022
1 parent 6f98f5b commit a9dc3da
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
6 changes: 5 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,9 @@ def mypy(session: Session) -> None:
args = session.posargs or ["src/meltano"]

session.install(".")
session.install("mypy", "sqlalchemy2-stubs")
session.install(
"mypy",
"sqlalchemy2-stubs",
"types-requests",
)
session.run("mypy", *args)
29 changes: 28 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ pytest-randomly = "^3.12"
pyupgrade = "^2.29.1"
requests-mock = "^1.6.0"
tox = "^3.24.4"
types-requests = "^2.28.9"
wemake-python-styleguide = "^0.16.1"

[tool.poetry.scripts]
Expand Down Expand Up @@ -221,7 +222,6 @@ module = [
"meltano.core.bundle.*",
"meltano.core.compiler.*",
"meltano.core.container.*",
"meltano.core.hub.*",
"meltano.core.job.*",
"meltano.core.legacy_tracking.*",
"meltano.core.logging.*",
Expand Down
10 changes: 7 additions & 3 deletions src/meltano/core/plugin_discovery_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ def find_definition(
self,
plugin_type: PluginType,
plugin_name: str,
**kwargs,
variant_name: str | None = None,
) -> PluginDefinition:
"""Find a plugin definition.
Args:
plugin_type: The type of plugin to find.
plugin_name: The name of the plugin to find.
kwargs: Additional arguments to pass to the finder.
variant_name: The name of the variant to find.
"""
... # noqa: WPS428

Expand Down Expand Up @@ -374,13 +374,17 @@ def plugins(self) -> Iterable[PluginDefinition]:
)

def find_definition(
self, plugin_type: PluginType, plugin_name: str
self,
plugin_type: PluginType,
plugin_name: str,
variant_name: str | None = None,
) -> PluginDefinition:
"""Find a plugin definition by type and name.
Args:
plugin_type: The plugin type.
plugin_name: The plugin name.
variant_name: The plugin variant name.
Returns:
The plugin definition.
Expand Down

0 comments on commit a9dc3da

Please sign in to comment.