Skip to content

Commit

Permalink
Fix Python source type in report (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
fvaleye committed Feb 1, 2022
1 parent 6f64221 commit 6da5f57
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "metadata_guardian-python"
version = "0.2.0"
version = "0.2.1"
authors = ["Florian Valeye <fvaleye@github.com>"]
homepage = "https://fvaleye.github.io/metadata-guardian/python"
license = "Apache-2.0"
Expand Down
14 changes: 7 additions & 7 deletions python/metadata_guardian/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ def scan_local(self, source: LocalMetadataSource) -> MetadataGuardianReport:
:return: a Metadata Guardian report
"""
logger.debug(
f"[blue]Launch the metadata scanning of the local provider {source.type}"
f"[blue]Launch the metadata scanning of the local provider {source.type()}"
)
with ProgressionBar(disable=self.progression_bar_disabled) as progression_bar:
progression_bar.add_task_with_item(
item_name=source.local_path,
source_type=str(source.type),
source_type=source.type(),
total=1,
)
words = [
Expand Down Expand Up @@ -123,13 +123,13 @@ def scan_external(
:return: a Metadata Guardian report
"""
logger.debug(
f"[blue]Launch the metadata scanning of the external provider {source.type} for {database_name}"
f"[blue]Launch the metadata scanning of the external provider {source.type()} for {database_name}"
)
with ProgressionBar(disable=self.progression_bar_disabled) as progression_bar:
if table_name:
progression_bar.add_task_with_item(
item_name=database_name,
source_type=str(source.type),
source_type=source.type(),
total=1,
current_item=table_name,
)
Expand Down Expand Up @@ -158,7 +158,7 @@ def scan_external(
)
progression_bar.add_task_with_item(
item_name=database_name,
source_type=str(source.type),
source_type=source.type(),
total=len(table_names_list),
)

Expand Down Expand Up @@ -206,7 +206,7 @@ async def scan_external_async(
"""
semaphore = asyncio.Semaphore(tasks_limit)
logger.debug(
f"[blue]Launch asynchronously the metadata scanning of the external provider {source.type} for the database {database_name}"
f"[blue]Launch asynchronously the metadata scanning of the external provider {source.type()} for the database {database_name}"
)

async def async_validate_words(
Expand Down Expand Up @@ -252,7 +252,7 @@ async def async_validate_words(
]
progression_bar.add_task_with_item(
item_name=database_name,
source_type=str(source.type),
source_type=source.type(),
total=len(tasks),
)
report_results = await asyncio.gather(*tasks)
Expand Down

0 comments on commit 6da5f57

Please sign in to comment.