con2 / emrichen

A Template engine for YAML & JSON
MIT License
107 stars 11 forks source link

Typecheck functions not working #74

Open mihai-stancu opened 9 months ago

mihai-stancu commented 9 months ago

Hi,

I've noticed that the typecheck functions are always returning false on my install.

I'm running Ubuntu 22.04 with Python 3.10.12 and have installed emrichen 0.4.0 via pip install emrichen at version.

# x.yml
!Defaults

number: 1234
dict:
  key: 4321

---
test_number_isnumber: !IsNumber number
test_dict_isdict: !IsDict dict

test_number_isinteger: !IsInteger number

test_number_isstring: !IsString number
test_dict_isstring: !IsString dict
$ emrichen < x.yml 
> test_number_isnumber: false
> test_dict_isdict: false
> test_number_isinteger: false
> test_number_isstring: true
> test_dict_isstring: true