Skip to content

Commit

Permalink
fix: 3.11 dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
metaist committed Dec 31, 2023
1 parent ba8284e commit 747b4f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
"mypy",
"optvar",
"pdoc",
"pypi",
"pyright",
"setuptools",
"startswith",
"tomli"
"tomli",
"venv"
]
}
14 changes: 11 additions & 3 deletions src/attrbox/config.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""Configuration loading and parsing."""

# native
# std
import sys
from inspect import cleandoc
from pathlib import Path
from typing import Any
from typing import Callable
from typing import Dict
from typing import List
from typing import LiteralString
from typing import Mapping
from typing import Optional
from typing import Sequence
Expand All @@ -16,12 +16,20 @@

# lib
from docopt import docopt
import tomli as tomllib # TODO 2026-10-04 [3.10 EOL]: switch to native tomllib

# pkg
from .attrdict import AttrDict
from . import env

# TODO 2026-10-04 [3.10 EOL]: remove conditional
if sys.version_info >= (3, 11):
from typing import LiteralString
import tomllib
else: # pragma: no cover
import tomli as tomllib

LiteralString = str

PYTHON_KEYWORDS: List[
LiteralString
] = """\
Expand Down

0 comments on commit 747b4f8

Please sign in to comment.