Skip to content

Commit

Permalink
Using importlib.metadata to get package version instead of specifying…
Browse files Browse the repository at this point in the history
… it in two places
  • Loading branch information
sveinbjornt committed Sep 26, 2023
1 parent 208dae8 commit 322a87f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "reynir-correct"
version = "4.0.0"
description = "Spelling and grammar correction for Icelandic"
authors = [{ name = "Miðeind ehf", email = "[email protected]" }]
authors = [{ name = "Miðeind ehf.", email = "[email protected]" }]
readme = { file = "README.rst", content-type = "text/x-rst" }
license = { file = "LICENSE.txt" }
# For classifier list see: https://pypi.org/pypi?%3Aaction=list_classifiers
Expand Down
5 changes: 3 additions & 2 deletions src/reynir_correct/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
"""

# Expose the reynir-correct API
import importlib.metadata

# Expose the reynir-correct API
from reynir import Greynir, Paragraph, Sentence, correct_spaces, mark_paragraphs
from tokenizer import detokenize

Expand All @@ -47,7 +48,7 @@

__author__ = "Miðeind ehf"
__copyright__ = "(C) 2023 Miðeind ehf."
__version__ = "4.0.0" # Remember to update in pyproject.toml as well
__version__ = importlib.metadata.version("reynir-correct")

__all__ = (
"Greynir",
Expand Down

0 comments on commit 322a87f

Please sign in to comment.