diff --git a/core/dbt/events/types.py b/core/dbt/events/types.py index 7446940e719..6a77bbd81e3 100644 --- a/core/dbt/events/types.py +++ b/core/dbt/events/types.py @@ -829,7 +829,7 @@ class InvalidVarsYAML(ErrorLevel, Cli, File): code: str = "A008" def message(self) -> str: - return "The YAML provided in the --vars argument is not valid.\n" + return "The YAML provided in the --vars argument is not valid." # TODO: Remove? (appears to be uncalled) @@ -1605,7 +1605,7 @@ class DepsNotifyUpdatesAvailable(InfoLevel, Cli, File): code: str = "M019" def message(self) -> str: - return ('\nUpdates available for packages: {} \ + return ('Updates available for packages: {} \ \nUpdate your versions in packages.yml, then run dbt deps'.format(self.packages)) @@ -1722,7 +1722,7 @@ class ServingDocsExitInfo(InfoLevel, Cli, File): code: str = "Z020" def message(self) -> str: - return "Press Ctrl+C to exit.\n\n" + return "Press Ctrl+C to exit." @dataclass @@ -1773,7 +1773,7 @@ class StatsLine(InfoLevel, Cli, File): code: str = "Z023" def message(self) -> str: - stats_line = ("\nDone. PASS={pass} WARN={warn} ERROR={error} SKIP={skip} TOTAL={total}") + stats_line = ("Done. PASS={pass} WARN={warn} ERROR={error} SKIP={skip} TOTAL={total}") return stats_line.format(**self.stats) diff --git a/core/dbt/task/deps.py b/core/dbt/task/deps.py index 84d2a11dcad..3f2a86f033a 100644 --- a/core/dbt/task/deps.py +++ b/core/dbt/task/deps.py @@ -10,7 +10,7 @@ from dbt.events.functions import fire_event from dbt.events.types import ( DepsNoPackagesFound, DepsStartPackageInstall, DepsUpdateAvailable, DepsUTD, - DepsInstallInfo, DepsListSubdirectory, DepsNotifyUpdatesAvailable + DepsInstallInfo, DepsListSubdirectory, DepsNotifyUpdatesAvailable, EmptyLine ) from dbt.clients import system @@ -81,6 +81,7 @@ def run(self): source_type=source_type, version=version) if packages_to_upgrade: + fire_event(EmptyLine()) fire_event(DepsNotifyUpdatesAvailable(packages=packages_to_upgrade)) @classmethod diff --git a/core/dbt/task/printer.py b/core/dbt/task/printer.py index c2b51196219..1cb70ec5848 100644 --- a/core/dbt/task/printer.py +++ b/core/dbt/task/printer.py @@ -65,6 +65,8 @@ def print_run_status_line(results) -> None: stats[result_type] += 1 stats['total'] += 1 + with TextOnly(): + fire_event(EmptyLine()) fire_event(StatsLine(stats=stats)) diff --git a/core/dbt/task/runnable.py b/core/dbt/task/runnable.py index f335d1870f2..f8d5e7bbcf1 100644 --- a/core/dbt/task/runnable.py +++ b/core/dbt/task/runnable.py @@ -459,7 +459,9 @@ def run(self): ) if len(self._flattened_nodes) == 0: - warn_or_error("\nWARNING: Nothing to do. Try checking your model " + with TextOnly(): + fire_event(EmptyLine()) + warn_or_error("WARNING: Nothing to do. Try checking your model " "configs and model specification args") result = self.get_result( results=[], diff --git a/core/dbt/task/serve.py b/core/dbt/task/serve.py index 890241a9931..5e38fc371aa 100644 --- a/core/dbt/task/serve.py +++ b/core/dbt/task/serve.py @@ -6,7 +6,7 @@ from http.server import SimpleHTTPRequestHandler from socketserver import TCPServer from dbt.events.functions import fire_event -from dbt.events.types import ServingDocsPort, ServingDocsAccessInfo, ServingDocsExitInfo +from dbt.events.types import ServingDocsPort, ServingDocsAccessInfo, ServingDocsExitInfo, EmptyLine from dbt.task.base import ConfiguredTask @@ -22,6 +22,8 @@ def run(self): fire_event(ServingDocsPort(address=address, port=port)) fire_event(ServingDocsAccessInfo(port=port)) + fire_event(EmptyLine()) + fire_event(EmptyLine()) fire_event(ServingDocsExitInfo()) # mypy doesn't think SimpleHTTPRequestHandler is ok here, but it is