Compare commits

...

3 Commits

Author SHA1 Message Date
Nathaniel May
5c75b25ec0 color version for testing only. 2021-12-13 15:47:57 -05:00
Nathaniel May
28665e3c4c changelog entry 2021-12-13 14:28:20 -05:00
Nathaniel May
7aaad400b2 call colorama.init for system compat 2021-12-13 13:34:27 -05:00
3 changed files with 8 additions and 3 deletions

View File

@@ -2,7 +2,8 @@
### Fixes
- Fix wrong url in the dbt docs overview homepage ([#4442](https://github.com/dbt-labs/dbt-core/pull/4442))
- Fix redefined status param of SQLQueryStatus to typecheck the string which passes on `._message` value of `AdapterResponse` or the `str` value sent by adapter plugin. ([#4463](https://github.com/dbt-labs/dbt-core/pull/4463#issuecomment-990174166))
- Fix redefined status param of SQLQueryStatus to typecheck the string which passes on `._message` value of `AdapterResponse` or the `str` value sent by adapter plugin. ([#4463](https://github.com/dbt-labs/dbt-core/pull/4463#issuecomment-990174166))
- Fix escape sequences so colored log output is system compatible. ([#4443](https://github.com/dbt-labs/dbt-core/issues/4443))
Contributors:
- [remoyson](https://github.com/remoyson) ([#4442](https://github.com/dbt-labs/dbt-core/pull/4442))

View File

@@ -1,4 +1,4 @@
from colorama import init as init_colorama
from colorama import Style
from datetime import datetime
import dbt.events.functions as this # don't worry I hate it too.
@@ -48,6 +48,9 @@ format_color = True
format_json = False
invocation_id: Optional[str] = None
# have colorama read information about the system for compatibility reasons
init_colorama()
def setup_event_logger(log_path, level_override=None):
# flags have been resolved, and log_path is known

View File

@@ -131,7 +131,8 @@ class MainReportVersion(InfoLevel, Cli, File):
code: str = "A001"
def message(self):
return f"Running with dbt{self.v}"
from colorama import Fore, Style
return f"{Fore.RED}Running with dbt{self.v}{Style.RESET_ALL}"
@dataclass