diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb0e0e7..faf72b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,13 +19,20 @@ jobs: - python-version: "3.10" env: TOXENV: py - - python-version: "3.10" + - python-version: "3.11" + env: + TOXENV: py + - python-version: "3.12" + env: + TOXENV: py + - python-version: "3.13" + env: + TOXENV: py + - python-version: "3.13" env: TOXENV: mypy - steps: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: diff --git a/price_parser/parser.py b/price_parser/parser.py index 0a0f8ba..5f193d1 100644 --- a/price_parser/parser.py +++ b/price_parser/parser.py @@ -56,8 +56,8 @@ def fromstring( currency = extract_currency_symbol(price, currency_hint) if currency is not None: currency = currency.strip() - if digit_group_separator and price is not None: - price = price.replace(digit_group_separator, "") + if digit_group_separator is not None and price is not None: + price = price.replace(digit_group_separator, '') amount_text = extract_price_text(price) if price is not None else None amount_num = ( parse_number(amount_text, decimal_separator) diff --git a/setup.py b/setup.py index 47a8c08..cfc200f 100755 --- a/setup.py +++ b/setup.py @@ -19,14 +19,19 @@ ], zip_safe=False, classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ], ) diff --git a/tox.ini b/tox.ini index b695b05..f6e7389 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36,py37,py38,mypy +envlist = py36,py37,py38,py39,py310,py311,py312,py313,mypy [testenv] deps =