Skip to content

Commit 705fcc3

Browse files
committed
formatting
1 parent 51b475e commit 705fcc3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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
@@ -933,7 +933,7 @@ def test_gateway_model_defaults(tmp_path):
933933
def test_model_defaults_cron_tz(tmp_path):
934934
"""Test that cron_tz can be set in model_defaults."""
935935
import zoneinfo
936-
936+
937937
config_path = tmp_path / "config_model_defaults_cron_tz.yaml"
938938
with open(config_path, "w", encoding="utf-8") as fd:
939939
fd.write(
@@ -958,13 +958,11 @@ def test_model_defaults_cron_tz(tmp_path):
958958
def test_gateway_model_defaults_cron_tz(tmp_path):
959959
"""Test that cron_tz can be set in gateway-specific model_defaults."""
960960
import zoneinfo
961-
961+
962962
global_defaults = ModelDefaultsConfig(
963963
dialect="snowflake", owner="foo", cron="@daily", cron_tz="UTC"
964964
)
965-
gateway_defaults = ModelDefaultsConfig(
966-
dialect="duckdb", cron_tz="America/New_York"
967-
)
965+
gateway_defaults = ModelDefaultsConfig(dialect="duckdb", cron_tz="America/New_York")
968966

969967
config = Config(
970968
gateways={

0 commit comments

Comments
 (0)