-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dependency optimization: tomli/tomllib
- Loading branch information
1 parent
2b7a4aa
commit 891ec68
Showing
4 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
from __future__ import annotations | ||
|
||
import sys | ||
from pathlib import Path | ||
|
||
import tomli | ||
if sys.version_info < (3, 11): | ||
import tomli as tomllib | ||
else: | ||
import tomllib | ||
|
||
from aiohttp_sqlalchemy import __version__ | ||
|
||
|
||
def test_version() -> None: | ||
with Path("./pyproject.toml").open("rb") as f: | ||
pyproject = tomli.load(f) | ||
pyproject = tomllib.load(f) | ||
version = pyproject["tool"]["poetry"]["version"] | ||
assert __version__ == version |