Skip to content

Commit

Permalink
-unused import; warn if no toml available
Browse files Browse the repository at this point in the history
  • Loading branch information
eloquence committed Oct 25, 2023
1 parent 4d11da0 commit edd42ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
Shared functions between various scripts
"""
import re
import sys

try:
import tomllib
except ModuleNotFoundError:
# pre-Python 3.11 compatibility
import toml as tomllib
try:
import toml as tomllib
except ModuleNotFoundError:
print("WARNING: Could not find tomllib or toml, Poetry support unavailable.")

from pathlib import Path

RE_NAME = re.compile(r'name="(.*?)"')
Expand Down

0 comments on commit edd42ab

Please sign in to comment.