Skip to content

Commit

Permalink
Use @lru_cache(maxsize=None) instead of @cache
Browse files Browse the repository at this point in the history
so that the program can be used not only on python 3.9, but also on 3.7 and 3.8
(issue googlefonts#27)
  • Loading branch information
felipesanches committed Jul 18, 2023
1 parent 6aafc47 commit 28abbea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]

name = "shaperglot"
version = "0.2.0"
version = "0.2.1"
description = "Test font files for OpenType language support"

license = "MIT"
Expand All @@ -23,6 +23,8 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]

Expand Down
4 changes: 2 additions & 2 deletions shaperglot/checks/no_orphaned_marks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from functools import cache
from functools import lru_cache

from youseedee import ucd_data

Expand All @@ -7,7 +7,7 @@
from .common import shaping_input_schema, ShaperglotCheck, check_schema


@cache
@lru_cache(maxsize=None)
def _simple_mark_check(codepoint):
return ucd_data(codepoint).get("General_Category") == "Mn"

Expand Down

0 comments on commit 28abbea

Please sign in to comment.