Skip to content

Commit

Permalink
Merge pull request #90 from weblyzard/feature/python-3.13
Browse files Browse the repository at this point in the history
Feature/python 3.13
  • Loading branch information
AlbertWeichselbraun authored Jan 7, 2025
2 parents 667b356 + 863201a commit 2b30c70
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
jobs:
build:

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]

steps:
- uses: actions/checkout@v3
Expand Down
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "inscriptis"
version = "2.5.0"
version = "2.5.1"
authors = ["Albert Weichselbraun <[email protected]>", "Fabian Odoni <[email protected]>"]
description = "inscriptis - HTML to text converter."
keywords = ["HTML", "converter", "text"]
Expand All @@ -12,11 +12,11 @@ classifiers = [
'Topic :: Text Processing :: Markup :: HTML',
'Topic :: Utilities',
'Programming Language :: Python :: 3',
'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',
]
homepage = "https://github.com/weblyzard/inscriptis"
repository = "https://github.com/weblyzard/inscriptis"
Expand All @@ -39,13 +39,13 @@ web-service = ["fastapi", "uvicorn"]


[tool.poetry.dependencies]
python = "^3.8 || ^3.9 || ^3.10 || ^3.11 || ^3.12"
requests = ">=2.31.0"
python = "^3.9 || ^3.10 || ^3.11 || ^3.12 || ^3.13"
requests = "2.32.2"
lxml = ">=4.9.3"

# optional dependencies
fastapi = { version = "^0.109.0", optional = true }
uvicorn = { version = "^0.25.0", optional = true }
fastapi = { version = "^0.109.1", optional = true }
uvicorn = { version = "^0.27.1", optional = true }


[build-system]
Expand All @@ -56,7 +56,7 @@ build-backend = "poetry.core.masonry.api"
# code formatting with black
[tool.black]
line-length = 88
target-version = ["py38", "py39", "py310", "py311", "py312"]
target-version = ["py39", "py310", "py311", "py312", "py313"]
extend-exclude = '\.html$|\.json$|\.txt$|/a$|/b$'
include = '''
^/src/|^/tests/|^/benchmarking/|^/examples/
Expand Down
2 changes: 1 addition & 1 deletion src/inscriptis/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
__author_email__ = "[email protected], [email protected]"
__copyright__ = (
f"{metadata.metadata(PACKAGE)['Name']} "
+ f"{metadata.metadata(PACKAGE)['Version']} © 2016-2023 {__author__}"
+ f"{metadata.metadata(PACKAGE)['Version']} © 2016-2025 {__author__}"
)
__license__ = metadata.metadata(PACKAGE)["License"]
__version__ = metadata.metadata(PACKAGE)["Version"]
10 changes: 3 additions & 7 deletions src/inscriptis/model/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,9 @@ def apply_attributes(
attributes: the list of attributes
html_element: the HTML element for which the attributes are parsed
"""
supported_attributes = (
(name, val)
for name, val in attributes.items()
if name in self.attribute_mapping
)
for attr_name, attr_value in supported_attributes:
self.attribute_mapping[attr_name](attr_value, html_element)
for attr_name, attr_value in attributes.items():
if attr_name in self.attribute_mapping:
self.attribute_mapping[attr_name](attr_value, html_element)
return html_element

def merge_attribute_map(self, annotations: List[ApplyAnnotation] = None) -> None:
Expand Down

0 comments on commit 2b30c70

Please sign in to comment.