Skip to content

Commit 9e08ec9

Browse files
committed
formatting
Signed-off-by: lafirm <136463254+lafirm@users.noreply.github.com>
1 parent f22cc38 commit 9e08ec9

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

sqlmesh/core/node.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def dbt_fqn(self) -> t.Optional[str]:
259259
IntervalUnit.FIVE_MINUTE: 60 * 5,
260260
}
261261

262-
def _cron_tz_validator(cls, v: t.Any) -> t.Optional[zoneinfo.ZoneInfo]:
262+
263+
def _cron_tz_validator(cls: t.Type, v: t.Any) -> t.Optional[zoneinfo.ZoneInfo]:
263264
if not v or v == "UTC":
264265
return None
265266

@@ -279,6 +280,7 @@ def _cron_tz_validator(cls, v: t.Any) -> t.Optional[zoneinfo.ZoneInfo]:
279280

280281
return None
281282

283+
282284
cron_tz_validator = field_validator("cron_tz", mode="before")(_cron_tz_validator)
283285

284286

tests/core/test_config.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ def test_gateway_model_defaults(tmp_path):
967967
def test_model_defaults_cron_tz(tmp_path):
968968
"""Test that cron_tz can be set in model_defaults."""
969969
import zoneinfo
970-
970+
971971
config_path = tmp_path / "config_model_defaults_cron_tz.yaml"
972972
with open(config_path, "w", encoding="utf-8") as fd:
973973
fd.write(
@@ -992,13 +992,11 @@ def test_model_defaults_cron_tz(tmp_path):
992992
def test_gateway_model_defaults_cron_tz(tmp_path):
993993
"""Test that cron_tz can be set in gateway-specific model_defaults."""
994994
import zoneinfo
995-
995+
996996
global_defaults = ModelDefaultsConfig(
997997
dialect="snowflake", owner="foo", cron="@daily", cron_tz="UTC"
998998
)
999-
gateway_defaults = ModelDefaultsConfig(
1000-
dialect="duckdb", cron_tz="America/New_York"
1001-
)
999+
gateway_defaults = ModelDefaultsConfig(dialect="duckdb", cron_tz="America/New_York")
10021000

10031001
config = Config(
10041002
gateways={

0 commit comments

Comments
 (0)