Skip to content

Commit

Permalink
added ctx functions
Browse files Browse the repository at this point in the history
  • Loading branch information
arthexis committed Jan 30, 2023
1 parent 8454662 commit ebbaae4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions sigils/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import sys
from .sigils import Sigil, context
from .parsing import _try_call


import logging

Expand Down
4 changes: 4 additions & 0 deletions sigils/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def __init__(self):
"TYPE": lambda x: type(x).__name__,
"IS": lambda x, y: isinstance(x, y),
"FLAT": lambda x: [i for j in x for i in j],
"PREFIX": lambda x, y: f"{y}{x}",
"SUFFIX": lambda x, y: f"{x}{y}",
"SPLIT": lambda x, y: x.split(y),
"RSPLIT": lambda x, y: x.rsplit(y),
})
self.lru = LRU(128)
# Add default context sources and thread local variables here
Expand Down
2 changes: 0 additions & 2 deletions sigils/tests/test_contexts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import pytest

from ..transforms import * # Module under test
Expand All @@ -23,7 +22,6 @@ def test_callable_no_param():


def test_class_static_attribute():

class Entity:
code = "Hello"

Expand Down

0 comments on commit ebbaae4

Please sign in to comment.