Skip to content

Commit 142ae39

Browse files
author
Karl Wooster
committed
build(postgres): add __future__ annotations
supports python 3.9 use log_info instead of print and updates a few pre-commit dependencies
1 parent aa4f0ec commit 142ae39

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Diff for: .pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ repos:
2626
hooks:
2727
- id: check-json5
2828
- repo: https://github.com/astral-sh/ruff-pre-commit
29-
rev: v0.4.7
29+
rev: v0.4.10
3030
hooks:
3131
- id: ruff
3232
args: [--fix, --exit-non-zero-on-fix]
3333
- id: ruff-format
3434
- repo: https://github.com/asottile/pyupgrade
35-
rev: v3.15.2
35+
rev: v3.16.0
3636
hooks:
3737
- id: pyupgrade
38-
args: [--py311-plus,--py36-plus,--py37-plus,--py38-plus,--py39-plus,--py310-plus,--py311-plus,--py312-plus]
38+
args: [--py36-plus,--py37-plus,--py38-plus,--py39-plus,--py310-plus,--py311-plus,--py312-plus]

Diff for: bridge/service/postgres.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import logging
24
import os
35
import sys
@@ -7,7 +9,7 @@
79
import psycopg
810
from pydantic import BaseModel, Field
911

10-
from bridge.console import log_error, log_task
12+
from bridge.console import log_error, log_info, log_task
1113
from bridge.service.docker import ContainerConfig, DockerService
1214
from bridge.utils.filesystem import resolve_dot_bridge
1315

@@ -63,7 +65,7 @@ def __init__(
6365
def ensure_ready(self):
6466
dsn = self.config.environment.dsn
6567
msg = f"DSN: {dsn}"
66-
print(msg)
68+
log_info(msg)
6769
with log_task(
6870
start_message=f"Waiting for [white]{self.config.name}[/white] to be ready",
6971
end_message=f"[white]{self.config.name}[/white] is ready",

0 commit comments

Comments
 (0)