Skip to content

Commit

Permalink
chore: Update ruff to python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
rumpelsepp committed Jan 2, 2024
1 parent 7b34f3b commit dd8bb88
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module = [
ignore_missing_imports = true

[tool.ruff]
target-version = "py310"
target-version = "py311"

[tool.ruff.lint]
select = [
Expand Down
6 changes: 3 additions & 3 deletions src/gallia/command/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import sys
from abc import ABC, abstractmethod
from argparse import ArgumentParser, Namespace
from datetime import datetime, timezone
from datetime import UTC, datetime
from enum import Enum, unique
from pathlib import Path
from subprocess import CalledProcessError, run
Expand Down Expand Up @@ -268,7 +268,7 @@ async def _db_insert_run_meta(self, args: Namespace) -> None:
arguments=sys.argv[1:],
command_meta=msgspec.json.encode(self.run_meta.command_meta),
settings=dump_args(args),
start_time=datetime.now(timezone.utc).astimezone(),
start_time=datetime.now(UTC).astimezone(),
path=self.artifacts_dir,
)

Expand All @@ -277,7 +277,7 @@ async def _db_finish_run_meta(self) -> None:
if self.db_handler.meta is not None:
try:
await self.db_handler.complete_run_meta(
datetime.now(timezone.utc).astimezone(),
datetime.now(UTC).astimezone(),
self.run_meta.exit_code,
self.artifacts_dir,
)
Expand Down
2 changes: 1 addition & 1 deletion src/gallia/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# SPDX-License-Identifier: Apache-2.0

import os
import tomllib
from pathlib import Path
from typing import Any

import tomllib
from platformdirs import user_config_path
from pygit2 import discover_repository

Expand Down
6 changes: 3 additions & 3 deletions src/gallia/services/uds/ecu.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import asyncio
from asyncio import Task
from datetime import datetime, timezone
from datetime import UTC, datetime
from typing import TYPE_CHECKING, Any

from gallia.db.log import LogMode
Expand Down Expand Up @@ -479,12 +479,12 @@ async def _request(
"""
response = None
exception: Exception | None = None
send_time = datetime.now(timezone.utc).astimezone()
send_time = datetime.now(UTC).astimezone()
receive_time = None

try:
response = await super()._request(request, config)
receive_time = datetime.now(timezone.utc).astimezone()
receive_time = datetime.now(UTC).astimezone()
return response
except ResponseException as e:
exception = e
Expand Down

0 comments on commit dd8bb88

Please sign in to comment.