Skip to content

Commit

Permalink
set target python3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmeagher committed Oct 28, 2024
1 parent 98e04d8 commit 9091850
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
9 changes: 3 additions & 6 deletions multizone.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@

import argparse
import sys
import zoneinfo
from datetime import datetime, timedelta, tzinfo
from pathlib import Path
from typing import Any, Dict
from typing import Any

import tabulate
import tzlocal
from babel.core import default_locale
from babel.dates import format_datetime
from termcolor import colored

if sys.version_info < (3, 9):
from backports import zoneinfo
else:
import zoneinfo
if sys.version_info < (3, 10):
from xdg import xdg_config_home
else:
Expand All @@ -35,7 +32,7 @@
else:
import tomllib

ConfigType = Dict[str, Any]
ConfigType = dict[str, Any]


def get_arg(time_str: str, sep: str) -> list[int]:
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@ max-line-length = "108"
disable = "R0912,R0914"

[tool.ruff]
line-length = 108
target-version = "py39"

[tool.ruff.lint]
fixable = ["D", "I", "COM"]
ignore = [
"S101", # assert
"D213", # multi-line-summary-second-line incompatible with multi-line-summary-first-line
"D203" # one-blank-line-before-class" incompatible with no-blank-line-before-class
]
line-length = 108
select = ["ALL"]
target-version = "py39"

[tool.ruff.per-file-ignores]
"test_mz.py" = ["PLR2004"]
Expand Down
6 changes: 1 addition & 5 deletions test_mz.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@
from datetime import datetime
from pathlib import Path
from unittest.mock import MagicMock, mock_open, patch
from zoneinfo import ZoneInfo

import pytest
from babel.core import default_locale

import multizone

if sys.version_info < (3, 9):
from backports.zoneinfo import ZoneInfo
else:
from zoneinfo import ZoneInfo


def test_parse_time_args() -> None:
"""Tests parse_time_args()."""
Expand Down

0 comments on commit 9091850

Please sign in to comment.