Skip to content

Commit

Permalink
build(postgres): add __future__ annotations
Browse files Browse the repository at this point in the history
supports python 3.9

use log_info instead of print and updates a few pre-commit dependencies
  • Loading branch information
Karl Wooster committed Jun 24, 2024
1 parent aa4f0ec commit 142ae39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ repos:
hooks:
- id: check-json5
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.7
rev: v0.4.10
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py311-plus,--py36-plus,--py37-plus,--py38-plus,--py39-plus,--py310-plus,--py311-plus,--py312-plus]
args: [--py36-plus,--py37-plus,--py38-plus,--py39-plus,--py310-plus,--py311-plus,--py312-plus]
6 changes: 4 additions & 2 deletions bridge/service/postgres.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging
import os
import sys
Expand All @@ -7,7 +9,7 @@
import psycopg
from pydantic import BaseModel, Field

from bridge.console import log_error, log_task
from bridge.console import log_error, log_info, log_task
from bridge.service.docker import ContainerConfig, DockerService
from bridge.utils.filesystem import resolve_dot_bridge

Expand Down Expand Up @@ -63,7 +65,7 @@ def __init__(
def ensure_ready(self):
dsn = self.config.environment.dsn
msg = f"DSN: {dsn}"
print(msg)
log_info(msg)
with log_task(
start_message=f"Waiting for [white]{self.config.name}[/white] to be ready",
end_message=f"[white]{self.config.name}[/white] is ready",
Expand Down

0 comments on commit 142ae39

Please sign in to comment.