Skip to content

Commit

Permalink
perf: Cache built flags
Browse files Browse the repository at this point in the history
  • Loading branch information
JCWasmx86 committed Nov 2, 2024
1 parent 30373d2 commit 4dc3603
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions djlint/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import importlib
from collections.abc import Sequence
from functools import cache
from typing import TYPE_CHECKING

import regex as re
Expand Down Expand Up @@ -39,6 +40,7 @@
}


@cache
def build_flags(flag_list: str | int) -> int:
"""Build list of regex flags."""
if isinstance(flag_list, int):
Expand Down

0 comments on commit 4dc3603

Please sign in to comment.