chore: improved compatibility with Python 3.11 and above

Uses `tomllib` when available for Python 3.11+ and falls back to `tomli` for older versions.

This avoids deprecation warnings and ensures compatibility across different Python versions.
This commit is contained in:
kinoshitakenta 2025-05-27 16:38:04 +08:00
parent 6de63bfdb5
commit b891684c0c
Signed by: kinoshitakenta
GPG Key ID: A811E8CA36EF425E
1 changed files with 5 additions and 1 deletions

View File

@ -1,8 +1,12 @@
import getpass
import sys
import time
from pathlib import WindowsPath
import tomli
if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select