Repository: connor-makowski/type_enforced (language: python)

Issue:
Adding ability to enforce with constraints



Discussion / hints:

Fix patch:
diff --git a/.gitignore b/.gitignore
index 9886788..a26186b 100755
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,4 @@
 /__pycache__/
 */__pycache__
 *.egg-info
-*.pyc
+*.pyc
\ No newline at end of file
diff --git a/README.md b/README.md
index cc98a00..28dc0de 100755
--- a/README.md
+++ b/README.md
@@ -40,6 +40,8 @@ Nesting is allowed as long as the nested items are iterables (e.g. `typing.List`
 
 Variables without an annotation for type are not enforced.
 
+Note: Type Enforced does not support `__future__.annotations`. If you call `from __future__ import annotations` in your file, type enforced will not work as expected.
+
 ## Supported Type Checking Features:
 
 - Function/Method Input Typing
@@ -71,11 +73,19 @@ Variables without an annotation for type are not enforced.
         - e.g. `Literal['a', 'b']` will require any passed values that are equal (`==`) to `'a'` or `'b'`.
             - This compares the value of the passed input and not the type of the passed input.
         - Note: Multiple types can be passed in the same `Literal`.
+        - Note: Literals are evaluated after type checking occurs.
     - `Callable`
         - Essentially creates a union of:
             - `staticmethod`, `classmethod`, `types.FunctionType`, `types.BuiltinFunctionType`, `types.MethodType`, `types.BuiltinMethodType`, `types.GeneratorType`
     - Note: Other functions might have support, but there are not currently tests to validate them
         - Feel free to create an issue (or better yet a PR) if you want to add tests/support
+- `Constraint` validation.
+    - This is a special type of validation that allows passed input to be validated.
+        - Standard and custom constraints are supported.
+    - This is useful for validating that a passed input is within a certain range or meets a certain criteria.
+    - Note: The constraint is checked after type checking occurs.
+    - Note: See the example below or technical [constraint](https://connor-makowski.github.io/type_enforced/type_enforced/utils.html#Constraint) and [generic constraint](https://connor-makowski.github.io/type_enforced/type_enforced/utils.html#GenericConstraint) docs for more information.
+    ```
 
 ## Interactive Example
 
@@ -177,6 +187,44 @@ class my_class:
         pass
 ```
 
+## Validate with Constraints
+Type enforcer can enforce constraints for passed variables. These constraints are vaildated after any type checks are made.
+
+To enforce basic input values are integers greater than or equal to zero, you can use the [Constraint](https://connor-makowski.github.io/type_enforced/type_enforced/utils.html#Constraint) class like so:
+```py
+import type_enforced
+from type_enforced.utils import Constraint
+
+@type_enforced.Enforcer()
+def positive_int_test(value: [int, Constraint(ge=0)]) -> bool:
+    return True
+
+positive_int_test(1) # Passes
+positive_int_test(-1) # Fails
+positive_int_test(1.0) # Fails
+```
+
+To enforce a [GenericConstraint](https://connor-makowski.github.io/type_enforced/type_enforced/utils.html#GenericConstraint):
+```py
+import type_enforced
+from type_enforced.utils import GenericConstraint
+
+CustomConstraint = GenericConstraint(
+    {
+        'in_rgb': lambda x: x in ['red', 'green', 'blue'],
+    }
+)
+
+@type_enforced.Enforcer()
+def rgb_test(value: [int, CustomConstraint]) -> bool:
+    return True
+
+rgb_test('red') # Passes
+rgb_test('yellow') # Fails
+```
+
+
+
 ## Validate class instances and classes
 
 Type enforcer can enforce class instances and classes. There are a few caveats between the two.
diff --git a/dist/type_enforced-1.5.0-py3-none-any.whl b/dist/type_enforced-1.5.0-py3-none-any.whl
new file mode 100644
index 0000000..b935256
Binary files /dev/null and b/dist/type_enforced-1.5.0-py3-none-any.whl differ
diff --git a/dist/type_enforced-1.5.0.tar.gz b/dist/type_enforced-1.5.0.tar.gz
new file mode 100644
index 0000000..1e2506d
Binary files /dev/null and b/dist/type_enforced-1.5.0.tar.gz differ
diff --git a/docs/search.js b/docs/search.js
index ad674e9..94fbc29 100644
--- a/docs/search.js
+++ b/docs/search.js
@@ -1,6 +1,6 @@
 window.pdocSearch = (function(){
 /** elasticlunr - http://weixsong.github.io * Copyright (C) 2017 Oliver Nightingale * Copyright (C) 2017 Wei Song * MIT Licensed */!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u<s.length;u++){var a=s[u];r[a]=this.pipeline.run(t.tokenizer(e[a]))}var l={};for(var c in o){var d=r[c]||r.any;if(d){var f=this.fieldSearch(d,c,o),h=o[c].boost;for(var p in f)f[p]=f[p]*h;for(var p in f)p in l?l[p]+=f[p]:l[p]=f[p]}}var v,g=[];for(var p in l)v={ref:p,score:l[p]},this.documentStore.hasDoc(p)&&(v.doc=this.documentStore.getDoc(p)),g.push(v);return g.sort(function(e,t){return t.score-e.score}),g},t.Index.prototype.fieldSearch=function(e,t,n){var i=n[t].bool,o=n[t].expand,r=n[t].boost,s=null,u={};return 0!==r?(e.forEach(function(e){var n=[e];1==o&&(n=this.index[t].expandToken(e));var r={};n.forEach(function(n){var o=this.index[t].getDocs(n),a=this.idf(n,t);if(s&&"AND"==i){var l={};for(var c in s)c in o&&(l[c]=o[c]);o=l}n==e&&this.fieldSearchStats(u,n,o);for(var c in o){var d=this.index[t].getTermFrequency(n,c),f=this.documentStore.getFieldLength(c,t),h=1;0!=f&&(h=1/Math.sqrt(f));var p=1;n!=e&&(p=.15*(1-(n.length-e.length)/n.length));var v=d*a*h*p;c in r?r[c]+=v:r[c]=v}},this),s=this.mergeScores(s,r,i)},this),s=this.coordNorm(s,u,e.length)):void 0},t.Index.prototype.mergeScores=function(e,t,n){if(!e)return t;if("AND"==n){var i={};for(var o in t)o in e&&(i[o]=e[o]+t[o]);return i}for(var o in t)o in e?e[o]+=t[o]:e[o]=t[o];return e},t.Index.prototype.fieldSearchStats=function(e,t,n){for(var i in n)i in e?e[i].push(t):e[i]=[t]},t.Index.prototype.coordNorm=function(e,t,n){for(var i in e)if(i in t){var o=t[i].length;e[i]=e[i]*o/n}return e},t.Index.prototype.toJSON=function(){var e={};return this._fields.forEach(function(t){e[t]=this.index[t].toJSON()},this),{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),index:e,pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},t.DocumentStore=function(e){this._save=null===e||void 0===e?!0:e,this.docs={},this.docInfo={},this.length=0},t.DocumentStore.load=function(e){var t=new this;return t.length=e.length,t.docs=e.docs,t.docInfo=e.docInfo,t._save=e.save,t},t.DocumentStore.prototype.isDocStored=function(){return this._save},t.DocumentStore.prototype.addDoc=function(t,n){this.hasDoc(t)||this.length++,this.docs[t]=this._save===!0?e(n):null},t.DocumentStore.prototype.getDoc=function(e){return this.hasDoc(e)===!1?null:this.docs[e]},t.DocumentStore.prototype.hasDoc=function(e){return e in this.docs},t.DocumentStore.prototype.removeDoc=function(e){this.hasDoc(e)&&(delete this.docs[e],delete this.docInfo[e],this.length--)},t.DocumentStore.prototype.addFieldLength=function(e,t,n){null!==e&&void 0!==e&&0!=this.hasDoc(e)&&(this.docInfo[e]||(this.docInfo[e]={}),this.docInfo[e][t]=n)},t.DocumentStore.prototype.updateFieldLength=function(e,t,n){null!==e&&void 0!==e&&0!=this.hasDoc(e)&&this.addFieldLength(e,t,n)},t.DocumentStore.prototype.getFieldLength=function(e,t){return null===e||void 0===e?0:e in this.docs&&t in this.docInfo[e]?this.docInfo[e][t]:0},t.DocumentStore.prototype.toJSON=function(){return{docs:this.docs,docInfo:this.docInfo,length:this.length,save:this._save}},t.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,u="^("+o+")?"+r+o+"("+r+")?$",a="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,c=new RegExp(s),d=new RegExp(a),f=new RegExp(u),h=new RegExp(l),p=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,x=new RegExp("([^aeiouylsz])\\1$"),w=new RegExp("^"+o+i+"[^aeiouwxy]$"),I=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,D=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,_=/^(.+?)e$/,P=/ll$/,k=new RegExp("^"+o+i+"[^aeiouwxy]$"),z=function(n){var i,o,r,s,u,a,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,u=v,s.test(n)?n=n.replace(s,"$1$2"):u.test(n)&&(n=n.replace(u,"$1$2")),s=g,u=m,s.test(n)){var z=s.exec(n);s=c,s.test(z[1])&&(s=y,n=n.replace(s,""))}else if(u.test(n)){var z=u.exec(n);i=z[1],u=h,u.test(i)&&(n=i,u=S,a=x,l=w,u.test(n)?n+="e":a.test(n)?(s=y,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=I,s.test(n)){var z=s.exec(n);i=z[1],n=i+"i"}if(s=b,s.test(n)){var z=s.exec(n);i=z[1],o=z[2],s=c,s.test(i)&&(n=i+e[o])}if(s=E,s.test(n)){var z=s.exec(n);i=z[1],o=z[2],s=c,s.test(i)&&(n=i+t[o])}if(s=D,u=F,s.test(n)){var z=s.exec(n);i=z[1],s=d,s.test(i)&&(n=i)}else if(u.test(n)){var z=u.exec(n);i=z[1]+z[2],u=d,u.test(i)&&(n=i)}if(s=_,s.test(n)){var z=s.exec(n);i=z[1],s=d,u=f,a=k,(s.test(i)||u.test(i)&&!a.test(i))&&(n=i)}return s=P,u=d,s.test(n)&&u.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return z}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==!0?e:void 0},t.clearStopWords=function(){t.stopWordFilter.stopWords={}},t.addStopWords=function(e){null!=e&&Array.isArray(e)!==!1&&e.forEach(function(e){t.stopWordFilter.stopWords[e]=!0},this)},t.resetStopWords=function(){t.stopWordFilter.stopWords=t.defaultStopWords},t.defaultStopWords={"":!0,a:!0,able:!0,about:!0,across:!0,after:!0,all:!0,almost:!0,also:!0,am:!0,among:!0,an:!0,and:!0,any:!0,are:!0,as:!0,at:!0,be:!0,because:!0,been:!0,but:!0,by:!0,can:!0,cannot:!0,could:!0,dear:!0,did:!0,"do":!0,does:!0,either:!0,"else":!0,ever:!0,every:!0,"for":!0,from:!0,get:!0,got:!0,had:!0,has:!0,have:!0,he:!0,her:!0,hers:!0,him:!0,his:!0,how:!0,however:!0,i:!0,"if":!0,"in":!0,into:!0,is:!0,it:!0,its:!0,just:!0,least:!0,let:!0,like:!0,likely:!0,may:!0,me:!0,might:!0,most:!0,must:!0,my:!0,neither:!0,no:!0,nor:!0,not:!0,of:!0,off:!0,often:!0,on:!0,only:!0,or:!0,other:!0,our:!0,own:!0,rather:!0,said:!0,say:!0,says:!0,she:!0,should:!0,since:!0,so:!0,some:!0,than:!0,that:!0,the:!0,their:!0,them:!0,then:!0,there:!0,these:!0,they:!0,"this":!0,tis:!0,to:!0,too:!0,twas:!0,us:!0,wants:!0,was:!0,we:!0,were:!0,what:!0,when:!0,where:!0,which:!0,"while":!0,who:!0,whom:!0,why:!0,will:!0,"with":!0,would:!0,yet:!0,you:!0,your:!0},t.stopWordFilter.stopWords=t.defaultStopWords,t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(e){if(null===e||void 0===e)throw new Error("token should not be undefined");return e.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.InvertedIndex=function(){this.root={docs:{},df:0}},t.InvertedIndex.load=function(e){var t=new this;return t.root=e.root,t},t.InvertedIndex.prototype.addToken=function(e,t,n){for(var n=n||this.root,i=0;i<=e.length-1;){var o=e[i];o in n||(n[o]={docs:{},df:0}),i+=1,n=n[o]}var r=t.ref;n.docs[r]?n.docs[r]={tf:t.tf}:(n.docs[r]={tf:t.tf},n.df+=1)},t.InvertedIndex.prototype.hasToken=function(e){if(!e)return!1;for(var t=this.root,n=0;n<e.length;n++){if(!t[e[n]])return!1;t=t[e[n]]}return!0},t.InvertedIndex.prototype.getNode=function(e){if(!e)return null;for(var t=this.root,n=0;n<e.length;n++){if(!t[e[n]])return null;t=t[e[n]]}return t},t.InvertedIndex.prototype.getDocs=function(e){var t=this.getNode(e);return null==t?{}:t.docs},t.InvertedIndex.prototype.getTermFrequency=function(e,t){var n=this.getNode(e);return null==n?0:t in n.docs?n.docs[t].tf:0},t.InvertedIndex.prototype.getDocFreq=function(e){var t=this.getNode(e);return null==t?0:t.df},t.InvertedIndex.prototype.removeToken=function(e,t){if(e){var n=this.getNode(e);null!=n&&t in n.docs&&(delete n.docs[t],n.df-=1)}},t.InvertedIndex.prototype.expandToken=function(e,t,n){if(null==e||""==e)return[];var t=t||[];if(void 0==n&&(n=this.getNode(e),null==n))return t;n.df>0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e<arguments.length;e++)t=arguments[e],~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t);this.length=this.elements.length},lunr.SortedSet.prototype.toArray=function(){return this.elements.slice()},lunr.SortedSet.prototype.map=function(e,t){return this.elements.map(e,t)},lunr.SortedSet.prototype.forEach=function(e,t){return this.elements.forEach(e,t)},lunr.SortedSet.prototype.indexOf=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]<u[i]?n++:s[n]>u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();o<r.length;o++)i.add(r[o]);return i},lunr.SortedSet.prototype.toJSON=function(){return this.toArray()},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.elasticlunr=t()}(this,function(){return t})}();
-    /** pdoc search index */const docs = {"version": "0.9.5", "fields": ["qualname", "fullname", "annotation", "default_value", "signature", "bases", "doc"], "ref": "fullname", "documentStore": {"docs": {"type_enforced": {"fullname": "type_enforced", "modulename": "type_enforced", "kind": "module", "doc": "<p></p>\n"}, "type_enforced.enforcer": {"fullname": "type_enforced.enforcer", "modulename": "type_enforced.enforcer", "kind": "module", "doc": "<p></p>\n"}, "type_enforced.enforcer.FunctionMethodEnforcer": {"fullname": "type_enforced.enforcer.FunctionMethodEnforcer", "modulename": "type_enforced.enforcer", "qualname": "FunctionMethodEnforcer", "kind": "class", "doc": "<p></p>\n"}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"fullname": "type_enforced.enforcer.FunctionMethodEnforcer.__init__", "modulename": "type_enforced.enforcer", "qualname": "FunctionMethodEnforcer.__init__", "kind": "function", "doc": "<p>Initialize a FunctionMethodEnforce class object as a wrapper for a passed function <code>__fn__</code>.</p>\n\n<p>Requires:</p>\n\n<pre><code>- `__fn__`:\n    - What: The function to enforce\n    - Type: function | method | class\n</code></pre>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">__fn__</span></span>)</span>"}, "type_enforced.enforcer.Enforcer": {"fullname": "type_enforced.enforcer.Enforcer", "modulename": "type_enforced.enforcer", "qualname": "Enforcer", "kind": "variable", "doc": "<p>A wrapper to enforce types within a function or method given argument annotations.</p>\n\n<p>Each wrapped item is converted into a special <code>FunctionMethodEnforcer</code> class object that validates the passed parameters for the function or method when it is called. If a function or method that is passed does not have any annotations, it is not converted into a <code>FunctionMethodEnforcer</code> class as no validation is possible.</p>\n\n<p>If wrapping a class, all methods in the class that meet any of the following criteria will be wrapped individually:</p>\n\n<ul>\n<li>Methods with <code>__call__</code></li>\n<li>Methods wrapped with <code>staticmethod</code> (if python &gt;= 3.10)</li>\n<li>Methods wrapped with <code>classmethod</code> (if python &gt;= 3.10)</li>\n</ul>\n\n<p>Requires:</p>\n\n<ul>\n<li><code>clsFnMethod</code>:\n<ul>\n<li>What: The class, function or method that should have input types enforced</li>\n<li>Type: function | method | class</li>\n</ul></li>\n</ul>\n\n<p>Example Use:</p>\n\n<pre><code>&gt;&gt;&gt; import type_enforced\n&gt;&gt;&gt; @type_enforced.Enforcer\n... def my_fn(a: int , b: [int, str] =2, c: int =3) -&gt; None:\n...     pass\n...\n&gt;&gt;&gt; my_fn(a=1, b=2, c=3)\n&gt;&gt;&gt; my_fn(a=1, b='2', c=3)\n&gt;&gt;&gt; my_fn(a='a', b=2, c=3)\nTraceback (most recent call last):\n  File \"&lt;stdin&gt;\", line 1, in &lt;module&gt;\n  File \"/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py\", line 85, in __call__\n    self.__check_type__(assigned_vars.get(key), value, key)\n  File \"/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py\", line 107, in __check_type__\n    self.__exception__(\n  File \"/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py\", line 34, in __exception__\n    raise Exception(f\"({self.__fn__.__qualname__}): {message}\")\nException: (my_fn): Type mismatch for typed variable `a`. Expected one of the following `[&lt;class 'int'&gt;]` but got `&lt;class 'str'&gt;` instead.\n</code></pre>\n", "default_value": "&lt;Partial type_enforced.enforcer.Enforcer object&gt;"}, "type_enforced.utils": {"fullname": "type_enforced.utils", "modulename": "type_enforced.utils", "kind": "module", "doc": "<p></p>\n"}, "type_enforced.utils.WithSubclasses": {"fullname": "type_enforced.utils.WithSubclasses", "modulename": "type_enforced.utils", "qualname": "WithSubclasses", "kind": "function", "doc": "<p>A special helper function to allow a class type to be passed and also allow all subclasses of that type.</p>\n\n<p>Requires:</p>\n\n<ul>\n<li><code>obj</code>:\n<ul>\n<li>What: An uninitialized class that should also be considered type correct if a subclass is passed.</li>\n<li>Type: Any Uninitialized class</li>\n</ul></li>\n</ul>\n\n<p>Returns:</p>\n\n<ul>\n<li><code>out</code>:\n<ul>\n<li>What: A list of all of the subclasses (recursively parsed)</li>\n<li>Type: list of strs</li>\n</ul></li>\n</ul>\n\n<p>Notes:</p>\n\n<ul>\n<li>From a functional perspective, this recursively gets the subclasses for an uninitialised class (type).</li>\n</ul>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">obj</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, "type_enforced.utils.Partial": {"fullname": "type_enforced.utils.Partial", "modulename": "type_enforced.utils", "qualname": "Partial", "kind": "class", "doc": "<p>A special class wrapper to allow for easy partial function wrappings and calls.</p>\n"}, "type_enforced.utils.Partial.__init__": {"fullname": "type_enforced.utils.Partial.__init__", "modulename": "type_enforced.utils", "qualname": "Partial.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">__fn__</span>, </span><span class=\"param\"><span class=\"o\">*</span><span class=\"n\">__args__</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">__kwargs__</span></span>)</span>"}}, "docInfo": {"type_enforced": {"qualname": 0, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "type_enforced.enforcer": {"qualname": 0, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "type_enforced.enforcer.FunctionMethodEnforcer": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"qualname": 3, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 11, "bases": 0, "doc": 43}, "type_enforced.enforcer.Enforcer": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 10, "signature": 0, "bases": 0, "doc": 339}, "type_enforced.utils": {"qualname": 0, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "type_enforced.utils.WithSubclasses": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 11, "bases": 0, "doc": 123}, "type_enforced.utils.Partial": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 16}, "type_enforced.utils.Partial.__init__": {"qualname": 3, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 3}}, "length": 9, "save": true}, "index": {"qualname": {"root": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2, "f": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2}}}}}}}}}, "fullname": {"root": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced": {"tf": 1}, "type_enforced.enforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 9}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced": {"tf": 1}, "type_enforced.enforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 9}, "r": {"docs": {"type_enforced.enforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 4}}}}}}}}, "f": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2}}}}, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 4}}}}}, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2}}}}}}}}}, "annotation": {"root": {"docs": {}, "df": 0}}, "default_value": {"root": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1, "l": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "o": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}, "g": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "signature": {"root": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 3.1622776601683795}, "type_enforced.utils.WithSubclasses": {"tf": 3.1622776601683795}, "type_enforced.utils.Partial.__init__": {"tf": 5.0990195135927845}}, "df": 3, "f": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2}}, "o": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "j": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 1}}}}, "k": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "bases": {"root": {"docs": {}, "df": 0}}, "doc": {"root": {"1": {"0": {"7": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}, "docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}, "2": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}, "3": {"4": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "docs": {"type_enforced.enforcer.Enforcer": {"tf": 2.449489742783178}}, "df": 1}, "8": {"5": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "docs": {"type_enforced": {"tf": 1.7320508075688772}, "type_enforced.enforcer": {"tf": 1.7320508075688772}, "type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1.7320508075688772}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 4.358898943540674}, "type_enforced.enforcer.Enforcer": {"tf": 8.246211251235321}, "type_enforced.utils": {"tf": 1.7320508075688772}, "type_enforced.utils.WithSubclasses": {"tf": 7.0710678118654755}, "type_enforced.utils.Partial": {"tf": 1.7320508075688772}, "type_enforced.utils.Partial.__init__": {"tf": 1.7320508075688772}}, "df": 9, "i": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}}, "df": 1, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1, "o": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}}, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1, "e": {"docs": {}, "df": 0, "m": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 2}, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 2}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1.7320508075688772}, "type_enforced.enforcer.Enforcer": {"tf": 3.4641016151377544}, "type_enforced.utils.WithSubclasses": {"tf": 2.23606797749979}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 4, "s": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 2, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "n": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 1, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 2}, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 2}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 2, "o": {"docs": {}, "df": 0, "w": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 2}}}, "s": {"docs": {}, "df": 0, "o": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 1}}}}, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1.7320508075688772}, "type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 4, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}}, "df": 1, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 4}, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "n": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1.4142135623730951}, "type_enforced.enforcer.Enforcer": {"tf": 2.449489742783178}}, "df": 2}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1.4142135623730951}, "type_enforced.enforcer.Enforcer": {"tf": 2.8284271247461903}, "type_enforced.utils.WithSubclasses": {"tf": 2}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 4, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}, "s": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "s": {"docs": {"type_enforced.utils.Partial": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "j": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 2}}}}}, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.WithSubclasses": {"tf": 2}}, "df": 2}, "n": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "u": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "w": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 3}, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "s": {"docs": {"type_enforced.utils.Partial": {"tf": 1}}, "df": 1}}}}}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 3}}, "e": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 3}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.Partial": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 3}}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 2.449489742783178}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 3}, "a": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 2}}, "i": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "o": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 4}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 2.449489742783178}, "type_enforced.utils.WithSubclasses": {"tf": 2.449489742783178}}, "df": 3, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 2, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1, "/": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}}}}, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "s": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.utils.Partial": {"tf": 1}}, "df": 1}}}, "x": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}}}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}}, "df": 2, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}}, "df": 1}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "d": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 4.69041575982343}}, "df": 1}, "e": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 3}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}}, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "u": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}, "b": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 2}, "u": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 1}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}}}, "pipeline": ["trimmer"], "_isPrebuiltIndex": true};
+    /** pdoc search index */const docs = {"version": "0.9.5", "fields": ["qualname", "fullname", "annotation", "default_value", "signature", "bases", "doc"], "ref": "fullname", "documentStore": {"docs": {"type_enforced": {"fullname": "type_enforced", "modulename": "type_enforced", "kind": "module", "doc": "<p></p>\n"}, "type_enforced.enforcer": {"fullname": "type_enforced.enforcer", "modulename": "type_enforced.enforcer", "kind": "module", "doc": "<p></p>\n"}, "type_enforced.enforcer.FunctionMethodEnforcer": {"fullname": "type_enforced.enforcer.FunctionMethodEnforcer", "modulename": "type_enforced.enforcer", "qualname": "FunctionMethodEnforcer", "kind": "class", "doc": "<p></p>\n"}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"fullname": "type_enforced.enforcer.FunctionMethodEnforcer.__init__", "modulename": "type_enforced.enforcer", "qualname": "FunctionMethodEnforcer.__init__", "kind": "function", "doc": "<p>Initialize a FunctionMethodEnforce class object as a wrapper for a passed function <code>__fn__</code>.</p>\n\n<p>Requires:</p>\n\n<pre><code>- `__fn__`:\n    - What: The function to enforce\n    - Type: function | method | class\n</code></pre>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">__fn__</span></span>)</span>"}, "type_enforced.enforcer.Enforcer": {"fullname": "type_enforced.enforcer.Enforcer", "modulename": "type_enforced.enforcer", "qualname": "Enforcer", "kind": "variable", "doc": "<p>A wrapper to enforce types within a function or method given argument annotations.</p>\n\n<p>Each wrapped item is converted into a special <code>FunctionMethodEnforcer</code> class object that validates the passed parameters for the function or method when it is called. If a function or method that is passed does not have any annotations, it is not converted into a <code>FunctionMethodEnforcer</code> class as no validation is possible.</p>\n\n<p>If wrapping a class, all methods in the class that meet any of the following criteria will be wrapped individually:</p>\n\n<ul>\n<li>Methods with <code>__call__</code></li>\n<li>Methods wrapped with <code>staticmethod</code> (if python &gt;= 3.10)</li>\n<li>Methods wrapped with <code>classmethod</code> (if python &gt;= 3.10)</li>\n</ul>\n\n<p>Requires:</p>\n\n<ul>\n<li><code>clsFnMethod</code>:\n<ul>\n<li>What: The class, function or method that should have input types enforced</li>\n<li>Type: function | method | class</li>\n</ul></li>\n</ul>\n\n<p>Example Use:</p>\n\n<pre><code>&gt;&gt;&gt; import type_enforced\n&gt;&gt;&gt; @type_enforced.Enforcer\n... def my_fn(a: int , b: [int, str] =2, c: int =3) -&gt; None:\n...     pass\n...\n&gt;&gt;&gt; my_fn(a=1, b=2, c=3)\n&gt;&gt;&gt; my_fn(a=1, b='2', c=3)\n&gt;&gt;&gt; my_fn(a='a', b=2, c=3)\nTraceback (most recent call last):\n  File \"&lt;stdin&gt;\", line 1, in &lt;module&gt;\n  File \"/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py\", line 85, in __call__\n    self.__check_type__(assigned_vars.get(key), value, key)\n  File \"/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py\", line 107, in __check_type__\n    self.__exception__(\n  File \"/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py\", line 34, in __exception__\n    raise Exception(f\"({self.__fn__.__qualname__}): {message}\")\nException: (my_fn): Type mismatch for typed variable `a`. Expected one of the following `[&lt;class 'int'&gt;]` but got `&lt;class 'str'&gt;` instead.\n</code></pre>\n", "default_value": "&lt;Partial type_enforced.enforcer.Enforcer object&gt;"}, "type_enforced.utils": {"fullname": "type_enforced.utils", "modulename": "type_enforced.utils", "kind": "module", "doc": "<p></p>\n"}, "type_enforced.utils.WithSubclasses": {"fullname": "type_enforced.utils.WithSubclasses", "modulename": "type_enforced.utils", "qualname": "WithSubclasses", "kind": "function", "doc": "<p>A special helper function to allow a class type to be passed and also allow all subclasses of that type.</p>\n\n<p>Requires:</p>\n\n<ul>\n<li><code>obj</code>:\n<ul>\n<li>What: An uninitialized class that should also be considered type correct if a subclass is passed.</li>\n<li>Type: Any Uninitialized class</li>\n</ul></li>\n</ul>\n\n<p>Returns:</p>\n\n<ul>\n<li><code>out</code>:\n<ul>\n<li>What: A list of all of the subclasses (recursively parsed)</li>\n<li>Type: list of strs</li>\n</ul></li>\n</ul>\n\n<p>Notes:</p>\n\n<ul>\n<li>From a functional perspective, this recursively gets the subclasses for an uninitialised class (type).</li>\n</ul>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">obj</span></span><span class=\"return-annotation\">):</span></span>", "funcdef": "def"}, "type_enforced.utils.Partial": {"fullname": "type_enforced.utils.Partial", "modulename": "type_enforced.utils", "qualname": "Partial", "kind": "class", "doc": "<p>A special class wrapper to allow for easy partial function wrappings and calls.</p>\n"}, "type_enforced.utils.Partial.__init__": {"fullname": "type_enforced.utils.Partial.__init__", "modulename": "type_enforced.utils", "qualname": "Partial.__init__", "kind": "function", "doc": "<p></p>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">__fn__</span>, </span><span class=\"param\"><span class=\"o\">*</span><span class=\"n\">__args__</span>, </span><span class=\"param\"><span class=\"o\">**</span><span class=\"n\">__kwargs__</span></span>)</span>"}, "type_enforced.utils.GenericConstraint": {"fullname": "type_enforced.utils.GenericConstraint", "modulename": "type_enforced.utils", "qualname": "GenericConstraint", "kind": "class", "doc": "<p></p>\n"}, "type_enforced.utils.GenericConstraint.__init__": {"fullname": "type_enforced.utils.GenericConstraint.__init__", "modulename": "type_enforced.utils", "qualname": "GenericConstraint.__init__", "kind": "function", "doc": "<p>Creates a generic constraint object that can be used to validate a value against a set of constraints.</p>\n\n<p>Required Arguments:</p>\n\n<ul>\n<li><code>constraints</code>:\n<ul>\n<li>What: A dictionary of constraint names and their associated functions.</li>\n<li>Type: dict</li>\n<li>Note: All values in the dictionary must be functions that take a single argument and return a boolean.</li>\n<li>Note: The dictionary keys will be used to identify the failed constraints in the error messages.</li>\n</ul></li>\n</ul>\n", "signature": "<span class=\"signature pdoc-code condensed\">(<span class=\"param\"><span class=\"n\">constraints</span><span class=\"p\">:</span> <span class=\"nb\">dict</span></span>)</span>"}, "type_enforced.utils.Constraint": {"fullname": "type_enforced.utils.Constraint", "modulename": "type_enforced.utils", "qualname": "Constraint", "kind": "class", "doc": "<p></p>\n", "bases": "GenericConstraint"}, "type_enforced.utils.Constraint.__init__": {"fullname": "type_enforced.utils.Constraint.__init__", "modulename": "type_enforced.utils", "qualname": "Constraint.__init__", "kind": "function", "doc": "<p>Creates a constraint object that can be used to validate a value against a set of constraints.</p>\n\n<p>Optional Arguments:</p>\n\n<ul>\n<li><code>pattern</code>:\n<ul>\n<li>What: A regex pattern that the value must match.</li>\n<li>Type: str or None</li>\n<li>Default: None</li>\n</ul></li>\n<li><code>includes</code>:\n<ul>\n<li>What: A list of values that the value must be in.</li>\n<li>Type: list, tuple, set or None</li>\n<li>Default: None</li>\n</ul></li>\n<li><code>excludes</code>:\n<ul>\n<li>What: A list of values that the value must not be in.</li>\n<li>Type: list, tuple, set or None</li>\n<li>Default: None</li>\n</ul></li>\n<li><code>gt</code>:\n<ul>\n<li>What: The value must be greater than this value.</li>\n<li>Type: float, int or None</li>\n<li>Default: None</li>\n</ul></li>\n<li><code>lt</code>:\n<ul>\n<li>What: The value must be less than this value.</li>\n<li>Type: float, int or None</li>\n<li>Default: None</li>\n</ul></li>\n<li><code>ge</code>:\n<ul>\n<li>What: The value must be greater than or equal to this value.</li>\n<li>Type: float, int or None</li>\n<li>Default: None</li>\n</ul></li>\n<li><code>le</code>:\n<ul>\n<li>What: The value must be less than or equal to this value.</li>\n<li>Type: float, int or None</li>\n<li>Default: None</li>\n</ul></li>\n<li><code>eq</code>:\n<ul>\n<li>What: The value must be equal to this value.</li>\n<li>Type: float, int or None</li>\n<li>Default: None</li>\n</ul></li>\n<li><code>ne</code>:\n<ul>\n<li>What: The value must not be equal to this value.</li>\n<li>Type: float, int or None</li>\n<li>Default: None</li>\n</ul></li>\n</ul>\n", "signature": "<span class=\"signature pdoc-code multiline\">(<span class=\"param\">\tpattern: [&lt;class &#x27;str&#x27;&gt;, None] = None,</span><span class=\"param\">\tincludes: [&lt;class &#x27;list&#x27;&gt;, &lt;class &#x27;tuple&#x27;&gt;, &lt;class &#x27;set&#x27;&gt;, None] = None,</span><span class=\"param\">\texcludes: [&lt;class &#x27;list&#x27;&gt;, &lt;class &#x27;tuple&#x27;&gt;, &lt;class &#x27;set&#x27;&gt;, None] = None,</span><span class=\"param\">\tgt: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class=\"param\">\tlt: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class=\"param\">\tge: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class=\"param\">\tle: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class=\"param\">\teq: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class=\"param\">\tne: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None</span>)</span>"}}, "docInfo": {"type_enforced": {"qualname": 0, "fullname": 2, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "type_enforced.enforcer": {"qualname": 0, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "type_enforced.enforcer.FunctionMethodEnforcer": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"qualname": 3, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 11, "bases": 0, "doc": 43}, "type_enforced.enforcer.Enforcer": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 10, "signature": 0, "bases": 0, "doc": 339}, "type_enforced.utils": {"qualname": 0, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "type_enforced.utils.WithSubclasses": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 11, "bases": 0, "doc": 123}, "type_enforced.utils.Partial": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 16}, "type_enforced.utils.Partial.__init__": {"qualname": 3, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 29, "bases": 0, "doc": 3}, "type_enforced.utils.GenericConstraint": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 3}, "type_enforced.utils.GenericConstraint.__init__": {"qualname": 3, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 14, "bases": 0, "doc": 95}, "type_enforced.utils.Constraint": {"qualname": 1, "fullname": 4, "annotation": 0, "default_value": 0, "signature": 0, "bases": 1, "doc": 3}, "type_enforced.utils.Constraint.__init__": {"qualname": 3, "fullname": 6, "annotation": 0, "default_value": 0, "signature": 181, "bases": 0, "doc": 329}}, "length": 13, "save": true}, "index": {"qualname": {"root": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 4, "f": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 4}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.GenericConstraint": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}, "fullname": {"root": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 4, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced": {"tf": 1}, "type_enforced.enforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}, "type_enforced.utils.GenericConstraint": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 13}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced": {"tf": 1}, "type_enforced.enforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}, "type_enforced.utils.GenericConstraint": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 13}, "r": {"docs": {"type_enforced.enforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 4}}}}}}}}, "f": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}}}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 4}}}}, "u": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}, "type_enforced.utils.GenericConstraint": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 8}}}}}, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2}}}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.GenericConstraint": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}}}}}}}}}}}}, "annotation": {"root": {"docs": {}, "df": 0}}, "default_value": {"root": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1, "l": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "o": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}, "g": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "signature": {"root": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 3.1622776601683795}, "type_enforced.utils.WithSubclasses": {"tf": 3.1622776601683795}, "type_enforced.utils.Partial.__init__": {"tf": 5.0990195135927845}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 3.4641016151377544}, "type_enforced.utils.Constraint.__init__": {"tf": 6.324555320336759}}, "df": 5, "f": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 2}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 2.449489742783178}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "j": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 1}}}}, "k": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Partial.__init__": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 4.358898943540674}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}}}}}}, "l": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 4.47213595499958}}, "df": 1}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}, "e": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}, "x": {"2": {"7": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 6.164414002968976}}, "df": 1}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}, "g": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 4.47213595499958}}, "df": 1}, "e": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 4.242640687119285}}, "df": 1}}}, "e": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 2.449489742783178}}, "df": 1}}}, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}}}}}}, "q": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}}}, "bases": {"root": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint": {"tf": 1}}, "df": 1}}}}}}}}}}}}}}}}}}}, "doc": {"root": {"1": {"0": {"7": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}, "docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}, "2": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}, "3": {"4": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "docs": {"type_enforced.enforcer.Enforcer": {"tf": 2.449489742783178}}, "df": 1}, "8": {"5": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "docs": {}, "df": 0}, "docs": {"type_enforced": {"tf": 1.7320508075688772}, "type_enforced.enforcer": {"tf": 1.7320508075688772}, "type_enforced.enforcer.FunctionMethodEnforcer": {"tf": 1.7320508075688772}, "type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 4.358898943540674}, "type_enforced.enforcer.Enforcer": {"tf": 8.246211251235321}, "type_enforced.utils": {"tf": 1.7320508075688772}, "type_enforced.utils.WithSubclasses": {"tf": 7.0710678118654755}, "type_enforced.utils.Partial": {"tf": 1.7320508075688772}, "type_enforced.utils.Partial.__init__": {"tf": 1.7320508075688772}, "type_enforced.utils.GenericConstraint": {"tf": 1.7320508075688772}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 5.291502622129181}, "type_enforced.utils.Constraint": {"tf": 1.7320508075688772}, "type_enforced.utils.Constraint.__init__": {"tf": 12}}, "df": 13, "i": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1.4142135623730951}, "type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 3, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}, "type_enforced.utils.Constraint.__init__": {"tf": 2.449489742783178}}, "df": 2, "o": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}}, "p": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}}}}}}, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1, "e": {"docs": {}, "df": 0, "m": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 2}, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 2}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "a": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1.7320508075688772}, "type_enforced.enforcer.Enforcer": {"tf": 3.4641016151377544}, "type_enforced.utils.WithSubclasses": {"tf": 2.23606797749979}, "type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 2.449489742783178}, "type_enforced.utils.Constraint.__init__": {"tf": 2.449489742783178}}, "df": 6, "s": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 2, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}}}}}}, "r": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 2, "s": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}}}}}}}}, "n": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 1, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 2}, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1.4142135623730951}}, "df": 3}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 3, "o": {"docs": {}, "df": 0, "w": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 2}}}, "s": {"docs": {}, "df": 0, "o": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 1}}}, "g": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}}}}}}}, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1.7320508075688772}, "type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 4, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}}, "df": 1, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}, "s": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 4}, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}, "n": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1.4142135623730951}, "type_enforced.enforcer.Enforcer": {"tf": 2.449489742783178}}, "df": 2}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 2.449489742783178}}, "df": 1}}}}}, "c": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1.4142135623730951}, "type_enforced.enforcer.Enforcer": {"tf": 2.8284271247461903}, "type_enforced.utils.WithSubclasses": {"tf": 2}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 4, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}, "s": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1.4142135623730951}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2, "s": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1.7320508075688772}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}}}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "s": {"docs": {"type_enforced.utils.Partial": {"tf": 1}}, "df": 1}}}, "n": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}}}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "j": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 4}}}}}, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}, "type_enforced.utils.Constraint.__init__": {"tf": 3.3166247903554}}, "df": 2}, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.WithSubclasses": {"tf": 2}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1.4142135623730951}, "type_enforced.utils.Constraint.__init__": {"tf": 1.7320508075688772}}, "df": 4}, "n": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "u": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}}}}}}}, "w": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 3}, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "s": {"docs": {"type_enforced.utils.Partial": {"tf": 1}}, "df": 1}}}}}}}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 3}}, "df": 5}}, "e": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 2}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 3}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.Partial": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 3}, "d": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "x": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 2.449489742783178}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 2}, "type_enforced.utils.Constraint.__init__": {"tf": 3}}, "df": 5, "i": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1.4142135623730951}, "type_enforced.utils.Constraint.__init__": {"tf": 2}}, "df": 4}, "n": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 2}}, "df": 1}}, "i": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 2.449489742783178}}, "df": 2}}}, "o": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.Partial": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1.4142135623730951}, "type_enforced.utils.Constraint.__init__": {"tf": 2.23606797749979}}, "df": 6}, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 2.449489742783178}, "type_enforced.utils.WithSubclasses": {"tf": 2.449489742783178}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 3}}, "df": 5, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}, "a": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 2, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1, "/": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}}}}, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "s": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.utils.Partial": {"tf": 1}}, "df": 1}}}, "x": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}}}}}, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}, "q": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 2}}, "df": 1}}}}}, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.FunctionMethodEnforcer.__init__": {"tf": 1}, "type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}}, "df": 2, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}}}}, "e": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "s": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "s": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}}}}, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2.23606797749979}}, "df": 1}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "d": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 3}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "h": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 4.69041575982343}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}, "e": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}, "type_enforced.utils.Partial": {"tf": 1}}, "df": 3}}}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}}, "r": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}, "d": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 2}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}}, "t": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1.7320508075688772}}, "df": 2}}, "u": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}}}, "v": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}, "u": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 4}}, "df": 3, "s": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}, "d": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "f": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 3}}, "df": 1}}}}}}, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}, "type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 2, "e": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1.4142135623730951}}, "df": 1, "s": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.Constraint.__init__": {"tf": 4.242640687119285}}, "df": 2}}}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1}}, "h": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "/": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "y": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}, "b": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}, "type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.GenericConstraint.__init__": {"tf": 1.7320508075688772}, "type_enforced.utils.Constraint.__init__": {"tf": 3}}, "df": 4}, "u": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}, "o": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1, "d": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1.4142135623730951}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}}}, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}}, "df": 1}}}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1}}, "df": 1}}}}}}}}}}}}}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}, "t": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}, "type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 2}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 2}}, "df": 1}}, "s": {"docs": {}, "df": 0, "t": {"docs": {"type_enforced.utils.WithSubclasses": {"tf": 1.4142135623730951}, "type_enforced.utils.Constraint.__init__": {"tf": 2}}, "df": 2}}}, "e": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1}}, "df": 1, "s": {"docs": {}, "df": 0, "s": {"docs": {"type_enforced.utils.Constraint.__init__": {"tf": 1.4142135623730951}}, "df": 1}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1.4142135623730951}}, "df": 1, "s": {"docs": {"type_enforced.utils.GenericConstraint.__init__": {"tf": 1}}, "df": 1}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"type_enforced.enforcer.Enforcer": {"tf": 1}}, "df": 1}}}}}}}}}}}, "pipeline": ["trimmer"], "_isPrebuiltIndex": true};
 
     // mirrored in build-search-index.js (part 1)
     // Also split on html tags. this is a cheap heuristic, but good enough.
diff --git a/docs/type_enforced/enforcer.html b/docs/type_enforced/enforcer.html
index ac7c3d6..088b460 100644
--- a/docs/type_enforced/enforcer.html
+++ b/docs/type_enforced/enforcer.html
@@ -73,7 +73,7 @@ <h1 class="modulename">
 </span><span id="L-8"><a href="#L-8"><span class="linenos">  8</span></a><span class="p">)</span>
 </span><span id="L-9"><a href="#L-9"><span class="linenos">  9</span></a><span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Type</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">Sized</span><span class="p">,</span> <span class="n">Literal</span><span class="p">,</span> <span class="n">Callable</span>
 </span><span id="L-10"><a href="#L-10"><span class="linenos"> 10</span></a><span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">update_wrapper</span><span class="p">,</span> <span class="n">wraps</span>
-</span><span id="L-11"><a href="#L-11"><span class="linenos"> 11</span></a><span class="kn">from</span> <span class="nn">type_enforced.utils</span> <span class="kn">import</span> <span class="n">Partial</span>
+</span><span id="L-11"><a href="#L-11"><span class="linenos"> 11</span></a><span class="kn">from</span> <span class="nn">type_enforced.utils</span> <span class="kn">import</span> <span class="n">Partial</span><span class="p">,</span> <span class="n">GenericConstraint</span>
 </span><span id="L-12"><a href="#L-12"><span class="linenos"> 12</span></a>
 </span><span id="L-13"><a href="#L-13"><span class="linenos"> 13</span></a><span class="c1"># Python 3.10+ has a UnionType object that is used to represent Union types</span>
 </span><span id="L-14"><a href="#L-14"><span class="linenos"> 14</span></a><span class="k">try</span><span class="p">:</span>
@@ -138,7 +138,7 @@ <h1 class="modulename">
 </span><span id="L-73"><a href="#L-73"><span class="linenos"> 73</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
 </span><span id="L-74"><a href="#L-74"><span class="linenos"> 74</span></a><span class="sd">        Gets the checkable type as a nested dict for a passed annotation.</span>
 </span><span id="L-75"><a href="#L-75"><span class="linenos"> 75</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="L-76"><a href="#L-76"><span class="linenos"> 76</span></a>        <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{}</span>
+</span><span id="L-76"><a href="#L-76"><span class="linenos"> 76</span></a>        <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;__extra__&quot;</span><span class="p">:</span> <span class="p">{}}</span>
 </span><span id="L-77"><a href="#L-77"><span class="linenos"> 77</span></a>        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">item_annotation</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">)):</span>
 </span><span id="L-78"><a href="#L-78"><span class="linenos"> 78</span></a>            <span class="n">item_annotation</span> <span class="o">=</span> <span class="p">[</span><span class="n">item_annotation</span><span class="p">]</span>
 </span><span id="L-79"><a href="#L-79"><span class="linenos"> 79</span></a>        <span class="k">for</span> <span class="n">valid_type</span> <span class="ow">in</span> <span class="n">item_annotation</span><span class="p">:</span>
@@ -164,216 +164,227 @@ <h1 class="modulename">
 </span><span id="L-99"><a href="#L-99"><span class="linenos"> 99</span></a>                <span class="c1"># Note: These will be handled separately in the self.__check_type__</span>
 </span><span id="L-100"><a href="#L-100"><span class="linenos">100</span></a>                <span class="c1"># as the object is validated and not its type.</span>
 </span><span id="L-101"><a href="#L-101"><span class="linenos">101</span></a>                <span class="k">elif</span> <span class="n">valid_type</span><span class="o">.</span><span class="n">__origin__</span> <span class="o">==</span> <span class="n">Literal</span><span class="p">:</span>
-</span><span id="L-102"><a href="#L-102"><span class="linenos">102</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-103"><a href="#L-103"><span class="linenos">103</span></a>                        <span class="n">Literal</span><span class="p">:</span> <span class="p">{</span><span class="n">i</span><span class="p">:</span> <span class="kc">None</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">valid_type</span><span class="o">.</span><span class="n">__args__</span><span class="p">}</span>
-</span><span id="L-104"><a href="#L-104"><span class="linenos">104</span></a>                    <span class="p">}</span>
-</span><span id="L-105"><a href="#L-105"><span class="linenos">105</span></a>
-</span><span id="L-106"><a href="#L-106"><span class="linenos">106</span></a>                <span class="c1"># Handle Sized objects</span>
-</span><span id="L-107"><a href="#L-107"><span class="linenos">107</span></a>                <span class="k">elif</span> <span class="n">valid_type</span> <span class="o">==</span> <span class="n">Sized</span><span class="p">:</span>
-</span><span id="L-108"><a href="#L-108"><span class="linenos">108</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-109"><a href="#L-109"><span class="linenos">109</span></a>                        <span class="nb">list</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-110"><a href="#L-110"><span class="linenos">110</span></a>                        <span class="nb">tuple</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-111"><a href="#L-111"><span class="linenos">111</span></a>                        <span class="nb">dict</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-112"><a href="#L-112"><span class="linenos">112</span></a>                        <span class="nb">set</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-113"><a href="#L-113"><span class="linenos">113</span></a>                        <span class="nb">str</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-114"><a href="#L-114"><span class="linenos">114</span></a>                        <span class="nb">bytes</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-115"><a href="#L-115"><span class="linenos">115</span></a>                        <span class="nb">bytearray</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-116"><a href="#L-116"><span class="linenos">116</span></a>                        <span class="nb">memoryview</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-117"><a href="#L-117"><span class="linenos">117</span></a>                        <span class="nb">range</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-118"><a href="#L-118"><span class="linenos">118</span></a>                        <span class="c1"># Allow nested types to be passed as well</span>
-</span><span id="L-119"><a href="#L-119"><span class="linenos">119</span></a>                        <span class="o">**</span><span class="n">valid_types</span><span class="p">,</span>
-</span><span id="L-120"><a href="#L-120"><span class="linenos">120</span></a>                    <span class="p">}</span>
-</span><span id="L-121"><a href="#L-121"><span class="linenos">121</span></a>                <span class="c1"># Handle uninitialized class type objects (e.g. MyCustomClass)</span>
-</span><span id="L-122"><a href="#L-122"><span class="linenos">122</span></a>                <span class="k">elif</span> <span class="n">valid_type</span> <span class="o">==</span> <span class="n">Callable</span><span class="p">:</span>
-</span><span id="L-123"><a href="#L-123"><span class="linenos">123</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-124"><a href="#L-124"><span class="linenos">124</span></a>                        <span class="nb">staticmethod</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-125"><a href="#L-125"><span class="linenos">125</span></a>                        <span class="nb">classmethod</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-126"><a href="#L-126"><span class="linenos">126</span></a>                        <span class="n">FunctionType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-127"><a href="#L-127"><span class="linenos">127</span></a>                        <span class="n">BuiltinFunctionType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-128"><a href="#L-128"><span class="linenos">128</span></a>                        <span class="n">MethodType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-129"><a href="#L-129"><span class="linenos">129</span></a>                        <span class="n">BuiltinMethodType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-130"><a href="#L-130"><span class="linenos">130</span></a>                        <span class="n">GeneratorType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="L-131"><a href="#L-131"><span class="linenos">131</span></a>                        <span class="o">**</span><span class="n">valid_types</span><span class="p">,</span>
-</span><span id="L-132"><a href="#L-132"><span class="linenos">132</span></a>                    <span class="p">}</span>
-</span><span id="L-133"><a href="#L-133"><span class="linenos">133</span></a>                <span class="k">else</span><span class="p">:</span>
-</span><span id="L-134"><a href="#L-134"><span class="linenos">134</span></a>                    <span class="n">valid_types</span><span class="p">[</span><span class="n">valid_type</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="L-135"><a href="#L-135"><span class="linenos">135</span></a>            <span class="c1"># Handle special &#39;|&#39; syntax for Union Types</span>
-</span><span id="L-136"><a href="#L-136"><span class="linenos">136</span></a>            <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">valid_type</span><span class="p">,</span> <span class="n">UnionType</span><span class="p">):</span>
-</span><span id="L-137"><a href="#L-137"><span class="linenos">137</span></a>                <span class="n">valid_types</span><span class="o">.</span><span class="n">update</span><span class="p">(</span>
-</span><span id="L-138"><a href="#L-138"><span class="linenos">138</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__get_checkable_type__</span><span class="p">(</span><span class="n">valid_type</span><span class="o">.</span><span class="n">__args__</span><span class="p">)</span>
-</span><span id="L-139"><a href="#L-139"><span class="linenos">139</span></a>                <span class="p">)</span>
-</span><span id="L-140"><a href="#L-140"><span class="linenos">140</span></a>            <span class="k">else</span><span class="p">:</span>
-</span><span id="L-141"><a href="#L-141"><span class="linenos">141</span></a>                <span class="n">valid_types</span><span class="p">[</span><span class="n">valid_type</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="L-142"><a href="#L-142"><span class="linenos">142</span></a>        <span class="k">return</span> <span class="n">valid_types</span>
-</span><span id="L-143"><a href="#L-143"><span class="linenos">143</span></a>
-</span><span id="L-144"><a href="#L-144"><span class="linenos">144</span></a>    <span class="k">def</span> <span class="nf">__exception__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">):</span>
-</span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a><span class="sd">        Usage:</span>
+</span><span id="L-102"><a href="#L-102"><span class="linenos">102</span></a>                    <span class="n">valid_types</span><span class="p">[</span><span class="s2">&quot;__extra__&quot;</span><span class="p">][</span>
+</span><span id="L-103"><a href="#L-103"><span class="linenos">103</span></a>                        <span class="s2">&quot;__literal__&quot;</span>
+</span><span id="L-104"><a href="#L-104"><span class="linenos">104</span></a>                    <span class="p">]</span> <span class="o">=</span> <span class="n">valid_type</span><span class="o">.</span><span class="n">__args__</span>
+</span><span id="L-105"><a href="#L-105"><span class="linenos">105</span></a>                <span class="c1"># Handle Sized objects</span>
+</span><span id="L-106"><a href="#L-106"><span class="linenos">106</span></a>                <span class="k">elif</span> <span class="n">valid_type</span> <span class="o">==</span> <span class="n">Sized</span><span class="p">:</span>
+</span><span id="L-107"><a href="#L-107"><span class="linenos">107</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-108"><a href="#L-108"><span class="linenos">108</span></a>                        <span class="nb">list</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-109"><a href="#L-109"><span class="linenos">109</span></a>                        <span class="nb">tuple</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-110"><a href="#L-110"><span class="linenos">110</span></a>                        <span class="nb">dict</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-111"><a href="#L-111"><span class="linenos">111</span></a>                        <span class="nb">set</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-112"><a href="#L-112"><span class="linenos">112</span></a>                        <span class="nb">str</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-113"><a href="#L-113"><span class="linenos">113</span></a>                        <span class="nb">bytes</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-114"><a href="#L-114"><span class="linenos">114</span></a>                        <span class="nb">bytearray</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-115"><a href="#L-115"><span class="linenos">115</span></a>                        <span class="nb">memoryview</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-116"><a href="#L-116"><span class="linenos">116</span></a>                        <span class="nb">range</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-117"><a href="#L-117"><span class="linenos">117</span></a>                        <span class="c1"># Allow nested types to be passed as well</span>
+</span><span id="L-118"><a href="#L-118"><span class="linenos">118</span></a>                        <span class="o">**</span><span class="n">valid_types</span><span class="p">,</span>
+</span><span id="L-119"><a href="#L-119"><span class="linenos">119</span></a>                    <span class="p">}</span>
+</span><span id="L-120"><a href="#L-120"><span class="linenos">120</span></a>                <span class="c1"># Handle uninitialized class type objects (e.g. MyCustomClass)</span>
+</span><span id="L-121"><a href="#L-121"><span class="linenos">121</span></a>                <span class="k">elif</span> <span class="n">valid_type</span> <span class="o">==</span> <span class="n">Callable</span><span class="p">:</span>
+</span><span id="L-122"><a href="#L-122"><span class="linenos">122</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-123"><a href="#L-123"><span class="linenos">123</span></a>                        <span class="nb">staticmethod</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-124"><a href="#L-124"><span class="linenos">124</span></a>                        <span class="nb">classmethod</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-125"><a href="#L-125"><span class="linenos">125</span></a>                        <span class="n">FunctionType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-126"><a href="#L-126"><span class="linenos">126</span></a>                        <span class="n">BuiltinFunctionType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-127"><a href="#L-127"><span class="linenos">127</span></a>                        <span class="n">MethodType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-128"><a href="#L-128"><span class="linenos">128</span></a>                        <span class="n">BuiltinMethodType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-129"><a href="#L-129"><span class="linenos">129</span></a>                        <span class="n">GeneratorType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-130"><a href="#L-130"><span class="linenos">130</span></a>                        <span class="o">**</span><span class="n">valid_types</span><span class="p">,</span>
+</span><span id="L-131"><a href="#L-131"><span class="linenos">131</span></a>                    <span class="p">}</span>
+</span><span id="L-132"><a href="#L-132"><span class="linenos">132</span></a>                <span class="k">else</span><span class="p">:</span>
+</span><span id="L-133"><a href="#L-133"><span class="linenos">133</span></a>                    <span class="n">valid_types</span><span class="p">[</span><span class="n">valid_type</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="L-134"><a href="#L-134"><span class="linenos">134</span></a>            <span class="c1"># Handle special &#39;|&#39; syntax for Union Types</span>
+</span><span id="L-135"><a href="#L-135"><span class="linenos">135</span></a>            <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">valid_type</span><span class="p">,</span> <span class="n">UnionType</span><span class="p">):</span>
+</span><span id="L-136"><a href="#L-136"><span class="linenos">136</span></a>                <span class="n">valid_types</span><span class="o">.</span><span class="n">update</span><span class="p">(</span>
+</span><span id="L-137"><a href="#L-137"><span class="linenos">137</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__get_checkable_type__</span><span class="p">(</span><span class="n">valid_type</span><span class="o">.</span><span class="n">__args__</span><span class="p">)</span>
+</span><span id="L-138"><a href="#L-138"><span class="linenos">138</span></a>                <span class="p">)</span>
+</span><span id="L-139"><a href="#L-139"><span class="linenos">139</span></a>            <span class="c1"># Handle Constraints</span>
+</span><span id="L-140"><a href="#L-140"><span class="linenos">140</span></a>            <span class="c1"># Note: These will be handled separately in the self.__check_type__</span>
+</span><span id="L-141"><a href="#L-141"><span class="linenos">141</span></a>            <span class="c1"># as the object is validated differently than a type.</span>
+</span><span id="L-142"><a href="#L-142"><span class="linenos">142</span></a>            <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">valid_type</span><span class="p">,</span> <span class="n">GenericConstraint</span><span class="p">):</span>
+</span><span id="L-143"><a href="#L-143"><span class="linenos">143</span></a>                <span class="n">valid_types</span><span class="p">[</span><span class="s2">&quot;__extra__&quot;</span><span class="p">][</span><span class="s2">&quot;__constraint__&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">valid_type</span>
+</span><span id="L-144"><a href="#L-144"><span class="linenos">144</span></a>            <span class="k">else</span><span class="p">:</span>
+</span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a>                <span class="n">valid_types</span><span class="p">[</span><span class="n">valid_type</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a>        <span class="k">return</span> <span class="n">valid_types</span>
 </span><span id="L-147"><a href="#L-147"><span class="linenos">147</span></a>
-</span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a><span class="sd">        - Creates a class based exception message</span>
-</span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a>
-</span><span id="L-150"><a href="#L-150"><span class="linenos">150</span></a><span class="sd">        Requires:</span>
+</span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a>    <span class="k">def</span> <span class="nf">__exception__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">):</span>
+</span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-150"><a href="#L-150"><span class="linenos">150</span></a><span class="sd">        Usage:</span>
 </span><span id="L-151"><a href="#L-151"><span class="linenos">151</span></a>
-</span><span id="L-152"><a href="#L-152"><span class="linenos">152</span></a><span class="sd">        - `message`:</span>
-</span><span id="L-153"><a href="#L-153"><span class="linenos">153</span></a><span class="sd">            - Type: str</span>
-</span><span id="L-154"><a href="#L-154"><span class="linenos">154</span></a><span class="sd">            - What: The message to warn users with</span>
-</span><span id="L-155"><a href="#L-155"><span class="linenos">155</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="L-156"><a href="#L-156"><span class="linenos">156</span></a>        <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2">): </span><span class="si">{</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
-</span><span id="L-157"><a href="#L-157"><span class="linenos">157</span></a>
-</span><span id="L-158"><a href="#L-158"><span class="linenos">158</span></a>    <span class="k">def</span> <span class="fm">__get__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">objtype</span><span class="p">):</span>
-</span><span id="L-159"><a href="#L-159"><span class="linenos">159</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="L-160"><a href="#L-160"><span class="linenos">160</span></a><span class="sd">        Overwrite standard __get__ method to return __call__ instead for wrapped class methods.</span>
+</span><span id="L-152"><a href="#L-152"><span class="linenos">152</span></a><span class="sd">        - Creates a class based exception message</span>
+</span><span id="L-153"><a href="#L-153"><span class="linenos">153</span></a>
+</span><span id="L-154"><a href="#L-154"><span class="linenos">154</span></a><span class="sd">        Requires:</span>
+</span><span id="L-155"><a href="#L-155"><span class="linenos">155</span></a>
+</span><span id="L-156"><a href="#L-156"><span class="linenos">156</span></a><span class="sd">        - `message`:</span>
+</span><span id="L-157"><a href="#L-157"><span class="linenos">157</span></a><span class="sd">            - Type: str</span>
+</span><span id="L-158"><a href="#L-158"><span class="linenos">158</span></a><span class="sd">            - What: The message to warn users with</span>
+</span><span id="L-159"><a href="#L-159"><span class="linenos">159</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="L-160"><a href="#L-160"><span class="linenos">160</span></a>        <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2">): </span><span class="si">{</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
 </span><span id="L-161"><a href="#L-161"><span class="linenos">161</span></a>
-</span><span id="L-162"><a href="#L-162"><span class="linenos">162</span></a><span class="sd">        Also stores the calling (__get__) `obj` to be passed as an initial argument for `__call__` such that methods can pass `self` correctly.</span>
-</span><span id="L-163"><a href="#L-163"><span class="linenos">163</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="L-164"><a href="#L-164"><span class="linenos">164</span></a>
-</span><span id="L-165"><a href="#L-165"><span class="linenos">165</span></a>        <span class="nd">@wraps</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">)</span>
-</span><span id="L-166"><a href="#L-166"><span class="linenos">166</span></a>        <span class="k">def</span> <span class="nf">__get_fn__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-</span><span id="L-167"><a href="#L-167"><span class="linenos">167</span></a>            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="fm">__call__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+</span><span id="L-162"><a href="#L-162"><span class="linenos">162</span></a>    <span class="k">def</span> <span class="fm">__get__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">objtype</span><span class="p">):</span>
+</span><span id="L-163"><a href="#L-163"><span class="linenos">163</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-164"><a href="#L-164"><span class="linenos">164</span></a><span class="sd">        Overwrite standard __get__ method to return __call__ instead for wrapped class methods.</span>
+</span><span id="L-165"><a href="#L-165"><span class="linenos">165</span></a>
+</span><span id="L-166"><a href="#L-166"><span class="linenos">166</span></a><span class="sd">        Also stores the calling (__get__) `obj` to be passed as an initial argument for `__call__` such that methods can pass `self` correctly.</span>
+</span><span id="L-167"><a href="#L-167"><span class="linenos">167</span></a><span class="sd">        &quot;&quot;&quot;</span>
 </span><span id="L-168"><a href="#L-168"><span class="linenos">168</span></a>
-</span><span id="L-169"><a href="#L-169"><span class="linenos">169</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span> <span class="o">=</span> <span class="n">obj</span>
-</span><span id="L-170"><a href="#L-170"><span class="linenos">170</span></a>        <span class="k">return</span> <span class="n">__get_fn__</span>
-</span><span id="L-171"><a href="#L-171"><span class="linenos">171</span></a>
-</span><span id="L-172"><a href="#L-172"><span class="linenos">172</span></a>    <span class="k">def</span> <span class="nf">__check_method_function__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-</span><span id="L-173"><a href="#L-173"><span class="linenos">173</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="L-174"><a href="#L-174"><span class="linenos">174</span></a><span class="sd">        Validate that `self.__fn__` is a method or function</span>
-</span><span id="L-175"><a href="#L-175"><span class="linenos">175</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="L-176"><a href="#L-176"><span class="linenos">176</span></a>        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span> <span class="p">(</span><span class="n">MethodType</span><span class="p">,</span> <span class="n">FunctionType</span><span class="p">)):</span>
-</span><span id="L-177"><a href="#L-177"><span class="linenos">177</span></a>            <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span>
-</span><span id="L-178"><a href="#L-178"><span class="linenos">178</span></a>                <span class="sa">f</span><span class="s2">&quot;A non function/method was passed to Enforcer. See the stack trace above for more information.&quot;</span>
-</span><span id="L-179"><a href="#L-179"><span class="linenos">179</span></a>            <span class="p">)</span>
-</span><span id="L-180"><a href="#L-180"><span class="linenos">180</span></a>
-</span><span id="L-181"><a href="#L-181"><span class="linenos">181</span></a>    <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-</span><span id="L-182"><a href="#L-182"><span class="linenos">182</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="L-183"><a href="#L-183"><span class="linenos">183</span></a><span class="sd">        This method is used to validate the passed inputs and return the output of the wrapped function or method.</span>
-</span><span id="L-184"><a href="#L-184"><span class="linenos">184</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="L-185"><a href="#L-185"><span class="linenos">185</span></a>        <span class="c1"># Special code to pass self as an initial argument</span>
-</span><span id="L-186"><a href="#L-186"><span class="linenos">186</span></a>        <span class="c1"># for validation purposes in methods</span>
-</span><span id="L-187"><a href="#L-187"><span class="linenos">187</span></a>        <span class="c1"># See: self.__get__</span>
-</span><span id="L-188"><a href="#L-188"><span class="linenos">188</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="L-189"><a href="#L-189"><span class="linenos">189</span></a>            <span class="n">args</span> <span class="o">=</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">)</span>
-</span><span id="L-190"><a href="#L-190"><span class="linenos">190</span></a>        <span class="c1"># Create a compreshensive dictionary of assigned variables (order matters)</span>
-</span><span id="L-191"><a href="#L-191"><span class="linenos">191</span></a>        <span class="n">assigned_vars</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="L-192"><a href="#L-192"><span class="linenos">192</span></a>            <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn_defaults__</span><span class="p">,</span>
-</span><span id="L-193"><a href="#L-193"><span class="linenos">193</span></a>            <span class="o">**</span><span class="nb">dict</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__code__</span><span class="o">.</span><span class="n">co_varnames</span><span class="p">[:</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)],</span> <span class="n">args</span><span class="p">)),</span>
-</span><span id="L-194"><a href="#L-194"><span class="linenos">194</span></a>            <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
-</span><span id="L-195"><a href="#L-195"><span class="linenos">195</span></a>        <span class="p">}</span>
-</span><span id="L-196"><a href="#L-196"><span class="linenos">196</span></a>        <span class="c1"># Validate all listed annotations vs the assigned_vars dictionary</span>
-</span><span id="L-197"><a href="#L-197"><span class="linenos">197</span></a>        <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__checkable_types__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
-</span><span id="L-198"><a href="#L-198"><span class="linenos">198</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">assigned_vars</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">),</span> <span class="n">value</span><span class="p">,</span> <span class="n">key</span><span class="p">)</span>
-</span><span id="L-199"><a href="#L-199"><span class="linenos">199</span></a>        <span class="c1"># Execute the function callable</span>
-</span><span id="L-200"><a href="#L-200"><span class="linenos">200</span></a>        <span class="n">return_value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
-</span><span id="L-201"><a href="#L-201"><span class="linenos">201</span></a>        <span class="c1"># If a return type was passed, validate the returned object</span>
-</span><span id="L-202"><a href="#L-202"><span class="linenos">202</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__return_type__</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="L-203"><a href="#L-203"><span class="linenos">203</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">return_value</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">__return_type__</span><span class="p">,</span> <span class="s2">&quot;return&quot;</span><span class="p">)</span>
-</span><span id="L-204"><a href="#L-204"><span class="linenos">204</span></a>        <span class="k">return</span> <span class="n">return_value</span>
-</span><span id="L-205"><a href="#L-205"><span class="linenos">205</span></a>
-</span><span id="L-206"><a href="#L-206"><span class="linenos">206</span></a>    <span class="k">def</span> <span class="nf">__check_type__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">acceptable_types</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
-</span><span id="L-207"><a href="#L-207"><span class="linenos">207</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="L-208"><a href="#L-208"><span class="linenos">208</span></a><span class="sd">        Raises an exception the type of a passed `obj` (parameter) is not in the list of supplied `acceptable_types` for the argument.</span>
-</span><span id="L-209"><a href="#L-209"><span class="linenos">209</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="L-210"><a href="#L-210"><span class="linenos">210</span></a>        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="nb">type</span><span class="p">):</span>
-</span><span id="L-211"><a href="#L-211"><span class="linenos">211</span></a>            <span class="n">passed_type</span> <span class="o">=</span> <span class="n">Type</span><span class="p">[</span><span class="n">obj</span><span class="p">]</span>
-</span><span id="L-212"><a href="#L-212"><span class="linenos">212</span></a>        <span class="k">else</span><span class="p">:</span>
-</span><span id="L-213"><a href="#L-213"><span class="linenos">213</span></a>            <span class="n">passed_type</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span>
-</span><span id="L-214"><a href="#L-214"><span class="linenos">214</span></a>        <span class="k">if</span> <span class="n">passed_type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">acceptable_types</span><span class="p">:</span>
-</span><span id="L-215"><a href="#L-215"><span class="linenos">215</span></a>            <span class="c1"># Add special string to store any string to add before acceptable types</span>
-</span><span id="L-216"><a href="#L-216"><span class="linenos">216</span></a>            <span class="c1"># in any exception message</span>
-</span><span id="L-217"><a href="#L-217"><span class="linenos">217</span></a>            <span class="n">pre_acceptable_types_str</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
-</span><span id="L-218"><a href="#L-218"><span class="linenos">218</span></a>            <span class="c1"># Special check for Literals</span>
-</span><span id="L-219"><a href="#L-219"><span class="linenos">219</span></a>            <span class="k">if</span> <span class="n">Literal</span> <span class="ow">in</span> <span class="n">acceptable_types</span><span class="p">:</span>
-</span><span id="L-220"><a href="#L-220"><span class="linenos">220</span></a>                <span class="k">if</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">acceptable_types</span><span class="p">[</span><span class="n">Literal</span><span class="p">]:</span>
-</span><span id="L-221"><a href="#L-221"><span class="linenos">221</span></a>                    <span class="k">return</span>
-</span><span id="L-222"><a href="#L-222"><span class="linenos">222</span></a>                <span class="k">else</span><span class="p">:</span>
-</span><span id="L-223"><a href="#L-223"><span class="linenos">223</span></a>                    <span class="n">pre_acceptable_types_str</span> <span class="o">=</span> <span class="s2">&quot;Literal&quot;</span>
-</span><span id="L-224"><a href="#L-224"><span class="linenos">224</span></a>                    <span class="n">acceptable_types</span> <span class="o">=</span> <span class="n">acceptable_types</span><span class="p">[</span><span class="n">Literal</span><span class="p">]</span>
-</span><span id="L-225"><a href="#L-225"><span class="linenos">225</span></a>                    <span class="n">passed_type</span> <span class="o">=</span> <span class="n">obj</span>
-</span><span id="L-226"><a href="#L-226"><span class="linenos">226</span></a>            <span class="c1"># Raise the exception</span>
-</span><span id="L-227"><a href="#L-227"><span class="linenos">227</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
-</span><span id="L-228"><a href="#L-228"><span class="linenos">228</span></a>                <span class="sa">f</span><span class="s2">&quot;Type mismatch for typed variable `</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">`. Expected one of the following `</span><span class="si">{</span><span class="n">pre_acceptable_types_str</span><span class="si">}{</span><span class="nb">str</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">acceptable_types</span><span class="o">.</span><span class="n">keys</span><span class="p">()))</span><span class="si">}</span><span class="s2">` but got `</span><span class="si">{</span><span class="n">passed_type</span><span class="si">}</span><span class="s2">` instead.&quot;</span>
-</span><span id="L-229"><a href="#L-229"><span class="linenos">229</span></a>            <span class="p">)</span>
-</span><span id="L-230"><a href="#L-230"><span class="linenos">230</span></a>        <span class="n">sub_type</span> <span class="o">=</span> <span class="n">acceptable_types</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">passed_type</span><span class="p">)</span>
-</span><span id="L-231"><a href="#L-231"><span class="linenos">231</span></a>        <span class="k">if</span> <span class="n">sub_type</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="L-232"><a href="#L-232"><span class="linenos">232</span></a>            <span class="k">if</span> <span class="n">passed_type</span> <span class="o">==</span> <span class="nb">dict</span><span class="p">:</span>
-</span><span id="L-233"><a href="#L-233"><span class="linenos">233</span></a>                <span class="k">for</span> <span class="n">sub_key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">obj</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
-</span><span id="L-234"><a href="#L-234"><span class="linenos">234</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">sub_type</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">[</span><span class="si">{</span><span class="n">sub_key</span><span class="si">}</span><span class="s2">]&quot;</span><span class="p">)</span>
-</span><span id="L-235"><a href="#L-235"><span class="linenos">235</span></a>            <span class="k">else</span><span class="p">:</span>
-</span><span id="L-236"><a href="#L-236"><span class="linenos">236</span></a>                <span class="k">for</span> <span class="n">sub_key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
-</span><span id="L-237"><a href="#L-237"><span class="linenos">237</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">sub_type</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">[</span><span class="si">{</span><span class="n">sub_key</span><span class="si">}</span><span class="s2">]&quot;</span><span class="p">)</span>
-</span><span id="L-238"><a href="#L-238"><span class="linenos">238</span></a>
-</span><span id="L-239"><a href="#L-239"><span class="linenos">239</span></a>    <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-</span><span id="L-240"><a href="#L-240"><span class="linenos">240</span></a>        <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;&lt;type_enforced </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__module__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2"> object at </span><span class="si">{</span><span class="nb">hex</span><span class="p">(</span><span class="nb">id</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span><span class="si">}</span><span class="s2">&gt;&quot;</span>
-</span><span id="L-241"><a href="#L-241"><span class="linenos">241</span></a>
-</span><span id="L-242"><a href="#L-242"><span class="linenos">242</span></a>
-</span><span id="L-243"><a href="#L-243"><span class="linenos">243</span></a><span class="k">def</span> <span class="nf">Enforcer</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="n">enabled</span><span class="p">):</span>
-</span><span id="L-244"><a href="#L-244"><span class="linenos">244</span></a><span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="L-245"><a href="#L-245"><span class="linenos">245</span></a><span class="sd">    A wrapper to enforce types within a function or method given argument annotations.</span>
-</span><span id="L-246"><a href="#L-246"><span class="linenos">246</span></a>
-</span><span id="L-247"><a href="#L-247"><span class="linenos">247</span></a><span class="sd">    Each wrapped item is converted into a special `FunctionMethodEnforcer` class object that validates the passed parameters for the function or method when it is called. If a function or method that is passed does not have any annotations, it is not converted into a `FunctionMethodEnforcer` class as no validation is possible.</span>
-</span><span id="L-248"><a href="#L-248"><span class="linenos">248</span></a>
-</span><span id="L-249"><a href="#L-249"><span class="linenos">249</span></a><span class="sd">    If wrapping a class, all methods in the class that meet any of the following criteria will be wrapped individually:</span>
-</span><span id="L-250"><a href="#L-250"><span class="linenos">250</span></a>
-</span><span id="L-251"><a href="#L-251"><span class="linenos">251</span></a><span class="sd">    - Methods with `__call__`</span>
-</span><span id="L-252"><a href="#L-252"><span class="linenos">252</span></a><span class="sd">    - Methods wrapped with `staticmethod` (if python &gt;= 3.10)</span>
-</span><span id="L-253"><a href="#L-253"><span class="linenos">253</span></a><span class="sd">    - Methods wrapped with `classmethod` (if python &gt;= 3.10)</span>
-</span><span id="L-254"><a href="#L-254"><span class="linenos">254</span></a>
-</span><span id="L-255"><a href="#L-255"><span class="linenos">255</span></a><span class="sd">    Requires:</span>
-</span><span id="L-256"><a href="#L-256"><span class="linenos">256</span></a>
-</span><span id="L-257"><a href="#L-257"><span class="linenos">257</span></a><span class="sd">    - `clsFnMethod`:</span>
-</span><span id="L-258"><a href="#L-258"><span class="linenos">258</span></a><span class="sd">        - What: The class, function or method that should have input types enforced</span>
-</span><span id="L-259"><a href="#L-259"><span class="linenos">259</span></a><span class="sd">        - Type: function | method | class</span>
-</span><span id="L-260"><a href="#L-260"><span class="linenos">260</span></a>
-</span><span id="L-261"><a href="#L-261"><span class="linenos">261</span></a><span class="sd">    Example Use:</span>
-</span><span id="L-262"><a href="#L-262"><span class="linenos">262</span></a><span class="sd">    ```</span>
-</span><span id="L-263"><a href="#L-263"><span class="linenos">263</span></a><span class="sd">    &gt;&gt;&gt; import type_enforced</span>
-</span><span id="L-264"><a href="#L-264"><span class="linenos">264</span></a><span class="sd">    &gt;&gt;&gt; @type_enforced.Enforcer</span>
-</span><span id="L-265"><a href="#L-265"><span class="linenos">265</span></a><span class="sd">    ... def my_fn(a: int , b: [int, str] =2, c: int =3) -&gt; None:</span>
-</span><span id="L-266"><a href="#L-266"><span class="linenos">266</span></a><span class="sd">    ...     pass</span>
-</span><span id="L-267"><a href="#L-267"><span class="linenos">267</span></a><span class="sd">    ...</span>
-</span><span id="L-268"><a href="#L-268"><span class="linenos">268</span></a><span class="sd">    &gt;&gt;&gt; my_fn(a=1, b=2, c=3)</span>
-</span><span id="L-269"><a href="#L-269"><span class="linenos">269</span></a><span class="sd">    &gt;&gt;&gt; my_fn(a=1, b=&#39;2&#39;, c=3)</span>
-</span><span id="L-270"><a href="#L-270"><span class="linenos">270</span></a><span class="sd">    &gt;&gt;&gt; my_fn(a=&#39;a&#39;, b=2, c=3)</span>
-</span><span id="L-271"><a href="#L-271"><span class="linenos">271</span></a><span class="sd">    Traceback (most recent call last):</span>
-</span><span id="L-272"><a href="#L-272"><span class="linenos">272</span></a><span class="sd">      File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;</span>
-</span><span id="L-273"><a href="#L-273"><span class="linenos">273</span></a><span class="sd">      File &quot;/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py&quot;, line 85, in __call__</span>
-</span><span id="L-274"><a href="#L-274"><span class="linenos">274</span></a><span class="sd">        self.__check_type__(assigned_vars.get(key), value, key)</span>
-</span><span id="L-275"><a href="#L-275"><span class="linenos">275</span></a><span class="sd">      File &quot;/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py&quot;, line 107, in __check_type__</span>
-</span><span id="L-276"><a href="#L-276"><span class="linenos">276</span></a><span class="sd">        self.__exception__(</span>
-</span><span id="L-277"><a href="#L-277"><span class="linenos">277</span></a><span class="sd">      File &quot;/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py&quot;, line 34, in __exception__</span>
-</span><span id="L-278"><a href="#L-278"><span class="linenos">278</span></a><span class="sd">        raise Exception(f&quot;({self.__fn__.__qualname__}): {message}&quot;)</span>
-</span><span id="L-279"><a href="#L-279"><span class="linenos">279</span></a><span class="sd">    Exception: (my_fn): Type mismatch for typed variable `a`. Expected one of the following `[&lt;class &#39;int&#39;&gt;]` but got `&lt;class &#39;str&#39;&gt;` instead.</span>
-</span><span id="L-280"><a href="#L-280"><span class="linenos">280</span></a><span class="sd">    ```</span>
-</span><span id="L-281"><a href="#L-281"><span class="linenos">281</span></a><span class="sd">    &quot;&quot;&quot;</span>
-</span><span id="L-282"><a href="#L-282"><span class="linenos">282</span></a>    <span class="k">if</span> <span class="ow">not</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="s2">&quot;__enforcer_enabled__&quot;</span><span class="p">):</span>
-</span><span id="L-283"><a href="#L-283"><span class="linenos">283</span></a>        <span class="n">clsFnMethod</span><span class="o">.</span><span class="n">__enforcer_enabled__</span> <span class="o">=</span> <span class="n">enabled</span>
-</span><span id="L-284"><a href="#L-284"><span class="linenos">284</span></a>    <span class="k">if</span> <span class="n">clsFnMethod</span><span class="o">.</span><span class="n">__enforcer_enabled__</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span>
-</span><span id="L-285"><a href="#L-285"><span class="linenos">285</span></a>        <span class="k">return</span> <span class="n">clsFnMethod</span>
-</span><span id="L-286"><a href="#L-286"><span class="linenos">286</span></a>    <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span>
-</span><span id="L-287"><a href="#L-287"><span class="linenos">287</span></a>        <span class="n">clsFnMethod</span><span class="p">,</span> <span class="p">(</span><span class="nb">staticmethod</span><span class="p">,</span> <span class="nb">classmethod</span><span class="p">,</span> <span class="n">FunctionType</span><span class="p">,</span> <span class="n">MethodType</span><span class="p">)</span>
-</span><span id="L-288"><a href="#L-288"><span class="linenos">288</span></a>    <span class="p">):</span>
-</span><span id="L-289"><a href="#L-289"><span class="linenos">289</span></a>        <span class="c1"># Only apply the enforcer if annotations are specified</span>
-</span><span id="L-290"><a href="#L-290"><span class="linenos">290</span></a>        <span class="k">if</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="s2">&quot;__annotations__&quot;</span><span class="p">,</span> <span class="p">{})</span> <span class="o">==</span> <span class="p">{}:</span>
-</span><span id="L-291"><a href="#L-291"><span class="linenos">291</span></a>            <span class="k">return</span> <span class="n">clsFnMethod</span>
-</span><span id="L-292"><a href="#L-292"><span class="linenos">292</span></a>        <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="nb">staticmethod</span><span class="p">):</span>
-</span><span id="L-293"><a href="#L-293"><span class="linenos">293</span></a>            <span class="k">return</span> <span class="nb">staticmethod</span><span class="p">(</span><span class="n">FunctionMethodEnforcer</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="o">.</span><span class="vm">__func__</span><span class="p">))</span>
-</span><span id="L-294"><a href="#L-294"><span class="linenos">294</span></a>        <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="nb">classmethod</span><span class="p">):</span>
-</span><span id="L-295"><a href="#L-295"><span class="linenos">295</span></a>            <span class="k">return</span> <span class="nb">classmethod</span><span class="p">(</span><span class="n">FunctionMethodEnforcer</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="o">.</span><span class="vm">__func__</span><span class="p">))</span>
-</span><span id="L-296"><a href="#L-296"><span class="linenos">296</span></a>        <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="p">(</span><span class="n">FunctionType</span><span class="p">,</span> <span class="n">MethodType</span><span class="p">)):</span>
-</span><span id="L-297"><a href="#L-297"><span class="linenos">297</span></a>            <span class="k">return</span> <span class="n">FunctionMethodEnforcer</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">)</span>
-</span><span id="L-298"><a href="#L-298"><span class="linenos">298</span></a>    <span class="k">elif</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="s2">&quot;__dict__&quot;</span><span class="p">):</span>
-</span><span id="L-299"><a href="#L-299"><span class="linenos">299</span></a>        <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">clsFnMethod</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
-</span><span id="L-300"><a href="#L-300"><span class="linenos">300</span></a>            <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="s2">&quot;__call__&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="nb">isinstance</span><span class="p">(</span>
-</span><span id="L-301"><a href="#L-301"><span class="linenos">301</span></a>                <span class="n">value</span><span class="p">,</span> <span class="p">(</span><span class="nb">classmethod</span><span class="p">,</span> <span class="nb">staticmethod</span><span class="p">)</span>
-</span><span id="L-302"><a href="#L-302"><span class="linenos">302</span></a>            <span class="p">):</span>
-</span><span id="L-303"><a href="#L-303"><span class="linenos">303</span></a>                <span class="nb">setattr</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">Enforcer</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">enabled</span><span class="o">=</span><span class="n">enabled</span><span class="p">))</span>
-</span><span id="L-304"><a href="#L-304"><span class="linenos">304</span></a>        <span class="k">return</span> <span class="n">clsFnMethod</span>
-</span><span id="L-305"><a href="#L-305"><span class="linenos">305</span></a>    <span class="k">else</span><span class="p">:</span>
-</span><span id="L-306"><a href="#L-306"><span class="linenos">306</span></a>        <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span>
-</span><span id="L-307"><a href="#L-307"><span class="linenos">307</span></a>            <span class="s2">&quot;Enforcer can only be used on class methods, functions, or classes.&quot;</span>
-</span><span id="L-308"><a href="#L-308"><span class="linenos">308</span></a>        <span class="p">)</span>
-</span><span id="L-309"><a href="#L-309"><span class="linenos">309</span></a>
-</span><span id="L-310"><a href="#L-310"><span class="linenos">310</span></a>
-</span><span id="L-311"><a href="#L-311"><span class="linenos">311</span></a><span class="n">Enforcer</span> <span class="o">=</span> <span class="n">Partial</span><span class="p">(</span><span class="n">Enforcer</span><span class="p">,</span> <span class="n">enabled</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="L-169"><a href="#L-169"><span class="linenos">169</span></a>        <span class="nd">@wraps</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">)</span>
+</span><span id="L-170"><a href="#L-170"><span class="linenos">170</span></a>        <span class="k">def</span> <span class="nf">__get_fn__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+</span><span id="L-171"><a href="#L-171"><span class="linenos">171</span></a>            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="fm">__call__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+</span><span id="L-172"><a href="#L-172"><span class="linenos">172</span></a>
+</span><span id="L-173"><a href="#L-173"><span class="linenos">173</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span> <span class="o">=</span> <span class="n">obj</span>
+</span><span id="L-174"><a href="#L-174"><span class="linenos">174</span></a>        <span class="k">return</span> <span class="n">__get_fn__</span>
+</span><span id="L-175"><a href="#L-175"><span class="linenos">175</span></a>
+</span><span id="L-176"><a href="#L-176"><span class="linenos">176</span></a>    <span class="k">def</span> <span class="nf">__check_method_function__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+</span><span id="L-177"><a href="#L-177"><span class="linenos">177</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-178"><a href="#L-178"><span class="linenos">178</span></a><span class="sd">        Validate that `self.__fn__` is a method or function</span>
+</span><span id="L-179"><a href="#L-179"><span class="linenos">179</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="L-180"><a href="#L-180"><span class="linenos">180</span></a>        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span> <span class="p">(</span><span class="n">MethodType</span><span class="p">,</span> <span class="n">FunctionType</span><span class="p">)):</span>
+</span><span id="L-181"><a href="#L-181"><span class="linenos">181</span></a>            <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span>
+</span><span id="L-182"><a href="#L-182"><span class="linenos">182</span></a>                <span class="sa">f</span><span class="s2">&quot;A non function/method was passed to Enforcer. See the stack trace above for more information.&quot;</span>
+</span><span id="L-183"><a href="#L-183"><span class="linenos">183</span></a>            <span class="p">)</span>
+</span><span id="L-184"><a href="#L-184"><span class="linenos">184</span></a>
+</span><span id="L-185"><a href="#L-185"><span class="linenos">185</span></a>    <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+</span><span id="L-186"><a href="#L-186"><span class="linenos">186</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-187"><a href="#L-187"><span class="linenos">187</span></a><span class="sd">        This method is used to validate the passed inputs and return the output of the wrapped function or method.</span>
+</span><span id="L-188"><a href="#L-188"><span class="linenos">188</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="L-189"><a href="#L-189"><span class="linenos">189</span></a>        <span class="c1"># Special code to pass self as an initial argument</span>
+</span><span id="L-190"><a href="#L-190"><span class="linenos">190</span></a>        <span class="c1"># for validation purposes in methods</span>
+</span><span id="L-191"><a href="#L-191"><span class="linenos">191</span></a>        <span class="c1"># See: self.__get__</span>
+</span><span id="L-192"><a href="#L-192"><span class="linenos">192</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-193"><a href="#L-193"><span class="linenos">193</span></a>            <span class="n">args</span> <span class="o">=</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">)</span>
+</span><span id="L-194"><a href="#L-194"><span class="linenos">194</span></a>        <span class="c1"># Create a compreshensive dictionary of assigned variables (order matters)</span>
+</span><span id="L-195"><a href="#L-195"><span class="linenos">195</span></a>        <span class="n">assigned_vars</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="L-196"><a href="#L-196"><span class="linenos">196</span></a>            <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn_defaults__</span><span class="p">,</span>
+</span><span id="L-197"><a href="#L-197"><span class="linenos">197</span></a>            <span class="o">**</span><span class="nb">dict</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__code__</span><span class="o">.</span><span class="n">co_varnames</span><span class="p">[:</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)],</span> <span class="n">args</span><span class="p">)),</span>
+</span><span id="L-198"><a href="#L-198"><span class="linenos">198</span></a>            <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
+</span><span id="L-199"><a href="#L-199"><span class="linenos">199</span></a>        <span class="p">}</span>
+</span><span id="L-200"><a href="#L-200"><span class="linenos">200</span></a>        <span class="c1"># Validate all listed annotations vs the assigned_vars dictionary</span>
+</span><span id="L-201"><a href="#L-201"><span class="linenos">201</span></a>        <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__checkable_types__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+</span><span id="L-202"><a href="#L-202"><span class="linenos">202</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">assigned_vars</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">),</span> <span class="n">value</span><span class="p">,</span> <span class="n">key</span><span class="p">)</span>
+</span><span id="L-203"><a href="#L-203"><span class="linenos">203</span></a>        <span class="c1"># Execute the function callable</span>
+</span><span id="L-204"><a href="#L-204"><span class="linenos">204</span></a>        <span class="n">return_value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+</span><span id="L-205"><a href="#L-205"><span class="linenos">205</span></a>        <span class="c1"># If a return type was passed, validate the returned object</span>
+</span><span id="L-206"><a href="#L-206"><span class="linenos">206</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__return_type__</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-207"><a href="#L-207"><span class="linenos">207</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">return_value</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">__return_type__</span><span class="p">,</span> <span class="s2">&quot;return&quot;</span><span class="p">)</span>
+</span><span id="L-208"><a href="#L-208"><span class="linenos">208</span></a>        <span class="k">return</span> <span class="n">return_value</span>
+</span><span id="L-209"><a href="#L-209"><span class="linenos">209</span></a>
+</span><span id="L-210"><a href="#L-210"><span class="linenos">210</span></a>    <span class="k">def</span> <span class="nf">__check_type__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">acceptable_types</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
+</span><span id="L-211"><a href="#L-211"><span class="linenos">211</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-212"><a href="#L-212"><span class="linenos">212</span></a><span class="sd">        Raises an exception the type of a passed `obj` (parameter) is not in the list of supplied `acceptable_types` for the argument.</span>
+</span><span id="L-213"><a href="#L-213"><span class="linenos">213</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="L-214"><a href="#L-214"><span class="linenos">214</span></a>        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="nb">type</span><span class="p">):</span>
+</span><span id="L-215"><a href="#L-215"><span class="linenos">215</span></a>            <span class="n">passed_type</span> <span class="o">=</span> <span class="n">Type</span><span class="p">[</span><span class="n">obj</span><span class="p">]</span>
+</span><span id="L-216"><a href="#L-216"><span class="linenos">216</span></a>        <span class="k">else</span><span class="p">:</span>
+</span><span id="L-217"><a href="#L-217"><span class="linenos">217</span></a>            <span class="n">passed_type</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span>
+</span><span id="L-218"><a href="#L-218"><span class="linenos">218</span></a>        <span class="n">acceptable_types</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">acceptable_types</span><span class="p">)</span>
+</span><span id="L-219"><a href="#L-219"><span class="linenos">219</span></a>        <span class="n">extra_types</span> <span class="o">=</span> <span class="n">acceptable_types</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;__extra__&quot;</span><span class="p">)</span>
+</span><span id="L-220"><a href="#L-220"><span class="linenos">220</span></a>        <span class="k">if</span> <span class="n">acceptable_types</span> <span class="o">!=</span> <span class="p">{}:</span>
+</span><span id="L-221"><a href="#L-221"><span class="linenos">221</span></a>            <span class="k">if</span> <span class="n">passed_type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">acceptable_types</span><span class="p">:</span>
+</span><span id="L-222"><a href="#L-222"><span class="linenos">222</span></a>                <span class="c1"># Raise the exception</span>
+</span><span id="L-223"><a href="#L-223"><span class="linenos">223</span></a>                <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
+</span><span id="L-224"><a href="#L-224"><span class="linenos">224</span></a>                    <span class="sa">f</span><span class="s2">&quot;Type mismatch for typed variable `</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">`. Expected one of the following `</span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">acceptable_types</span><span class="o">.</span><span class="n">keys</span><span class="p">()))</span><span class="si">}</span><span class="s2">` but got `</span><span class="si">{</span><span class="n">passed_type</span><span class="si">}</span><span class="s2">` instead.&quot;</span>
+</span><span id="L-225"><a href="#L-225"><span class="linenos">225</span></a>                <span class="p">)</span>
+</span><span id="L-226"><a href="#L-226"><span class="linenos">226</span></a>        <span class="n">sub_type</span> <span class="o">=</span> <span class="n">acceptable_types</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">passed_type</span><span class="p">)</span>
+</span><span id="L-227"><a href="#L-227"><span class="linenos">227</span></a>        <span class="k">if</span> <span class="n">sub_type</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-228"><a href="#L-228"><span class="linenos">228</span></a>            <span class="k">if</span> <span class="n">passed_type</span> <span class="o">==</span> <span class="nb">dict</span><span class="p">:</span>
+</span><span id="L-229"><a href="#L-229"><span class="linenos">229</span></a>                <span class="k">for</span> <span class="n">sub_key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">obj</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+</span><span id="L-230"><a href="#L-230"><span class="linenos">230</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">sub_type</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">[</span><span class="si">{</span><span class="n">sub_key</span><span class="si">}</span><span class="s2">]&quot;</span><span class="p">)</span>
+</span><span id="L-231"><a href="#L-231"><span class="linenos">231</span></a>            <span class="k">else</span><span class="p">:</span>
+</span><span id="L-232"><a href="#L-232"><span class="linenos">232</span></a>                <span class="k">for</span> <span class="n">sub_key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
+</span><span id="L-233"><a href="#L-233"><span class="linenos">233</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">sub_type</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">[</span><span class="si">{</span><span class="n">sub_key</span><span class="si">}</span><span class="s2">]&quot;</span><span class="p">)</span>
+</span><span id="L-234"><a href="#L-234"><span class="linenos">234</span></a>        <span class="c1"># Special check for Literal types</span>
+</span><span id="L-235"><a href="#L-235"><span class="linenos">235</span></a>        <span class="n">literal_options</span> <span class="o">=</span> <span class="n">extra_types</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;__literal__&quot;</span><span class="p">)</span>
+</span><span id="L-236"><a href="#L-236"><span class="linenos">236</span></a>        <span class="k">if</span> <span class="n">literal_options</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-237"><a href="#L-237"><span class="linenos">237</span></a>            <span class="k">if</span> <span class="n">obj</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">literal_options</span><span class="p">:</span>
+</span><span id="L-238"><a href="#L-238"><span class="linenos">238</span></a>                <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
+</span><span id="L-239"><a href="#L-239"><span class="linenos">239</span></a>                    <span class="sa">f</span><span class="s2">&quot;Literal validation error for variable `</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">`. Expected one of the following `</span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">literal_options</span><span class="p">))</span><span class="si">}</span><span class="s2">` but got `</span><span class="si">{</span><span class="n">obj</span><span class="si">}</span><span class="s2">` instead.&quot;</span>
+</span><span id="L-240"><a href="#L-240"><span class="linenos">240</span></a>                <span class="p">)</span>
+</span><span id="L-241"><a href="#L-241"><span class="linenos">241</span></a>        <span class="c1"># Special check for Constraints</span>
+</span><span id="L-242"><a href="#L-242"><span class="linenos">242</span></a>        <span class="n">constraint</span> <span class="o">=</span> <span class="n">extra_types</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;__constraint__&quot;</span><span class="p">)</span>
+</span><span id="L-243"><a href="#L-243"><span class="linenos">243</span></a>        <span class="k">if</span> <span class="n">constraint</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-244"><a href="#L-244"><span class="linenos">244</span></a>            <span class="n">constraint_validation_output</span> <span class="o">=</span> <span class="n">constraint</span><span class="o">.</span><span class="n">__validate__</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">obj</span><span class="p">)</span>
+</span><span id="L-245"><a href="#L-245"><span class="linenos">245</span></a>            <span class="k">if</span> <span class="n">constraint_validation_output</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">True</span><span class="p">:</span>
+</span><span id="L-246"><a href="#L-246"><span class="linenos">246</span></a>                <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
+</span><span id="L-247"><a href="#L-247"><span class="linenos">247</span></a>                    <span class="sa">f</span><span class="s2">&quot;Constraint validation error for variable `</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">`. </span><span class="si">{</span><span class="n">constraint_validation_output</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="L-248"><a href="#L-248"><span class="linenos">248</span></a>                <span class="p">)</span>
+</span><span id="L-249"><a href="#L-249"><span class="linenos">249</span></a>
+</span><span id="L-250"><a href="#L-250"><span class="linenos">250</span></a>    <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+</span><span id="L-251"><a href="#L-251"><span class="linenos">251</span></a>        <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;&lt;type_enforced </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__module__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2"> object at </span><span class="si">{</span><span class="nb">hex</span><span class="p">(</span><span class="nb">id</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span><span class="si">}</span><span class="s2">&gt;&quot;</span>
+</span><span id="L-252"><a href="#L-252"><span class="linenos">252</span></a>
+</span><span id="L-253"><a href="#L-253"><span class="linenos">253</span></a>
+</span><span id="L-254"><a href="#L-254"><span class="linenos">254</span></a><span class="k">def</span> <span class="nf">Enforcer</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="n">enabled</span><span class="p">):</span>
+</span><span id="L-255"><a href="#L-255"><span class="linenos">255</span></a><span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-256"><a href="#L-256"><span class="linenos">256</span></a><span class="sd">    A wrapper to enforce types within a function or method given argument annotations.</span>
+</span><span id="L-257"><a href="#L-257"><span class="linenos">257</span></a>
+</span><span id="L-258"><a href="#L-258"><span class="linenos">258</span></a><span class="sd">    Each wrapped item is converted into a special `FunctionMethodEnforcer` class object that validates the passed parameters for the function or method when it is called. If a function or method that is passed does not have any annotations, it is not converted into a `FunctionMethodEnforcer` class as no validation is possible.</span>
+</span><span id="L-259"><a href="#L-259"><span class="linenos">259</span></a>
+</span><span id="L-260"><a href="#L-260"><span class="linenos">260</span></a><span class="sd">    If wrapping a class, all methods in the class that meet any of the following criteria will be wrapped individually:</span>
+</span><span id="L-261"><a href="#L-261"><span class="linenos">261</span></a>
+</span><span id="L-262"><a href="#L-262"><span class="linenos">262</span></a><span class="sd">    - Methods with `__call__`</span>
+</span><span id="L-263"><a href="#L-263"><span class="linenos">263</span></a><span class="sd">    - Methods wrapped with `staticmethod` (if python &gt;= 3.10)</span>
+</span><span id="L-264"><a href="#L-264"><span class="linenos">264</span></a><span class="sd">    - Methods wrapped with `classmethod` (if python &gt;= 3.10)</span>
+</span><span id="L-265"><a href="#L-265"><span class="linenos">265</span></a>
+</span><span id="L-266"><a href="#L-266"><span class="linenos">266</span></a><span class="sd">    Requires:</span>
+</span><span id="L-267"><a href="#L-267"><span class="linenos">267</span></a>
+</span><span id="L-268"><a href="#L-268"><span class="linenos">268</span></a><span class="sd">    - `clsFnMethod`:</span>
+</span><span id="L-269"><a href="#L-269"><span class="linenos">269</span></a><span class="sd">        - What: The class, function or method that should have input types enforced</span>
+</span><span id="L-270"><a href="#L-270"><span class="linenos">270</span></a><span class="sd">        - Type: function | method | class</span>
+</span><span id="L-271"><a href="#L-271"><span class="linenos">271</span></a>
+</span><span id="L-272"><a href="#L-272"><span class="linenos">272</span></a><span class="sd">    Example Use:</span>
+</span><span id="L-273"><a href="#L-273"><span class="linenos">273</span></a><span class="sd">    ```</span>
+</span><span id="L-274"><a href="#L-274"><span class="linenos">274</span></a><span class="sd">    &gt;&gt;&gt; import type_enforced</span>
+</span><span id="L-275"><a href="#L-275"><span class="linenos">275</span></a><span class="sd">    &gt;&gt;&gt; @type_enforced.Enforcer</span>
+</span><span id="L-276"><a href="#L-276"><span class="linenos">276</span></a><span class="sd">    ... def my_fn(a: int , b: [int, str] =2, c: int =3) -&gt; None:</span>
+</span><span id="L-277"><a href="#L-277"><span class="linenos">277</span></a><span class="sd">    ...     pass</span>
+</span><span id="L-278"><a href="#L-278"><span class="linenos">278</span></a><span class="sd">    ...</span>
+</span><span id="L-279"><a href="#L-279"><span class="linenos">279</span></a><span class="sd">    &gt;&gt;&gt; my_fn(a=1, b=2, c=3)</span>
+</span><span id="L-280"><a href="#L-280"><span class="linenos">280</span></a><span class="sd">    &gt;&gt;&gt; my_fn(a=1, b=&#39;2&#39;, c=3)</span>
+</span><span id="L-281"><a href="#L-281"><span class="linenos">281</span></a><span class="sd">    &gt;&gt;&gt; my_fn(a=&#39;a&#39;, b=2, c=3)</span>
+</span><span id="L-282"><a href="#L-282"><span class="linenos">282</span></a><span class="sd">    Traceback (most recent call last):</span>
+</span><span id="L-283"><a href="#L-283"><span class="linenos">283</span></a><span class="sd">      File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;</span>
+</span><span id="L-284"><a href="#L-284"><span class="linenos">284</span></a><span class="sd">      File &quot;/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py&quot;, line 85, in __call__</span>
+</span><span id="L-285"><a href="#L-285"><span class="linenos">285</span></a><span class="sd">        self.__check_type__(assigned_vars.get(key), value, key)</span>
+</span><span id="L-286"><a href="#L-286"><span class="linenos">286</span></a><span class="sd">      File &quot;/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py&quot;, line 107, in __check_type__</span>
+</span><span id="L-287"><a href="#L-287"><span class="linenos">287</span></a><span class="sd">        self.__exception__(</span>
+</span><span id="L-288"><a href="#L-288"><span class="linenos">288</span></a><span class="sd">      File &quot;/home/conmak/development/personal/type_enforced/type_enforced/enforcer.py&quot;, line 34, in __exception__</span>
+</span><span id="L-289"><a href="#L-289"><span class="linenos">289</span></a><span class="sd">        raise Exception(f&quot;({self.__fn__.__qualname__}): {message}&quot;)</span>
+</span><span id="L-290"><a href="#L-290"><span class="linenos">290</span></a><span class="sd">    Exception: (my_fn): Type mismatch for typed variable `a`. Expected one of the following `[&lt;class &#39;int&#39;&gt;]` but got `&lt;class &#39;str&#39;&gt;` instead.</span>
+</span><span id="L-291"><a href="#L-291"><span class="linenos">291</span></a><span class="sd">    ```</span>
+</span><span id="L-292"><a href="#L-292"><span class="linenos">292</span></a><span class="sd">    &quot;&quot;&quot;</span>
+</span><span id="L-293"><a href="#L-293"><span class="linenos">293</span></a>    <span class="k">if</span> <span class="ow">not</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="s2">&quot;__enforcer_enabled__&quot;</span><span class="p">):</span>
+</span><span id="L-294"><a href="#L-294"><span class="linenos">294</span></a>        <span class="n">clsFnMethod</span><span class="o">.</span><span class="n">__enforcer_enabled__</span> <span class="o">=</span> <span class="n">enabled</span>
+</span><span id="L-295"><a href="#L-295"><span class="linenos">295</span></a>    <span class="k">if</span> <span class="n">clsFnMethod</span><span class="o">.</span><span class="n">__enforcer_enabled__</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span>
+</span><span id="L-296"><a href="#L-296"><span class="linenos">296</span></a>        <span class="k">return</span> <span class="n">clsFnMethod</span>
+</span><span id="L-297"><a href="#L-297"><span class="linenos">297</span></a>    <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-298"><a href="#L-298"><span class="linenos">298</span></a>        <span class="n">clsFnMethod</span><span class="p">,</span> <span class="p">(</span><span class="nb">staticmethod</span><span class="p">,</span> <span class="nb">classmethod</span><span class="p">,</span> <span class="n">FunctionType</span><span class="p">,</span> <span class="n">MethodType</span><span class="p">)</span>
+</span><span id="L-299"><a href="#L-299"><span class="linenos">299</span></a>    <span class="p">):</span>
+</span><span id="L-300"><a href="#L-300"><span class="linenos">300</span></a>        <span class="c1"># Only apply the enforcer if annotations are specified</span>
+</span><span id="L-301"><a href="#L-301"><span class="linenos">301</span></a>        <span class="k">if</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="s2">&quot;__annotations__&quot;</span><span class="p">,</span> <span class="p">{})</span> <span class="o">==</span> <span class="p">{}:</span>
+</span><span id="L-302"><a href="#L-302"><span class="linenos">302</span></a>            <span class="k">return</span> <span class="n">clsFnMethod</span>
+</span><span id="L-303"><a href="#L-303"><span class="linenos">303</span></a>        <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="nb">staticmethod</span><span class="p">):</span>
+</span><span id="L-304"><a href="#L-304"><span class="linenos">304</span></a>            <span class="k">return</span> <span class="nb">staticmethod</span><span class="p">(</span><span class="n">FunctionMethodEnforcer</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="o">.</span><span class="vm">__func__</span><span class="p">))</span>
+</span><span id="L-305"><a href="#L-305"><span class="linenos">305</span></a>        <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="nb">classmethod</span><span class="p">):</span>
+</span><span id="L-306"><a href="#L-306"><span class="linenos">306</span></a>            <span class="k">return</span> <span class="nb">classmethod</span><span class="p">(</span><span class="n">FunctionMethodEnforcer</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="o">.</span><span class="vm">__func__</span><span class="p">))</span>
+</span><span id="L-307"><a href="#L-307"><span class="linenos">307</span></a>        <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="p">(</span><span class="n">FunctionType</span><span class="p">,</span> <span class="n">MethodType</span><span class="p">)):</span>
+</span><span id="L-308"><a href="#L-308"><span class="linenos">308</span></a>            <span class="k">return</span> <span class="n">FunctionMethodEnforcer</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">)</span>
+</span><span id="L-309"><a href="#L-309"><span class="linenos">309</span></a>    <span class="k">elif</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="s2">&quot;__dict__&quot;</span><span class="p">):</span>
+</span><span id="L-310"><a href="#L-310"><span class="linenos">310</span></a>        <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">clsFnMethod</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+</span><span id="L-311"><a href="#L-311"><span class="linenos">311</span></a>            <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="s2">&quot;__call__&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-312"><a href="#L-312"><span class="linenos">312</span></a>                <span class="n">value</span><span class="p">,</span> <span class="p">(</span><span class="nb">classmethod</span><span class="p">,</span> <span class="nb">staticmethod</span><span class="p">)</span>
+</span><span id="L-313"><a href="#L-313"><span class="linenos">313</span></a>            <span class="p">):</span>
+</span><span id="L-314"><a href="#L-314"><span class="linenos">314</span></a>                <span class="nb">setattr</span><span class="p">(</span><span class="n">clsFnMethod</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">Enforcer</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">enabled</span><span class="o">=</span><span class="n">enabled</span><span class="p">))</span>
+</span><span id="L-315"><a href="#L-315"><span class="linenos">315</span></a>        <span class="k">return</span> <span class="n">clsFnMethod</span>
+</span><span id="L-316"><a href="#L-316"><span class="linenos">316</span></a>    <span class="k">else</span><span class="p">:</span>
+</span><span id="L-317"><a href="#L-317"><span class="linenos">317</span></a>        <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span>
+</span><span id="L-318"><a href="#L-318"><span class="linenos">318</span></a>            <span class="s2">&quot;Enforcer can only be used on class methods, functions, or classes.&quot;</span>
+</span><span id="L-319"><a href="#L-319"><span class="linenos">319</span></a>        <span class="p">)</span>
+</span><span id="L-320"><a href="#L-320"><span class="linenos">320</span></a>
+</span><span id="L-321"><a href="#L-321"><span class="linenos">321</span></a>
+</span><span id="L-322"><a href="#L-322"><span class="linenos">322</span></a><span class="n">Enforcer</span> <span class="o">=</span> <span class="n">Partial</span><span class="p">(</span><span class="n">Enforcer</span><span class="p">,</span> <span class="n">enabled</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
 </span></pre></div>
 
 
@@ -442,7 +453,7 @@ <h1 class="modulename">
 </span><span id="FunctionMethodEnforcer-74"><a href="#FunctionMethodEnforcer-74"><span class="linenos"> 74</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
 </span><span id="FunctionMethodEnforcer-75"><a href="#FunctionMethodEnforcer-75"><span class="linenos"> 75</span></a><span class="sd">        Gets the checkable type as a nested dict for a passed annotation.</span>
 </span><span id="FunctionMethodEnforcer-76"><a href="#FunctionMethodEnforcer-76"><span class="linenos"> 76</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-77"><a href="#FunctionMethodEnforcer-77"><span class="linenos"> 77</span></a>        <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{}</span>
+</span><span id="FunctionMethodEnforcer-77"><a href="#FunctionMethodEnforcer-77"><span class="linenos"> 77</span></a>        <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;__extra__&quot;</span><span class="p">:</span> <span class="p">{}}</span>
 </span><span id="FunctionMethodEnforcer-78"><a href="#FunctionMethodEnforcer-78"><span class="linenos"> 78</span></a>        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">item_annotation</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">)):</span>
 </span><span id="FunctionMethodEnforcer-79"><a href="#FunctionMethodEnforcer-79"><span class="linenos"> 79</span></a>            <span class="n">item_annotation</span> <span class="o">=</span> <span class="p">[</span><span class="n">item_annotation</span><span class="p">]</span>
 </span><span id="FunctionMethodEnforcer-80"><a href="#FunctionMethodEnforcer-80"><span class="linenos"> 80</span></a>        <span class="k">for</span> <span class="n">valid_type</span> <span class="ow">in</span> <span class="n">item_annotation</span><span class="p">:</span>
@@ -468,145 +479,156 @@ <h1 class="modulename">
 </span><span id="FunctionMethodEnforcer-100"><a href="#FunctionMethodEnforcer-100"><span class="linenos">100</span></a>                <span class="c1"># Note: These will be handled separately in the self.__check_type__</span>
 </span><span id="FunctionMethodEnforcer-101"><a href="#FunctionMethodEnforcer-101"><span class="linenos">101</span></a>                <span class="c1"># as the object is validated and not its type.</span>
 </span><span id="FunctionMethodEnforcer-102"><a href="#FunctionMethodEnforcer-102"><span class="linenos">102</span></a>                <span class="k">elif</span> <span class="n">valid_type</span><span class="o">.</span><span class="n">__origin__</span> <span class="o">==</span> <span class="n">Literal</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-103"><a href="#FunctionMethodEnforcer-103"><span class="linenos">103</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="FunctionMethodEnforcer-104"><a href="#FunctionMethodEnforcer-104"><span class="linenos">104</span></a>                        <span class="n">Literal</span><span class="p">:</span> <span class="p">{</span><span class="n">i</span><span class="p">:</span> <span class="kc">None</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">valid_type</span><span class="o">.</span><span class="n">__args__</span><span class="p">}</span>
-</span><span id="FunctionMethodEnforcer-105"><a href="#FunctionMethodEnforcer-105"><span class="linenos">105</span></a>                    <span class="p">}</span>
-</span><span id="FunctionMethodEnforcer-106"><a href="#FunctionMethodEnforcer-106"><span class="linenos">106</span></a>
-</span><span id="FunctionMethodEnforcer-107"><a href="#FunctionMethodEnforcer-107"><span class="linenos">107</span></a>                <span class="c1"># Handle Sized objects</span>
-</span><span id="FunctionMethodEnforcer-108"><a href="#FunctionMethodEnforcer-108"><span class="linenos">108</span></a>                <span class="k">elif</span> <span class="n">valid_type</span> <span class="o">==</span> <span class="n">Sized</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-109"><a href="#FunctionMethodEnforcer-109"><span class="linenos">109</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="FunctionMethodEnforcer-110"><a href="#FunctionMethodEnforcer-110"><span class="linenos">110</span></a>                        <span class="nb">list</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-111"><a href="#FunctionMethodEnforcer-111"><span class="linenos">111</span></a>                        <span class="nb">tuple</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-112"><a href="#FunctionMethodEnforcer-112"><span class="linenos">112</span></a>                        <span class="nb">dict</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-113"><a href="#FunctionMethodEnforcer-113"><span class="linenos">113</span></a>                        <span class="nb">set</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-114"><a href="#FunctionMethodEnforcer-114"><span class="linenos">114</span></a>                        <span class="nb">str</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-115"><a href="#FunctionMethodEnforcer-115"><span class="linenos">115</span></a>                        <span class="nb">bytes</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-116"><a href="#FunctionMethodEnforcer-116"><span class="linenos">116</span></a>                        <span class="nb">bytearray</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-117"><a href="#FunctionMethodEnforcer-117"><span class="linenos">117</span></a>                        <span class="nb">memoryview</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-118"><a href="#FunctionMethodEnforcer-118"><span class="linenos">118</span></a>                        <span class="nb">range</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-119"><a href="#FunctionMethodEnforcer-119"><span class="linenos">119</span></a>                        <span class="c1"># Allow nested types to be passed as well</span>
-</span><span id="FunctionMethodEnforcer-120"><a href="#FunctionMethodEnforcer-120"><span class="linenos">120</span></a>                        <span class="o">**</span><span class="n">valid_types</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-121"><a href="#FunctionMethodEnforcer-121"><span class="linenos">121</span></a>                    <span class="p">}</span>
-</span><span id="FunctionMethodEnforcer-122"><a href="#FunctionMethodEnforcer-122"><span class="linenos">122</span></a>                <span class="c1"># Handle uninitialized class type objects (e.g. MyCustomClass)</span>
-</span><span id="FunctionMethodEnforcer-123"><a href="#FunctionMethodEnforcer-123"><span class="linenos">123</span></a>                <span class="k">elif</span> <span class="n">valid_type</span> <span class="o">==</span> <span class="n">Callable</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-124"><a href="#FunctionMethodEnforcer-124"><span class="linenos">124</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="FunctionMethodEnforcer-125"><a href="#FunctionMethodEnforcer-125"><span class="linenos">125</span></a>                        <span class="nb">staticmethod</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-126"><a href="#FunctionMethodEnforcer-126"><span class="linenos">126</span></a>                        <span class="nb">classmethod</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-127"><a href="#FunctionMethodEnforcer-127"><span class="linenos">127</span></a>                        <span class="n">FunctionType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-128"><a href="#FunctionMethodEnforcer-128"><span class="linenos">128</span></a>                        <span class="n">BuiltinFunctionType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-129"><a href="#FunctionMethodEnforcer-129"><span class="linenos">129</span></a>                        <span class="n">MethodType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-130"><a href="#FunctionMethodEnforcer-130"><span class="linenos">130</span></a>                        <span class="n">BuiltinMethodType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-131"><a href="#FunctionMethodEnforcer-131"><span class="linenos">131</span></a>                        <span class="n">GeneratorType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-132"><a href="#FunctionMethodEnforcer-132"><span class="linenos">132</span></a>                        <span class="o">**</span><span class="n">valid_types</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-133"><a href="#FunctionMethodEnforcer-133"><span class="linenos">133</span></a>                    <span class="p">}</span>
-</span><span id="FunctionMethodEnforcer-134"><a href="#FunctionMethodEnforcer-134"><span class="linenos">134</span></a>                <span class="k">else</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-135"><a href="#FunctionMethodEnforcer-135"><span class="linenos">135</span></a>                    <span class="n">valid_types</span><span class="p">[</span><span class="n">valid_type</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="FunctionMethodEnforcer-136"><a href="#FunctionMethodEnforcer-136"><span class="linenos">136</span></a>            <span class="c1"># Handle special &#39;|&#39; syntax for Union Types</span>
-</span><span id="FunctionMethodEnforcer-137"><a href="#FunctionMethodEnforcer-137"><span class="linenos">137</span></a>            <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">valid_type</span><span class="p">,</span> <span class="n">UnionType</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-138"><a href="#FunctionMethodEnforcer-138"><span class="linenos">138</span></a>                <span class="n">valid_types</span><span class="o">.</span><span class="n">update</span><span class="p">(</span>
-</span><span id="FunctionMethodEnforcer-139"><a href="#FunctionMethodEnforcer-139"><span class="linenos">139</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__get_checkable_type__</span><span class="p">(</span><span class="n">valid_type</span><span class="o">.</span><span class="n">__args__</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-140"><a href="#FunctionMethodEnforcer-140"><span class="linenos">140</span></a>                <span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-141"><a href="#FunctionMethodEnforcer-141"><span class="linenos">141</span></a>            <span class="k">else</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-142"><a href="#FunctionMethodEnforcer-142"><span class="linenos">142</span></a>                <span class="n">valid_types</span><span class="p">[</span><span class="n">valid_type</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
-</span><span id="FunctionMethodEnforcer-143"><a href="#FunctionMethodEnforcer-143"><span class="linenos">143</span></a>        <span class="k">return</span> <span class="n">valid_types</span>
-</span><span id="FunctionMethodEnforcer-144"><a href="#FunctionMethodEnforcer-144"><span class="linenos">144</span></a>
-</span><span id="FunctionMethodEnforcer-145"><a href="#FunctionMethodEnforcer-145"><span class="linenos">145</span></a>    <span class="k">def</span> <span class="nf">__exception__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-146"><a href="#FunctionMethodEnforcer-146"><span class="linenos">146</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-147"><a href="#FunctionMethodEnforcer-147"><span class="linenos">147</span></a><span class="sd">        Usage:</span>
+</span><span id="FunctionMethodEnforcer-103"><a href="#FunctionMethodEnforcer-103"><span class="linenos">103</span></a>                    <span class="n">valid_types</span><span class="p">[</span><span class="s2">&quot;__extra__&quot;</span><span class="p">][</span>
+</span><span id="FunctionMethodEnforcer-104"><a href="#FunctionMethodEnforcer-104"><span class="linenos">104</span></a>                        <span class="s2">&quot;__literal__&quot;</span>
+</span><span id="FunctionMethodEnforcer-105"><a href="#FunctionMethodEnforcer-105"><span class="linenos">105</span></a>                    <span class="p">]</span> <span class="o">=</span> <span class="n">valid_type</span><span class="o">.</span><span class="n">__args__</span>
+</span><span id="FunctionMethodEnforcer-106"><a href="#FunctionMethodEnforcer-106"><span class="linenos">106</span></a>                <span class="c1"># Handle Sized objects</span>
+</span><span id="FunctionMethodEnforcer-107"><a href="#FunctionMethodEnforcer-107"><span class="linenos">107</span></a>                <span class="k">elif</span> <span class="n">valid_type</span> <span class="o">==</span> <span class="n">Sized</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-108"><a href="#FunctionMethodEnforcer-108"><span class="linenos">108</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="FunctionMethodEnforcer-109"><a href="#FunctionMethodEnforcer-109"><span class="linenos">109</span></a>                        <span class="nb">list</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-110"><a href="#FunctionMethodEnforcer-110"><span class="linenos">110</span></a>                        <span class="nb">tuple</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-111"><a href="#FunctionMethodEnforcer-111"><span class="linenos">111</span></a>                        <span class="nb">dict</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-112"><a href="#FunctionMethodEnforcer-112"><span class="linenos">112</span></a>                        <span class="nb">set</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-113"><a href="#FunctionMethodEnforcer-113"><span class="linenos">113</span></a>                        <span class="nb">str</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-114"><a href="#FunctionMethodEnforcer-114"><span class="linenos">114</span></a>                        <span class="nb">bytes</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-115"><a href="#FunctionMethodEnforcer-115"><span class="linenos">115</span></a>                        <span class="nb">bytearray</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-116"><a href="#FunctionMethodEnforcer-116"><span class="linenos">116</span></a>                        <span class="nb">memoryview</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-117"><a href="#FunctionMethodEnforcer-117"><span class="linenos">117</span></a>                        <span class="nb">range</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-118"><a href="#FunctionMethodEnforcer-118"><span class="linenos">118</span></a>                        <span class="c1"># Allow nested types to be passed as well</span>
+</span><span id="FunctionMethodEnforcer-119"><a href="#FunctionMethodEnforcer-119"><span class="linenos">119</span></a>                        <span class="o">**</span><span class="n">valid_types</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-120"><a href="#FunctionMethodEnforcer-120"><span class="linenos">120</span></a>                    <span class="p">}</span>
+</span><span id="FunctionMethodEnforcer-121"><a href="#FunctionMethodEnforcer-121"><span class="linenos">121</span></a>                <span class="c1"># Handle uninitialized class type objects (e.g. MyCustomClass)</span>
+</span><span id="FunctionMethodEnforcer-122"><a href="#FunctionMethodEnforcer-122"><span class="linenos">122</span></a>                <span class="k">elif</span> <span class="n">valid_type</span> <span class="o">==</span> <span class="n">Callable</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-123"><a href="#FunctionMethodEnforcer-123"><span class="linenos">123</span></a>                    <span class="n">valid_types</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="FunctionMethodEnforcer-124"><a href="#FunctionMethodEnforcer-124"><span class="linenos">124</span></a>                        <span class="nb">staticmethod</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-125"><a href="#FunctionMethodEnforcer-125"><span class="linenos">125</span></a>                        <span class="nb">classmethod</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-126"><a href="#FunctionMethodEnforcer-126"><span class="linenos">126</span></a>                        <span class="n">FunctionType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-127"><a href="#FunctionMethodEnforcer-127"><span class="linenos">127</span></a>                        <span class="n">BuiltinFunctionType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-128"><a href="#FunctionMethodEnforcer-128"><span class="linenos">128</span></a>                        <span class="n">MethodType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-129"><a href="#FunctionMethodEnforcer-129"><span class="linenos">129</span></a>                        <span class="n">BuiltinMethodType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-130"><a href="#FunctionMethodEnforcer-130"><span class="linenos">130</span></a>                        <span class="n">GeneratorType</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-131"><a href="#FunctionMethodEnforcer-131"><span class="linenos">131</span></a>                        <span class="o">**</span><span class="n">valid_types</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-132"><a href="#FunctionMethodEnforcer-132"><span class="linenos">132</span></a>                    <span class="p">}</span>
+</span><span id="FunctionMethodEnforcer-133"><a href="#FunctionMethodEnforcer-133"><span class="linenos">133</span></a>                <span class="k">else</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-134"><a href="#FunctionMethodEnforcer-134"><span class="linenos">134</span></a>                    <span class="n">valid_types</span><span class="p">[</span><span class="n">valid_type</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="FunctionMethodEnforcer-135"><a href="#FunctionMethodEnforcer-135"><span class="linenos">135</span></a>            <span class="c1"># Handle special &#39;|&#39; syntax for Union Types</span>
+</span><span id="FunctionMethodEnforcer-136"><a href="#FunctionMethodEnforcer-136"><span class="linenos">136</span></a>            <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">valid_type</span><span class="p">,</span> <span class="n">UnionType</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-137"><a href="#FunctionMethodEnforcer-137"><span class="linenos">137</span></a>                <span class="n">valid_types</span><span class="o">.</span><span class="n">update</span><span class="p">(</span>
+</span><span id="FunctionMethodEnforcer-138"><a href="#FunctionMethodEnforcer-138"><span class="linenos">138</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__get_checkable_type__</span><span class="p">(</span><span class="n">valid_type</span><span class="o">.</span><span class="n">__args__</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-139"><a href="#FunctionMethodEnforcer-139"><span class="linenos">139</span></a>                <span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-140"><a href="#FunctionMethodEnforcer-140"><span class="linenos">140</span></a>            <span class="c1"># Handle Constraints</span>
+</span><span id="FunctionMethodEnforcer-141"><a href="#FunctionMethodEnforcer-141"><span class="linenos">141</span></a>            <span class="c1"># Note: These will be handled separately in the self.__check_type__</span>
+</span><span id="FunctionMethodEnforcer-142"><a href="#FunctionMethodEnforcer-142"><span class="linenos">142</span></a>            <span class="c1"># as the object is validated differently than a type.</span>
+</span><span id="FunctionMethodEnforcer-143"><a href="#FunctionMethodEnforcer-143"><span class="linenos">143</span></a>            <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">valid_type</span><span class="p">,</span> <span class="n">GenericConstraint</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-144"><a href="#FunctionMethodEnforcer-144"><span class="linenos">144</span></a>                <span class="n">valid_types</span><span class="p">[</span><span class="s2">&quot;__extra__&quot;</span><span class="p">][</span><span class="s2">&quot;__constraint__&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">valid_type</span>
+</span><span id="FunctionMethodEnforcer-145"><a href="#FunctionMethodEnforcer-145"><span class="linenos">145</span></a>            <span class="k">else</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-146"><a href="#FunctionMethodEnforcer-146"><span class="linenos">146</span></a>                <span class="n">valid_types</span><span class="p">[</span><span class="n">valid_type</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
+</span><span id="FunctionMethodEnforcer-147"><a href="#FunctionMethodEnforcer-147"><span class="linenos">147</span></a>        <span class="k">return</span> <span class="n">valid_types</span>
 </span><span id="FunctionMethodEnforcer-148"><a href="#FunctionMethodEnforcer-148"><span class="linenos">148</span></a>
-</span><span id="FunctionMethodEnforcer-149"><a href="#FunctionMethodEnforcer-149"><span class="linenos">149</span></a><span class="sd">        - Creates a class based exception message</span>
-</span><span id="FunctionMethodEnforcer-150"><a href="#FunctionMethodEnforcer-150"><span class="linenos">150</span></a>
-</span><span id="FunctionMethodEnforcer-151"><a href="#FunctionMethodEnforcer-151"><span class="linenos">151</span></a><span class="sd">        Requires:</span>
+</span><span id="FunctionMethodEnforcer-149"><a href="#FunctionMethodEnforcer-149"><span class="linenos">149</span></a>    <span class="k">def</span> <span class="nf">__exception__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-150"><a href="#FunctionMethodEnforcer-150"><span class="linenos">150</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="FunctionMethodEnforcer-151"><a href="#FunctionMethodEnforcer-151"><span class="linenos">151</span></a><span class="sd">        Usage:</span>
 </span><span id="FunctionMethodEnforcer-152"><a href="#FunctionMethodEnforcer-152"><span class="linenos">152</span></a>
-</span><span id="FunctionMethodEnforcer-153"><a href="#FunctionMethodEnforcer-153"><span class="linenos">153</span></a><span class="sd">        - `message`:</span>
-</span><span id="FunctionMethodEnforcer-154"><a href="#FunctionMethodEnforcer-154"><span class="linenos">154</span></a><span class="sd">            - Type: str</span>
-</span><span id="FunctionMethodEnforcer-155"><a href="#FunctionMethodEnforcer-155"><span class="linenos">155</span></a><span class="sd">            - What: The message to warn users with</span>
-</span><span id="FunctionMethodEnforcer-156"><a href="#FunctionMethodEnforcer-156"><span class="linenos">156</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-157"><a href="#FunctionMethodEnforcer-157"><span class="linenos">157</span></a>        <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2">): </span><span class="si">{</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-158"><a href="#FunctionMethodEnforcer-158"><span class="linenos">158</span></a>
-</span><span id="FunctionMethodEnforcer-159"><a href="#FunctionMethodEnforcer-159"><span class="linenos">159</span></a>    <span class="k">def</span> <span class="fm">__get__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">objtype</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-160"><a href="#FunctionMethodEnforcer-160"><span class="linenos">160</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-161"><a href="#FunctionMethodEnforcer-161"><span class="linenos">161</span></a><span class="sd">        Overwrite standard __get__ method to return __call__ instead for wrapped class methods.</span>
+</span><span id="FunctionMethodEnforcer-153"><a href="#FunctionMethodEnforcer-153"><span class="linenos">153</span></a><span class="sd">        - Creates a class based exception message</span>
+</span><span id="FunctionMethodEnforcer-154"><a href="#FunctionMethodEnforcer-154"><span class="linenos">154</span></a>
+</span><span id="FunctionMethodEnforcer-155"><a href="#FunctionMethodEnforcer-155"><span class="linenos">155</span></a><span class="sd">        Requires:</span>
+</span><span id="FunctionMethodEnforcer-156"><a href="#FunctionMethodEnforcer-156"><span class="linenos">156</span></a>
+</span><span id="FunctionMethodEnforcer-157"><a href="#FunctionMethodEnforcer-157"><span class="linenos">157</span></a><span class="sd">        - `message`:</span>
+</span><span id="FunctionMethodEnforcer-158"><a href="#FunctionMethodEnforcer-158"><span class="linenos">158</span></a><span class="sd">            - Type: str</span>
+</span><span id="FunctionMethodEnforcer-159"><a href="#FunctionMethodEnforcer-159"><span class="linenos">159</span></a><span class="sd">            - What: The message to warn users with</span>
+</span><span id="FunctionMethodEnforcer-160"><a href="#FunctionMethodEnforcer-160"><span class="linenos">160</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="FunctionMethodEnforcer-161"><a href="#FunctionMethodEnforcer-161"><span class="linenos">161</span></a>        <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2">): </span><span class="si">{</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
 </span><span id="FunctionMethodEnforcer-162"><a href="#FunctionMethodEnforcer-162"><span class="linenos">162</span></a>
-</span><span id="FunctionMethodEnforcer-163"><a href="#FunctionMethodEnforcer-163"><span class="linenos">163</span></a><span class="sd">        Also stores the calling (__get__) `obj` to be passed as an initial argument for `__call__` such that methods can pass `self` correctly.</span>
-</span><span id="FunctionMethodEnforcer-164"><a href="#FunctionMethodEnforcer-164"><span class="linenos">164</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-165"><a href="#FunctionMethodEnforcer-165"><span class="linenos">165</span></a>
-</span><span id="FunctionMethodEnforcer-166"><a href="#FunctionMethodEnforcer-166"><span class="linenos">166</span></a>        <span class="nd">@wraps</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-167"><a href="#FunctionMethodEnforcer-167"><span class="linenos">167</span></a>        <span class="k">def</span> <span class="nf">__get_fn__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-168"><a href="#FunctionMethodEnforcer-168"><span class="linenos">168</span></a>            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="fm">__call__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-163"><a href="#FunctionMethodEnforcer-163"><span class="linenos">163</span></a>    <span class="k">def</span> <span class="fm">__get__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">objtype</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-164"><a href="#FunctionMethodEnforcer-164"><span class="linenos">164</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="FunctionMethodEnforcer-165"><a href="#FunctionMethodEnforcer-165"><span class="linenos">165</span></a><span class="sd">        Overwrite standard __get__ method to return __call__ instead for wrapped class methods.</span>
+</span><span id="FunctionMethodEnforcer-166"><a href="#FunctionMethodEnforcer-166"><span class="linenos">166</span></a>
+</span><span id="FunctionMethodEnforcer-167"><a href="#FunctionMethodEnforcer-167"><span class="linenos">167</span></a><span class="sd">        Also stores the calling (__get__) `obj` to be passed as an initial argument for `__call__` such that methods can pass `self` correctly.</span>
+</span><span id="FunctionMethodEnforcer-168"><a href="#FunctionMethodEnforcer-168"><span class="linenos">168</span></a><span class="sd">        &quot;&quot;&quot;</span>
 </span><span id="FunctionMethodEnforcer-169"><a href="#FunctionMethodEnforcer-169"><span class="linenos">169</span></a>
-</span><span id="FunctionMethodEnforcer-170"><a href="#FunctionMethodEnforcer-170"><span class="linenos">170</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span> <span class="o">=</span> <span class="n">obj</span>
-</span><span id="FunctionMethodEnforcer-171"><a href="#FunctionMethodEnforcer-171"><span class="linenos">171</span></a>        <span class="k">return</span> <span class="n">__get_fn__</span>
-</span><span id="FunctionMethodEnforcer-172"><a href="#FunctionMethodEnforcer-172"><span class="linenos">172</span></a>
-</span><span id="FunctionMethodEnforcer-173"><a href="#FunctionMethodEnforcer-173"><span class="linenos">173</span></a>    <span class="k">def</span> <span class="nf">__check_method_function__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-174"><a href="#FunctionMethodEnforcer-174"><span class="linenos">174</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-175"><a href="#FunctionMethodEnforcer-175"><span class="linenos">175</span></a><span class="sd">        Validate that `self.__fn__` is a method or function</span>
-</span><span id="FunctionMethodEnforcer-176"><a href="#FunctionMethodEnforcer-176"><span class="linenos">176</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-177"><a href="#FunctionMethodEnforcer-177"><span class="linenos">177</span></a>        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span> <span class="p">(</span><span class="n">MethodType</span><span class="p">,</span> <span class="n">FunctionType</span><span class="p">)):</span>
-</span><span id="FunctionMethodEnforcer-178"><a href="#FunctionMethodEnforcer-178"><span class="linenos">178</span></a>            <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span>
-</span><span id="FunctionMethodEnforcer-179"><a href="#FunctionMethodEnforcer-179"><span class="linenos">179</span></a>                <span class="sa">f</span><span class="s2">&quot;A non function/method was passed to Enforcer. See the stack trace above for more information.&quot;</span>
-</span><span id="FunctionMethodEnforcer-180"><a href="#FunctionMethodEnforcer-180"><span class="linenos">180</span></a>            <span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-181"><a href="#FunctionMethodEnforcer-181"><span class="linenos">181</span></a>
-</span><span id="FunctionMethodEnforcer-182"><a href="#FunctionMethodEnforcer-182"><span class="linenos">182</span></a>    <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-183"><a href="#FunctionMethodEnforcer-183"><span class="linenos">183</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-184"><a href="#FunctionMethodEnforcer-184"><span class="linenos">184</span></a><span class="sd">        This method is used to validate the passed inputs and return the output of the wrapped function or method.</span>
-</span><span id="FunctionMethodEnforcer-185"><a href="#FunctionMethodEnforcer-185"><span class="linenos">185</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-186"><a href="#FunctionMethodEnforcer-186"><span class="linenos">186</span></a>        <span class="c1"># Special code to pass self as an initial argument</span>
-</span><span id="FunctionMethodEnforcer-187"><a href="#FunctionMethodEnforcer-187"><span class="linenos">187</span></a>        <span class="c1"># for validation purposes in methods</span>
-</span><span id="FunctionMethodEnforcer-188"><a href="#FunctionMethodEnforcer-188"><span class="linenos">188</span></a>        <span class="c1"># See: self.__get__</span>
-</span><span id="FunctionMethodEnforcer-189"><a href="#FunctionMethodEnforcer-189"><span class="linenos">189</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-190"><a href="#FunctionMethodEnforcer-190"><span class="linenos">190</span></a>            <span class="n">args</span> <span class="o">=</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-191"><a href="#FunctionMethodEnforcer-191"><span class="linenos">191</span></a>        <span class="c1"># Create a compreshensive dictionary of assigned variables (order matters)</span>
-</span><span id="FunctionMethodEnforcer-192"><a href="#FunctionMethodEnforcer-192"><span class="linenos">192</span></a>        <span class="n">assigned_vars</span> <span class="o">=</span> <span class="p">{</span>
-</span><span id="FunctionMethodEnforcer-193"><a href="#FunctionMethodEnforcer-193"><span class="linenos">193</span></a>            <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn_defaults__</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-194"><a href="#FunctionMethodEnforcer-194"><span class="linenos">194</span></a>            <span class="o">**</span><span class="nb">dict</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__code__</span><span class="o">.</span><span class="n">co_varnames</span><span class="p">[:</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)],</span> <span class="n">args</span><span class="p">)),</span>
-</span><span id="FunctionMethodEnforcer-195"><a href="#FunctionMethodEnforcer-195"><span class="linenos">195</span></a>            <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
-</span><span id="FunctionMethodEnforcer-196"><a href="#FunctionMethodEnforcer-196"><span class="linenos">196</span></a>        <span class="p">}</span>
-</span><span id="FunctionMethodEnforcer-197"><a href="#FunctionMethodEnforcer-197"><span class="linenos">197</span></a>        <span class="c1"># Validate all listed annotations vs the assigned_vars dictionary</span>
-</span><span id="FunctionMethodEnforcer-198"><a href="#FunctionMethodEnforcer-198"><span class="linenos">198</span></a>        <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__checkable_types__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
-</span><span id="FunctionMethodEnforcer-199"><a href="#FunctionMethodEnforcer-199"><span class="linenos">199</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">assigned_vars</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">),</span> <span class="n">value</span><span class="p">,</span> <span class="n">key</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-200"><a href="#FunctionMethodEnforcer-200"><span class="linenos">200</span></a>        <span class="c1"># Execute the function callable</span>
-</span><span id="FunctionMethodEnforcer-201"><a href="#FunctionMethodEnforcer-201"><span class="linenos">201</span></a>        <span class="n">return_value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-202"><a href="#FunctionMethodEnforcer-202"><span class="linenos">202</span></a>        <span class="c1"># If a return type was passed, validate the returned object</span>
-</span><span id="FunctionMethodEnforcer-203"><a href="#FunctionMethodEnforcer-203"><span class="linenos">203</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__return_type__</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-204"><a href="#FunctionMethodEnforcer-204"><span class="linenos">204</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">return_value</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">__return_type__</span><span class="p">,</span> <span class="s2">&quot;return&quot;</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-205"><a href="#FunctionMethodEnforcer-205"><span class="linenos">205</span></a>        <span class="k">return</span> <span class="n">return_value</span>
-</span><span id="FunctionMethodEnforcer-206"><a href="#FunctionMethodEnforcer-206"><span class="linenos">206</span></a>
-</span><span id="FunctionMethodEnforcer-207"><a href="#FunctionMethodEnforcer-207"><span class="linenos">207</span></a>    <span class="k">def</span> <span class="nf">__check_type__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">acceptable_types</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-208"><a href="#FunctionMethodEnforcer-208"><span class="linenos">208</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-209"><a href="#FunctionMethodEnforcer-209"><span class="linenos">209</span></a><span class="sd">        Raises an exception the type of a passed `obj` (parameter) is not in the list of supplied `acceptable_types` for the argument.</span>
-</span><span id="FunctionMethodEnforcer-210"><a href="#FunctionMethodEnforcer-210"><span class="linenos">210</span></a><span class="sd">        &quot;&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-211"><a href="#FunctionMethodEnforcer-211"><span class="linenos">211</span></a>        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="nb">type</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-212"><a href="#FunctionMethodEnforcer-212"><span class="linenos">212</span></a>            <span class="n">passed_type</span> <span class="o">=</span> <span class="n">Type</span><span class="p">[</span><span class="n">obj</span><span class="p">]</span>
-</span><span id="FunctionMethodEnforcer-213"><a href="#FunctionMethodEnforcer-213"><span class="linenos">213</span></a>        <span class="k">else</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-214"><a href="#FunctionMethodEnforcer-214"><span class="linenos">214</span></a>            <span class="n">passed_type</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-215"><a href="#FunctionMethodEnforcer-215"><span class="linenos">215</span></a>        <span class="k">if</span> <span class="n">passed_type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">acceptable_types</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-216"><a href="#FunctionMethodEnforcer-216"><span class="linenos">216</span></a>            <span class="c1"># Add special string to store any string to add before acceptable types</span>
-</span><span id="FunctionMethodEnforcer-217"><a href="#FunctionMethodEnforcer-217"><span class="linenos">217</span></a>            <span class="c1"># in any exception message</span>
-</span><span id="FunctionMethodEnforcer-218"><a href="#FunctionMethodEnforcer-218"><span class="linenos">218</span></a>            <span class="n">pre_acceptable_types_str</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
-</span><span id="FunctionMethodEnforcer-219"><a href="#FunctionMethodEnforcer-219"><span class="linenos">219</span></a>            <span class="c1"># Special check for Literals</span>
-</span><span id="FunctionMethodEnforcer-220"><a href="#FunctionMethodEnforcer-220"><span class="linenos">220</span></a>            <span class="k">if</span> <span class="n">Literal</span> <span class="ow">in</span> <span class="n">acceptable_types</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-221"><a href="#FunctionMethodEnforcer-221"><span class="linenos">221</span></a>                <span class="k">if</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">acceptable_types</span><span class="p">[</span><span class="n">Literal</span><span class="p">]:</span>
-</span><span id="FunctionMethodEnforcer-222"><a href="#FunctionMethodEnforcer-222"><span class="linenos">222</span></a>                    <span class="k">return</span>
-</span><span id="FunctionMethodEnforcer-223"><a href="#FunctionMethodEnforcer-223"><span class="linenos">223</span></a>                <span class="k">else</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-224"><a href="#FunctionMethodEnforcer-224"><span class="linenos">224</span></a>                    <span class="n">pre_acceptable_types_str</span> <span class="o">=</span> <span class="s2">&quot;Literal&quot;</span>
-</span><span id="FunctionMethodEnforcer-225"><a href="#FunctionMethodEnforcer-225"><span class="linenos">225</span></a>                    <span class="n">acceptable_types</span> <span class="o">=</span> <span class="n">acceptable_types</span><span class="p">[</span><span class="n">Literal</span><span class="p">]</span>
-</span><span id="FunctionMethodEnforcer-226"><a href="#FunctionMethodEnforcer-226"><span class="linenos">226</span></a>                    <span class="n">passed_type</span> <span class="o">=</span> <span class="n">obj</span>
-</span><span id="FunctionMethodEnforcer-227"><a href="#FunctionMethodEnforcer-227"><span class="linenos">227</span></a>            <span class="c1"># Raise the exception</span>
-</span><span id="FunctionMethodEnforcer-228"><a href="#FunctionMethodEnforcer-228"><span class="linenos">228</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
-</span><span id="FunctionMethodEnforcer-229"><a href="#FunctionMethodEnforcer-229"><span class="linenos">229</span></a>                <span class="sa">f</span><span class="s2">&quot;Type mismatch for typed variable `</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">`. Expected one of the following `</span><span class="si">{</span><span class="n">pre_acceptable_types_str</span><span class="si">}{</span><span class="nb">str</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">acceptable_types</span><span class="o">.</span><span class="n">keys</span><span class="p">()))</span><span class="si">}</span><span class="s2">` but got `</span><span class="si">{</span><span class="n">passed_type</span><span class="si">}</span><span class="s2">` instead.&quot;</span>
-</span><span id="FunctionMethodEnforcer-230"><a href="#FunctionMethodEnforcer-230"><span class="linenos">230</span></a>            <span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-231"><a href="#FunctionMethodEnforcer-231"><span class="linenos">231</span></a>        <span class="n">sub_type</span> <span class="o">=</span> <span class="n">acceptable_types</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">passed_type</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-232"><a href="#FunctionMethodEnforcer-232"><span class="linenos">232</span></a>        <span class="k">if</span> <span class="n">sub_type</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-233"><a href="#FunctionMethodEnforcer-233"><span class="linenos">233</span></a>            <span class="k">if</span> <span class="n">passed_type</span> <span class="o">==</span> <span class="nb">dict</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-234"><a href="#FunctionMethodEnforcer-234"><span class="linenos">234</span></a>                <span class="k">for</span> <span class="n">sub_key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">obj</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
-</span><span id="FunctionMethodEnforcer-235"><a href="#FunctionMethodEnforcer-235"><span class="linenos">235</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">sub_type</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">[</span><span class="si">{</span><span class="n">sub_key</span><span class="si">}</span><span class="s2">]&quot;</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-236"><a href="#FunctionMethodEnforcer-236"><span class="linenos">236</span></a>            <span class="k">else</span><span class="p">:</span>
-</span><span id="FunctionMethodEnforcer-237"><a href="#FunctionMethodEnforcer-237"><span class="linenos">237</span></a>                <span class="k">for</span> <span class="n">sub_key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-238"><a href="#FunctionMethodEnforcer-238"><span class="linenos">238</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">sub_type</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">[</span><span class="si">{</span><span class="n">sub_key</span><span class="si">}</span><span class="s2">]&quot;</span><span class="p">)</span>
-</span><span id="FunctionMethodEnforcer-239"><a href="#FunctionMethodEnforcer-239"><span class="linenos">239</span></a>
-</span><span id="FunctionMethodEnforcer-240"><a href="#FunctionMethodEnforcer-240"><span class="linenos">240</span></a>    <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-</span><span id="FunctionMethodEnforcer-241"><a href="#FunctionMethodEnforcer-241"><span class="linenos">241</span></a>        <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;&lt;type_enforced </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__module__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2"> object at </span><span class="si">{</span><span class="nb">hex</span><span class="p">(</span><span class="nb">id</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span><span class="si">}</span><span class="s2">&gt;&quot;</span>
+</span><span id="FunctionMethodEnforcer-170"><a href="#FunctionMethodEnforcer-170"><span class="linenos">170</span></a>        <span class="nd">@wraps</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-171"><a href="#FunctionMethodEnforcer-171"><span class="linenos">171</span></a>        <span class="k">def</span> <span class="nf">__get_fn__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-172"><a href="#FunctionMethodEnforcer-172"><span class="linenos">172</span></a>            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="fm">__call__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-173"><a href="#FunctionMethodEnforcer-173"><span class="linenos">173</span></a>
+</span><span id="FunctionMethodEnforcer-174"><a href="#FunctionMethodEnforcer-174"><span class="linenos">174</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span> <span class="o">=</span> <span class="n">obj</span>
+</span><span id="FunctionMethodEnforcer-175"><a href="#FunctionMethodEnforcer-175"><span class="linenos">175</span></a>        <span class="k">return</span> <span class="n">__get_fn__</span>
+</span><span id="FunctionMethodEnforcer-176"><a href="#FunctionMethodEnforcer-176"><span class="linenos">176</span></a>
+</span><span id="FunctionMethodEnforcer-177"><a href="#FunctionMethodEnforcer-177"><span class="linenos">177</span></a>    <span class="k">def</span> <span class="nf">__check_method_function__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-178"><a href="#FunctionMethodEnforcer-178"><span class="linenos">178</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="FunctionMethodEnforcer-179"><a href="#FunctionMethodEnforcer-179"><span class="linenos">179</span></a><span class="sd">        Validate that `self.__fn__` is a method or function</span>
+</span><span id="FunctionMethodEnforcer-180"><a href="#FunctionMethodEnforcer-180"><span class="linenos">180</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="FunctionMethodEnforcer-181"><a href="#FunctionMethodEnforcer-181"><span class="linenos">181</span></a>        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span> <span class="p">(</span><span class="n">MethodType</span><span class="p">,</span> <span class="n">FunctionType</span><span class="p">)):</span>
+</span><span id="FunctionMethodEnforcer-182"><a href="#FunctionMethodEnforcer-182"><span class="linenos">182</span></a>            <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span>
+</span><span id="FunctionMethodEnforcer-183"><a href="#FunctionMethodEnforcer-183"><span class="linenos">183</span></a>                <span class="sa">f</span><span class="s2">&quot;A non function/method was passed to Enforcer. See the stack trace above for more information.&quot;</span>
+</span><span id="FunctionMethodEnforcer-184"><a href="#FunctionMethodEnforcer-184"><span class="linenos">184</span></a>            <span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-185"><a href="#FunctionMethodEnforcer-185"><span class="linenos">185</span></a>
+</span><span id="FunctionMethodEnforcer-186"><a href="#FunctionMethodEnforcer-186"><span class="linenos">186</span></a>    <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-187"><a href="#FunctionMethodEnforcer-187"><span class="linenos">187</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="FunctionMethodEnforcer-188"><a href="#FunctionMethodEnforcer-188"><span class="linenos">188</span></a><span class="sd">        This method is used to validate the passed inputs and return the output of the wrapped function or method.</span>
+</span><span id="FunctionMethodEnforcer-189"><a href="#FunctionMethodEnforcer-189"><span class="linenos">189</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="FunctionMethodEnforcer-190"><a href="#FunctionMethodEnforcer-190"><span class="linenos">190</span></a>        <span class="c1"># Special code to pass self as an initial argument</span>
+</span><span id="FunctionMethodEnforcer-191"><a href="#FunctionMethodEnforcer-191"><span class="linenos">191</span></a>        <span class="c1"># for validation purposes in methods</span>
+</span><span id="FunctionMethodEnforcer-192"><a href="#FunctionMethodEnforcer-192"><span class="linenos">192</span></a>        <span class="c1"># See: self.__get__</span>
+</span><span id="FunctionMethodEnforcer-193"><a href="#FunctionMethodEnforcer-193"><span class="linenos">193</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-194"><a href="#FunctionMethodEnforcer-194"><span class="linenos">194</span></a>            <span class="n">args</span> <span class="o">=</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__outer_self__</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-195"><a href="#FunctionMethodEnforcer-195"><span class="linenos">195</span></a>        <span class="c1"># Create a compreshensive dictionary of assigned variables (order matters)</span>
+</span><span id="FunctionMethodEnforcer-196"><a href="#FunctionMethodEnforcer-196"><span class="linenos">196</span></a>        <span class="n">assigned_vars</span> <span class="o">=</span> <span class="p">{</span>
+</span><span id="FunctionMethodEnforcer-197"><a href="#FunctionMethodEnforcer-197"><span class="linenos">197</span></a>            <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn_defaults__</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-198"><a href="#FunctionMethodEnforcer-198"><span class="linenos">198</span></a>            <span class="o">**</span><span class="nb">dict</span><span class="p">(</span><span class="nb">zip</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__code__</span><span class="o">.</span><span class="n">co_varnames</span><span class="p">[:</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)],</span> <span class="n">args</span><span class="p">)),</span>
+</span><span id="FunctionMethodEnforcer-199"><a href="#FunctionMethodEnforcer-199"><span class="linenos">199</span></a>            <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span>
+</span><span id="FunctionMethodEnforcer-200"><a href="#FunctionMethodEnforcer-200"><span class="linenos">200</span></a>        <span class="p">}</span>
+</span><span id="FunctionMethodEnforcer-201"><a href="#FunctionMethodEnforcer-201"><span class="linenos">201</span></a>        <span class="c1"># Validate all listed annotations vs the assigned_vars dictionary</span>
+</span><span id="FunctionMethodEnforcer-202"><a href="#FunctionMethodEnforcer-202"><span class="linenos">202</span></a>        <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__checkable_types__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+</span><span id="FunctionMethodEnforcer-203"><a href="#FunctionMethodEnforcer-203"><span class="linenos">203</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">assigned_vars</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">),</span> <span class="n">value</span><span class="p">,</span> <span class="n">key</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-204"><a href="#FunctionMethodEnforcer-204"><span class="linenos">204</span></a>        <span class="c1"># Execute the function callable</span>
+</span><span id="FunctionMethodEnforcer-205"><a href="#FunctionMethodEnforcer-205"><span class="linenos">205</span></a>        <span class="n">return_value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-206"><a href="#FunctionMethodEnforcer-206"><span class="linenos">206</span></a>        <span class="c1"># If a return type was passed, validate the returned object</span>
+</span><span id="FunctionMethodEnforcer-207"><a href="#FunctionMethodEnforcer-207"><span class="linenos">207</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__return_type__</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-208"><a href="#FunctionMethodEnforcer-208"><span class="linenos">208</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">return_value</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">__return_type__</span><span class="p">,</span> <span class="s2">&quot;return&quot;</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-209"><a href="#FunctionMethodEnforcer-209"><span class="linenos">209</span></a>        <span class="k">return</span> <span class="n">return_value</span>
+</span><span id="FunctionMethodEnforcer-210"><a href="#FunctionMethodEnforcer-210"><span class="linenos">210</span></a>
+</span><span id="FunctionMethodEnforcer-211"><a href="#FunctionMethodEnforcer-211"><span class="linenos">211</span></a>    <span class="k">def</span> <span class="nf">__check_type__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">acceptable_types</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-212"><a href="#FunctionMethodEnforcer-212"><span class="linenos">212</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="FunctionMethodEnforcer-213"><a href="#FunctionMethodEnforcer-213"><span class="linenos">213</span></a><span class="sd">        Raises an exception the type of a passed `obj` (parameter) is not in the list of supplied `acceptable_types` for the argument.</span>
+</span><span id="FunctionMethodEnforcer-214"><a href="#FunctionMethodEnforcer-214"><span class="linenos">214</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="FunctionMethodEnforcer-215"><a href="#FunctionMethodEnforcer-215"><span class="linenos">215</span></a>        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="nb">type</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-216"><a href="#FunctionMethodEnforcer-216"><span class="linenos">216</span></a>            <span class="n">passed_type</span> <span class="o">=</span> <span class="n">Type</span><span class="p">[</span><span class="n">obj</span><span class="p">]</span>
+</span><span id="FunctionMethodEnforcer-217"><a href="#FunctionMethodEnforcer-217"><span class="linenos">217</span></a>        <span class="k">else</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-218"><a href="#FunctionMethodEnforcer-218"><span class="linenos">218</span></a>            <span class="n">passed_type</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-219"><a href="#FunctionMethodEnforcer-219"><span class="linenos">219</span></a>        <span class="n">acceptable_types</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">acceptable_types</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-220"><a href="#FunctionMethodEnforcer-220"><span class="linenos">220</span></a>        <span class="n">extra_types</span> <span class="o">=</span> <span class="n">acceptable_types</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;__extra__&quot;</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-221"><a href="#FunctionMethodEnforcer-221"><span class="linenos">221</span></a>        <span class="k">if</span> <span class="n">acceptable_types</span> <span class="o">!=</span> <span class="p">{}:</span>
+</span><span id="FunctionMethodEnforcer-222"><a href="#FunctionMethodEnforcer-222"><span class="linenos">222</span></a>            <span class="k">if</span> <span class="n">passed_type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">acceptable_types</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-223"><a href="#FunctionMethodEnforcer-223"><span class="linenos">223</span></a>                <span class="c1"># Raise the exception</span>
+</span><span id="FunctionMethodEnforcer-224"><a href="#FunctionMethodEnforcer-224"><span class="linenos">224</span></a>                <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
+</span><span id="FunctionMethodEnforcer-225"><a href="#FunctionMethodEnforcer-225"><span class="linenos">225</span></a>                    <span class="sa">f</span><span class="s2">&quot;Type mismatch for typed variable `</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">`. Expected one of the following `</span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">acceptable_types</span><span class="o">.</span><span class="n">keys</span><span class="p">()))</span><span class="si">}</span><span class="s2">` but got `</span><span class="si">{</span><span class="n">passed_type</span><span class="si">}</span><span class="s2">` instead.&quot;</span>
+</span><span id="FunctionMethodEnforcer-226"><a href="#FunctionMethodEnforcer-226"><span class="linenos">226</span></a>                <span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-227"><a href="#FunctionMethodEnforcer-227"><span class="linenos">227</span></a>        <span class="n">sub_type</span> <span class="o">=</span> <span class="n">acceptable_types</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">passed_type</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-228"><a href="#FunctionMethodEnforcer-228"><span class="linenos">228</span></a>        <span class="k">if</span> <span class="n">sub_type</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-229"><a href="#FunctionMethodEnforcer-229"><span class="linenos">229</span></a>            <span class="k">if</span> <span class="n">passed_type</span> <span class="o">==</span> <span class="nb">dict</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-230"><a href="#FunctionMethodEnforcer-230"><span class="linenos">230</span></a>                <span class="k">for</span> <span class="n">sub_key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">obj</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+</span><span id="FunctionMethodEnforcer-231"><a href="#FunctionMethodEnforcer-231"><span class="linenos">231</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">sub_type</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">[</span><span class="si">{</span><span class="n">sub_key</span><span class="si">}</span><span class="s2">]&quot;</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-232"><a href="#FunctionMethodEnforcer-232"><span class="linenos">232</span></a>            <span class="k">else</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-233"><a href="#FunctionMethodEnforcer-233"><span class="linenos">233</span></a>                <span class="k">for</span> <span class="n">sub_key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-234"><a href="#FunctionMethodEnforcer-234"><span class="linenos">234</span></a>                    <span class="bp">self</span><span class="o">.</span><span class="n">__check_type__</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">sub_type</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">[</span><span class="si">{</span><span class="n">sub_key</span><span class="si">}</span><span class="s2">]&quot;</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-235"><a href="#FunctionMethodEnforcer-235"><span class="linenos">235</span></a>        <span class="c1"># Special check for Literal types</span>
+</span><span id="FunctionMethodEnforcer-236"><a href="#FunctionMethodEnforcer-236"><span class="linenos">236</span></a>        <span class="n">literal_options</span> <span class="o">=</span> <span class="n">extra_types</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;__literal__&quot;</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-237"><a href="#FunctionMethodEnforcer-237"><span class="linenos">237</span></a>        <span class="k">if</span> <span class="n">literal_options</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-238"><a href="#FunctionMethodEnforcer-238"><span class="linenos">238</span></a>            <span class="k">if</span> <span class="n">obj</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">literal_options</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-239"><a href="#FunctionMethodEnforcer-239"><span class="linenos">239</span></a>                <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
+</span><span id="FunctionMethodEnforcer-240"><a href="#FunctionMethodEnforcer-240"><span class="linenos">240</span></a>                    <span class="sa">f</span><span class="s2">&quot;Literal validation error for variable `</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">`. Expected one of the following `</span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">literal_options</span><span class="p">))</span><span class="si">}</span><span class="s2">` but got `</span><span class="si">{</span><span class="n">obj</span><span class="si">}</span><span class="s2">` instead.&quot;</span>
+</span><span id="FunctionMethodEnforcer-241"><a href="#FunctionMethodEnforcer-241"><span class="linenos">241</span></a>                <span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-242"><a href="#FunctionMethodEnforcer-242"><span class="linenos">242</span></a>        <span class="c1"># Special check for Constraints</span>
+</span><span id="FunctionMethodEnforcer-243"><a href="#FunctionMethodEnforcer-243"><span class="linenos">243</span></a>        <span class="n">constraint</span> <span class="o">=</span> <span class="n">extra_types</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;__constraint__&quot;</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-244"><a href="#FunctionMethodEnforcer-244"><span class="linenos">244</span></a>        <span class="k">if</span> <span class="n">constraint</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-245"><a href="#FunctionMethodEnforcer-245"><span class="linenos">245</span></a>            <span class="n">constraint_validation_output</span> <span class="o">=</span> <span class="n">constraint</span><span class="o">.</span><span class="n">__validate__</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">obj</span><span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-246"><a href="#FunctionMethodEnforcer-246"><span class="linenos">246</span></a>            <span class="k">if</span> <span class="n">constraint_validation_output</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">True</span><span class="p">:</span>
+</span><span id="FunctionMethodEnforcer-247"><a href="#FunctionMethodEnforcer-247"><span class="linenos">247</span></a>                <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
+</span><span id="FunctionMethodEnforcer-248"><a href="#FunctionMethodEnforcer-248"><span class="linenos">248</span></a>                    <span class="sa">f</span><span class="s2">&quot;Constraint validation error for variable `</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2">`. </span><span class="si">{</span><span class="n">constraint_validation_output</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="FunctionMethodEnforcer-249"><a href="#FunctionMethodEnforcer-249"><span class="linenos">249</span></a>                <span class="p">)</span>
+</span><span id="FunctionMethodEnforcer-250"><a href="#FunctionMethodEnforcer-250"><span class="linenos">250</span></a>
+</span><span id="FunctionMethodEnforcer-251"><a href="#FunctionMethodEnforcer-251"><span class="linenos">251</span></a>    <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+</span><span id="FunctionMethodEnforcer-252"><a href="#FunctionMethodEnforcer-252"><span class="linenos">252</span></a>        <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;&lt;type_enforced </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__module__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2"> object at </span><span class="si">{</span><span class="nb">hex</span><span class="p">(</span><span class="nb">id</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span><span class="si">}</span><span class="s2">&gt;&quot;</span>
 </span></pre></div>
 
 
diff --git a/docs/type_enforced/utils.html b/docs/type_enforced/utils.html
index f32b72c..24019b3 100644
--- a/docs/type_enforced/utils.html
+++ b/docs/type_enforced/utils.html
@@ -42,6 +42,24 @@ <h2>API Documentation</h2>
                 </ul>
 
             </li>
+            <li>
+                    <a class="class" href="#GenericConstraint">GenericConstraint</a>
+                            <ul class="memberlist">
+                        <li>
+                                <a class="function" href="#GenericConstraint.__init__">GenericConstraint</a>
+                        </li>
+                </ul>
+
+            </li>
+            <li>
+                    <a class="class" href="#Constraint">Constraint</a>
+                            <ul class="memberlist">
+                        <li>
+                                <a class="function" href="#Constraint.__init__">Constraint</a>
+                        </li>
+                </ul>
+
+            </li>
     </ul>
 
 
@@ -63,91 +81,239 @@ <h1 class="modulename">
 
                         <label class="view-source-button" for="mod-utils-view-source"><span>View Source</span></label>
 
-                        <div class="pdoc-code codehilite"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos"> 1</span></a><span class="kn">import</span> <span class="nn">types</span>
-</span><span id="L-2"><a href="#L-2"><span class="linenos"> 2</span></a><span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">update_wrapper</span>
-</span><span id="L-3"><a href="#L-3"><span class="linenos"> 3</span></a>
-</span><span id="L-4"><a href="#L-4"><span class="linenos"> 4</span></a>
-</span><span id="L-5"><a href="#L-5"><span class="linenos"> 5</span></a><span class="k">def</span> <span class="nf">WithSubclasses</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
-</span><span id="L-6"><a href="#L-6"><span class="linenos"> 6</span></a><span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="L-7"><a href="#L-7"><span class="linenos"> 7</span></a><span class="sd">    A special helper function to allow a class type to be passed and also allow all subclasses of that type.</span>
-</span><span id="L-8"><a href="#L-8"><span class="linenos"> 8</span></a>
-</span><span id="L-9"><a href="#L-9"><span class="linenos"> 9</span></a><span class="sd">    Requires:</span>
-</span><span id="L-10"><a href="#L-10"><span class="linenos">10</span></a>
-</span><span id="L-11"><a href="#L-11"><span class="linenos">11</span></a><span class="sd">    - `obj`:</span>
-</span><span id="L-12"><a href="#L-12"><span class="linenos">12</span></a><span class="sd">        - What: An uninitialized class that should also be considered type correct if a subclass is passed.</span>
-</span><span id="L-13"><a href="#L-13"><span class="linenos">13</span></a><span class="sd">        - Type: Any Uninitialized class</span>
-</span><span id="L-14"><a href="#L-14"><span class="linenos">14</span></a>
-</span><span id="L-15"><a href="#L-15"><span class="linenos">15</span></a><span class="sd">    Returns:</span>
-</span><span id="L-16"><a href="#L-16"><span class="linenos">16</span></a>
-</span><span id="L-17"><a href="#L-17"><span class="linenos">17</span></a><span class="sd">    - `out`:</span>
-</span><span id="L-18"><a href="#L-18"><span class="linenos">18</span></a><span class="sd">        - What: A list of all of the subclasses (recursively parsed)</span>
-</span><span id="L-19"><a href="#L-19"><span class="linenos">19</span></a><span class="sd">        - Type: list of strs</span>
-</span><span id="L-20"><a href="#L-20"><span class="linenos">20</span></a>
-</span><span id="L-21"><a href="#L-21"><span class="linenos">21</span></a>
-</span><span id="L-22"><a href="#L-22"><span class="linenos">22</span></a><span class="sd">    Notes:</span>
-</span><span id="L-23"><a href="#L-23"><span class="linenos">23</span></a>
-</span><span id="L-24"><a href="#L-24"><span class="linenos">24</span></a><span class="sd">    - From a functional perspective, this recursively gets the subclasses for an uninitialised class (type).</span>
-</span><span id="L-25"><a href="#L-25"><span class="linenos">25</span></a><span class="sd">    &quot;&quot;&quot;</span>
-</span><span id="L-26"><a href="#L-26"><span class="linenos">26</span></a>    <span class="n">out</span> <span class="o">=</span> <span class="p">[</span><span class="n">obj</span><span class="p">]</span>
-</span><span id="L-27"><a href="#L-27"><span class="linenos">27</span></a>    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">obj</span><span class="o">.</span><span class="n">__subclasses__</span><span class="p">():</span>
-</span><span id="L-28"><a href="#L-28"><span class="linenos">28</span></a>        <span class="n">out</span> <span class="o">+=</span> <span class="n">WithSubclasses</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
-</span><span id="L-29"><a href="#L-29"><span class="linenos">29</span></a>    <span class="k">return</span> <span class="n">out</span>
-</span><span id="L-30"><a href="#L-30"><span class="linenos">30</span></a>
-</span><span id="L-31"><a href="#L-31"><span class="linenos">31</span></a>
-</span><span id="L-32"><a href="#L-32"><span class="linenos">32</span></a><span class="k">class</span> <span class="nc">Partial</span><span class="p">:</span>
-</span><span id="L-33"><a href="#L-33"><span class="linenos">33</span></a><span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
-</span><span id="L-34"><a href="#L-34"><span class="linenos">34</span></a><span class="sd">    A special class wrapper to allow for easy partial function wrappings and calls.</span>
-</span><span id="L-35"><a href="#L-35"><span class="linenos">35</span></a><span class="sd">    &quot;&quot;&quot;</span>
-</span><span id="L-36"><a href="#L-36"><span class="linenos">36</span></a>
-</span><span id="L-37"><a href="#L-37"><span class="linenos">37</span></a>    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
-</span><span id="L-38"><a href="#L-38"><span class="linenos">38</span></a>        <span class="bp">self</span><span class="p">,</span>
-</span><span id="L-39"><a href="#L-39"><span class="linenos">39</span></a>        <span class="n">__fn__</span><span class="p">,</span>
-</span><span id="L-40"><a href="#L-40"><span class="linenos">40</span></a>        <span class="o">*</span><span class="n">__args__</span><span class="p">,</span>
-</span><span id="L-41"><a href="#L-41"><span class="linenos">41</span></a>        <span class="o">**</span><span class="n">__kwargs__</span><span class="p">,</span>
-</span><span id="L-42"><a href="#L-42"><span class="linenos">42</span></a>    <span class="p">):</span>
-</span><span id="L-43"><a href="#L-43"><span class="linenos">43</span></a>        <span class="n">update_wrapper</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">__fn__</span><span class="p">)</span>
-</span><span id="L-44"><a href="#L-44"><span class="linenos">44</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span> <span class="o">=</span> <span class="n">__fn__</span>
-</span><span id="L-45"><a href="#L-45"><span class="linenos">45</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__args__</span> <span class="o">=</span> <span class="n">__args__</span>
-</span><span id="L-46"><a href="#L-46"><span class="linenos">46</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__kwargs__</span> <span class="o">=</span> <span class="n">__kwargs__</span>
-</span><span id="L-47"><a href="#L-47"><span class="linenos">47</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__fnArity__</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__getFnArity__</span><span class="p">()</span>
-</span><span id="L-48"><a href="#L-48"><span class="linenos">48</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__arity__</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__getArity__</span><span class="p">(</span><span class="n">__args__</span><span class="p">,</span> <span class="n">__kwargs__</span><span class="p">)</span>
-</span><span id="L-49"><a href="#L-49"><span class="linenos">49</span></a>
-</span><span id="L-50"><a href="#L-50"><span class="linenos">50</span></a>    <span class="k">def</span> <span class="nf">__exception__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">):</span>
-</span><span id="L-51"><a href="#L-51"><span class="linenos">51</span></a>        <span class="n">pre_message</span> <span class="o">=</span> <span class="p">(</span>
-</span><span id="L-52"><a href="#L-52"><span class="linenos">52</span></a>            <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__module__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2">_partial): &quot;</span>
-</span><span id="L-53"><a href="#L-53"><span class="linenos">53</span></a>        <span class="p">)</span>
-</span><span id="L-54"><a href="#L-54"><span class="linenos">54</span></a>        <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="n">pre_message</span> <span class="o">+</span> <span class="n">message</span><span class="p">)</span>
-</span><span id="L-55"><a href="#L-55"><span class="linenos">55</span></a>
-</span><span id="L-56"><a href="#L-56"><span class="linenos">56</span></a>    <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
-</span><span id="L-57"><a href="#L-57"><span class="linenos">57</span></a>        <span class="n">new_args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__args__</span> <span class="o">+</span> <span class="n">args</span>
-</span><span id="L-58"><a href="#L-58"><span class="linenos">58</span></a>        <span class="n">new_kwargs</span> <span class="o">=</span> <span class="p">{</span><span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">__kwargs__</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">}</span>
-</span><span id="L-59"><a href="#L-59"><span class="linenos">59</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__arity__</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__getArity__</span><span class="p">(</span><span class="n">new_args</span><span class="p">,</span> <span class="n">new_kwargs</span><span class="p">)</span>
-</span><span id="L-60"><a href="#L-60"><span class="linenos">60</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__arity__</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
-</span><span id="L-61"><a href="#L-61"><span class="linenos">61</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span><span class="s2">&quot;Too many arguments were supplied&quot;</span><span class="p">)</span>
-</span><span id="L-62"><a href="#L-62"><span class="linenos">62</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__arity__</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
-</span><span id="L-63"><a href="#L-63"><span class="linenos">63</span></a>            <span class="n">results</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">(</span><span class="o">*</span><span class="n">new_args</span><span class="p">,</span> <span class="o">**</span><span class="n">new_kwargs</span><span class="p">)</span>
-</span><span id="L-64"><a href="#L-64"><span class="linenos">64</span></a>            <span class="k">return</span> <span class="n">results</span>
-</span><span id="L-65"><a href="#L-65"><span class="linenos">65</span></a>        <span class="k">return</span> <span class="n">Partial</span><span class="p">(</span>
-</span><span id="L-66"><a href="#L-66"><span class="linenos">66</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span>
-</span><span id="L-67"><a href="#L-67"><span class="linenos">67</span></a>            <span class="o">*</span><span class="n">new_args</span><span class="p">,</span>
-</span><span id="L-68"><a href="#L-68"><span class="linenos">68</span></a>            <span class="o">**</span><span class="n">new_kwargs</span><span class="p">,</span>
-</span><span id="L-69"><a href="#L-69"><span class="linenos">69</span></a>        <span class="p">)</span>
-</span><span id="L-70"><a href="#L-70"><span class="linenos">70</span></a>
-</span><span id="L-71"><a href="#L-71"><span class="linenos">71</span></a>    <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-</span><span id="L-72"><a href="#L-72"><span class="linenos">72</span></a>        <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;&lt;Partial </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__module__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2"> object at </span><span class="si">{</span><span class="nb">hex</span><span class="p">(</span><span class="nb">id</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span><span class="si">}</span><span class="s2">&gt;&quot;</span>
-</span><span id="L-73"><a href="#L-73"><span class="linenos">73</span></a>
-</span><span id="L-74"><a href="#L-74"><span class="linenos">74</span></a>    <span class="k">def</span> <span class="nf">__getArity__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">):</span>
-</span><span id="L-75"><a href="#L-75"><span class="linenos">75</span></a>        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fnArity__</span> <span class="o">-</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">+</span> <span class="nb">len</span><span class="p">(</span><span class="n">kwargs</span><span class="p">))</span>
-</span><span id="L-76"><a href="#L-76"><span class="linenos">76</span></a>
-</span><span id="L-77"><a href="#L-77"><span class="linenos">77</span></a>    <span class="k">def</span> <span class="nf">__getFnArity__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-</span><span id="L-78"><a href="#L-78"><span class="linenos">78</span></a>        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span> <span class="p">(</span><span class="n">types</span><span class="o">.</span><span class="n">MethodType</span><span class="p">,</span> <span class="n">types</span><span class="o">.</span><span class="n">FunctionType</span><span class="p">)):</span>
-</span><span id="L-79"><a href="#L-79"><span class="linenos">79</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
-</span><span id="L-80"><a href="#L-80"><span class="linenos">80</span></a>                <span class="s2">&quot;A non function was passed as a function and does not have any arity. See the stack trace above for more information.&quot;</span>
-</span><span id="L-81"><a href="#L-81"><span class="linenos">81</span></a>            <span class="p">)</span>
-</span><span id="L-82"><a href="#L-82"><span class="linenos">82</span></a>        <span class="n">extra_method_input_count</span> <span class="o">=</span> <span class="p">(</span>
-</span><span id="L-83"><a href="#L-83"><span class="linenos">83</span></a>            <span class="mi">1</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span> <span class="p">(</span><span class="n">types</span><span class="o">.</span><span class="n">MethodType</span><span class="p">))</span> <span class="k">else</span> <span class="mi">0</span>
-</span><span id="L-84"><a href="#L-84"><span class="linenos">84</span></a>        <span class="p">)</span>
-</span><span id="L-85"><a href="#L-85"><span class="linenos">85</span></a>        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__code__</span><span class="o">.</span><span class="n">co_argcount</span> <span class="o">-</span> <span class="n">extra_method_input_count</span>
+                        <div class="pdoc-code codehilite"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos">  1</span></a><span class="kn">import</span> <span class="nn">types</span><span class="o">,</span> <span class="nn">re</span>
+</span><span id="L-2"><a href="#L-2"><span class="linenos">  2</span></a><span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">update_wrapper</span>
+</span><span id="L-3"><a href="#L-3"><span class="linenos">  3</span></a>
+</span><span id="L-4"><a href="#L-4"><span class="linenos">  4</span></a>
+</span><span id="L-5"><a href="#L-5"><span class="linenos">  5</span></a><span class="k">def</span> <span class="nf">WithSubclasses</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
+</span><span id="L-6"><a href="#L-6"><span class="linenos">  6</span></a><span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-7"><a href="#L-7"><span class="linenos">  7</span></a><span class="sd">    A special helper function to allow a class type to be passed and also allow all subclasses of that type.</span>
+</span><span id="L-8"><a href="#L-8"><span class="linenos">  8</span></a>
+</span><span id="L-9"><a href="#L-9"><span class="linenos">  9</span></a><span class="sd">    Requires:</span>
+</span><span id="L-10"><a href="#L-10"><span class="linenos"> 10</span></a>
+</span><span id="L-11"><a href="#L-11"><span class="linenos"> 11</span></a><span class="sd">    - `obj`:</span>
+</span><span id="L-12"><a href="#L-12"><span class="linenos"> 12</span></a><span class="sd">        - What: An uninitialized class that should also be considered type correct if a subclass is passed.</span>
+</span><span id="L-13"><a href="#L-13"><span class="linenos"> 13</span></a><span class="sd">        - Type: Any Uninitialized class</span>
+</span><span id="L-14"><a href="#L-14"><span class="linenos"> 14</span></a>
+</span><span id="L-15"><a href="#L-15"><span class="linenos"> 15</span></a><span class="sd">    Returns:</span>
+</span><span id="L-16"><a href="#L-16"><span class="linenos"> 16</span></a>
+</span><span id="L-17"><a href="#L-17"><span class="linenos"> 17</span></a><span class="sd">    - `out`:</span>
+</span><span id="L-18"><a href="#L-18"><span class="linenos"> 18</span></a><span class="sd">        - What: A list of all of the subclasses (recursively parsed)</span>
+</span><span id="L-19"><a href="#L-19"><span class="linenos"> 19</span></a><span class="sd">        - Type: list of strs</span>
+</span><span id="L-20"><a href="#L-20"><span class="linenos"> 20</span></a>
+</span><span id="L-21"><a href="#L-21"><span class="linenos"> 21</span></a>
+</span><span id="L-22"><a href="#L-22"><span class="linenos"> 22</span></a><span class="sd">    Notes:</span>
+</span><span id="L-23"><a href="#L-23"><span class="linenos"> 23</span></a>
+</span><span id="L-24"><a href="#L-24"><span class="linenos"> 24</span></a><span class="sd">    - From a functional perspective, this recursively gets the subclasses for an uninitialised class (type).</span>
+</span><span id="L-25"><a href="#L-25"><span class="linenos"> 25</span></a><span class="sd">    &quot;&quot;&quot;</span>
+</span><span id="L-26"><a href="#L-26"><span class="linenos"> 26</span></a>    <span class="n">out</span> <span class="o">=</span> <span class="p">[</span><span class="n">obj</span><span class="p">]</span>
+</span><span id="L-27"><a href="#L-27"><span class="linenos"> 27</span></a>    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">obj</span><span class="o">.</span><span class="n">__subclasses__</span><span class="p">():</span>
+</span><span id="L-28"><a href="#L-28"><span class="linenos"> 28</span></a>        <span class="n">out</span> <span class="o">+=</span> <span class="n">WithSubclasses</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
+</span><span id="L-29"><a href="#L-29"><span class="linenos"> 29</span></a>    <span class="k">return</span> <span class="n">out</span>
+</span><span id="L-30"><a href="#L-30"><span class="linenos"> 30</span></a>
+</span><span id="L-31"><a href="#L-31"><span class="linenos"> 31</span></a>
+</span><span id="L-32"><a href="#L-32"><span class="linenos"> 32</span></a><span class="k">class</span> <span class="nc">Partial</span><span class="p">:</span>
+</span><span id="L-33"><a href="#L-33"><span class="linenos"> 33</span></a><span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-34"><a href="#L-34"><span class="linenos"> 34</span></a><span class="sd">    A special class wrapper to allow for easy partial function wrappings and calls.</span>
+</span><span id="L-35"><a href="#L-35"><span class="linenos"> 35</span></a><span class="sd">    &quot;&quot;&quot;</span>
+</span><span id="L-36"><a href="#L-36"><span class="linenos"> 36</span></a>
+</span><span id="L-37"><a href="#L-37"><span class="linenos"> 37</span></a>    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
+</span><span id="L-38"><a href="#L-38"><span class="linenos"> 38</span></a>        <span class="bp">self</span><span class="p">,</span>
+</span><span id="L-39"><a href="#L-39"><span class="linenos"> 39</span></a>        <span class="n">__fn__</span><span class="p">,</span>
+</span><span id="L-40"><a href="#L-40"><span class="linenos"> 40</span></a>        <span class="o">*</span><span class="n">__args__</span><span class="p">,</span>
+</span><span id="L-41"><a href="#L-41"><span class="linenos"> 41</span></a>        <span class="o">**</span><span class="n">__kwargs__</span><span class="p">,</span>
+</span><span id="L-42"><a href="#L-42"><span class="linenos"> 42</span></a>    <span class="p">):</span>
+</span><span id="L-43"><a href="#L-43"><span class="linenos"> 43</span></a>        <span class="n">update_wrapper</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">__fn__</span><span class="p">)</span>
+</span><span id="L-44"><a href="#L-44"><span class="linenos"> 44</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span> <span class="o">=</span> <span class="n">__fn__</span>
+</span><span id="L-45"><a href="#L-45"><span class="linenos"> 45</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__args__</span> <span class="o">=</span> <span class="n">__args__</span>
+</span><span id="L-46"><a href="#L-46"><span class="linenos"> 46</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__kwargs__</span> <span class="o">=</span> <span class="n">__kwargs__</span>
+</span><span id="L-47"><a href="#L-47"><span class="linenos"> 47</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__fnArity__</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__getFnArity__</span><span class="p">()</span>
+</span><span id="L-48"><a href="#L-48"><span class="linenos"> 48</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__arity__</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__getArity__</span><span class="p">(</span><span class="n">__args__</span><span class="p">,</span> <span class="n">__kwargs__</span><span class="p">)</span>
+</span><span id="L-49"><a href="#L-49"><span class="linenos"> 49</span></a>
+</span><span id="L-50"><a href="#L-50"><span class="linenos"> 50</span></a>    <span class="k">def</span> <span class="nf">__exception__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">):</span>
+</span><span id="L-51"><a href="#L-51"><span class="linenos"> 51</span></a>        <span class="n">pre_message</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="L-52"><a href="#L-52"><span class="linenos"> 52</span></a>            <span class="sa">f</span><span class="s2">&quot;(</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__module__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2">_partial): &quot;</span>
+</span><span id="L-53"><a href="#L-53"><span class="linenos"> 53</span></a>        <span class="p">)</span>
+</span><span id="L-54"><a href="#L-54"><span class="linenos"> 54</span></a>        <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="n">pre_message</span> <span class="o">+</span> <span class="n">message</span><span class="p">)</span>
+</span><span id="L-55"><a href="#L-55"><span class="linenos"> 55</span></a>
+</span><span id="L-56"><a href="#L-56"><span class="linenos"> 56</span></a>    <span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+</span><span id="L-57"><a href="#L-57"><span class="linenos"> 57</span></a>        <span class="n">new_args</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__args__</span> <span class="o">+</span> <span class="n">args</span>
+</span><span id="L-58"><a href="#L-58"><span class="linenos"> 58</span></a>        <span class="n">new_kwargs</span> <span class="o">=</span> <span class="p">{</span><span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">__kwargs__</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">}</span>
+</span><span id="L-59"><a href="#L-59"><span class="linenos"> 59</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__arity__</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__getArity__</span><span class="p">(</span><span class="n">new_args</span><span class="p">,</span> <span class="n">new_kwargs</span><span class="p">)</span>
+</span><span id="L-60"><a href="#L-60"><span class="linenos"> 60</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__arity__</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
+</span><span id="L-61"><a href="#L-61"><span class="linenos"> 61</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span><span class="s2">&quot;Too many arguments were supplied&quot;</span><span class="p">)</span>
+</span><span id="L-62"><a href="#L-62"><span class="linenos"> 62</span></a>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">__arity__</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
+</span><span id="L-63"><a href="#L-63"><span class="linenos"> 63</span></a>            <span class="n">results</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">(</span><span class="o">*</span><span class="n">new_args</span><span class="p">,</span> <span class="o">**</span><span class="n">new_kwargs</span><span class="p">)</span>
+</span><span id="L-64"><a href="#L-64"><span class="linenos"> 64</span></a>            <span class="k">return</span> <span class="n">results</span>
+</span><span id="L-65"><a href="#L-65"><span class="linenos"> 65</span></a>        <span class="k">return</span> <span class="n">Partial</span><span class="p">(</span>
+</span><span id="L-66"><a href="#L-66"><span class="linenos"> 66</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span>
+</span><span id="L-67"><a href="#L-67"><span class="linenos"> 67</span></a>            <span class="o">*</span><span class="n">new_args</span><span class="p">,</span>
+</span><span id="L-68"><a href="#L-68"><span class="linenos"> 68</span></a>            <span class="o">**</span><span class="n">new_kwargs</span><span class="p">,</span>
+</span><span id="L-69"><a href="#L-69"><span class="linenos"> 69</span></a>        <span class="p">)</span>
+</span><span id="L-70"><a href="#L-70"><span class="linenos"> 70</span></a>
+</span><span id="L-71"><a href="#L-71"><span class="linenos"> 71</span></a>    <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+</span><span id="L-72"><a href="#L-72"><span class="linenos"> 72</span></a>        <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;&lt;Partial </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__module__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__qualname__</span><span class="si">}</span><span class="s2"> object at </span><span class="si">{</span><span class="nb">hex</span><span class="p">(</span><span class="nb">id</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span><span class="si">}</span><span class="s2">&gt;&quot;</span>
+</span><span id="L-73"><a href="#L-73"><span class="linenos"> 73</span></a>
+</span><span id="L-74"><a href="#L-74"><span class="linenos"> 74</span></a>    <span class="k">def</span> <span class="nf">__getArity__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">):</span>
+</span><span id="L-75"><a href="#L-75"><span class="linenos"> 75</span></a>        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fnArity__</span> <span class="o">-</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">+</span> <span class="nb">len</span><span class="p">(</span><span class="n">kwargs</span><span class="p">))</span>
+</span><span id="L-76"><a href="#L-76"><span class="linenos"> 76</span></a>
+</span><span id="L-77"><a href="#L-77"><span class="linenos"> 77</span></a>    <span class="k">def</span> <span class="nf">__getFnArity__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+</span><span id="L-78"><a href="#L-78"><span class="linenos"> 78</span></a>        <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span> <span class="p">(</span><span class="n">types</span><span class="o">.</span><span class="n">MethodType</span><span class="p">,</span> <span class="n">types</span><span class="o">.</span><span class="n">FunctionType</span><span class="p">)):</span>
+</span><span id="L-79"><a href="#L-79"><span class="linenos"> 79</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__exception__</span><span class="p">(</span>
+</span><span id="L-80"><a href="#L-80"><span class="linenos"> 80</span></a>                <span class="s2">&quot;A non function was passed as a function and does not have any arity. See the stack trace above for more information.&quot;</span>
+</span><span id="L-81"><a href="#L-81"><span class="linenos"> 81</span></a>            <span class="p">)</span>
+</span><span id="L-82"><a href="#L-82"><span class="linenos"> 82</span></a>        <span class="n">extra_method_input_count</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="L-83"><a href="#L-83"><span class="linenos"> 83</span></a>            <span class="mi">1</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="p">,</span> <span class="p">(</span><span class="n">types</span><span class="o">.</span><span class="n">MethodType</span><span class="p">))</span> <span class="k">else</span> <span class="mi">0</span>
+</span><span id="L-84"><a href="#L-84"><span class="linenos"> 84</span></a>        <span class="p">)</span>
+</span><span id="L-85"><a href="#L-85"><span class="linenos"> 85</span></a>        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__fn__</span><span class="o">.</span><span class="vm">__code__</span><span class="o">.</span><span class="n">co_argcount</span> <span class="o">-</span> <span class="n">extra_method_input_count</span>
+</span><span id="L-86"><a href="#L-86"><span class="linenos"> 86</span></a>
+</span><span id="L-87"><a href="#L-87"><span class="linenos"> 87</span></a>
+</span><span id="L-88"><a href="#L-88"><span class="linenos"> 88</span></a><span class="k">class</span> <span class="nc">GenericConstraint</span><span class="p">:</span>
+</span><span id="L-89"><a href="#L-89"><span class="linenos"> 89</span></a>    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">constraints</span><span class="p">:</span> <span class="nb">dict</span><span class="p">):</span>
+</span><span id="L-90"><a href="#L-90"><span class="linenos"> 90</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-91"><a href="#L-91"><span class="linenos"> 91</span></a><span class="sd">        Creates a generic constraint object that can be used to validate a value against a set of constraints.</span>
+</span><span id="L-92"><a href="#L-92"><span class="linenos"> 92</span></a>
+</span><span id="L-93"><a href="#L-93"><span class="linenos"> 93</span></a><span class="sd">        Required Arguments:</span>
+</span><span id="L-94"><a href="#L-94"><span class="linenos"> 94</span></a>
+</span><span id="L-95"><a href="#L-95"><span class="linenos"> 95</span></a><span class="sd">        - `constraints`:</span>
+</span><span id="L-96"><a href="#L-96"><span class="linenos"> 96</span></a><span class="sd">            - What: A dictionary of constraint names and their associated functions.</span>
+</span><span id="L-97"><a href="#L-97"><span class="linenos"> 97</span></a><span class="sd">            - Type: dict</span>
+</span><span id="L-98"><a href="#L-98"><span class="linenos"> 98</span></a><span class="sd">            - Note: All values in the dictionary must be functions that take a single argument and return a boolean.</span>
+</span><span id="L-99"><a href="#L-99"><span class="linenos"> 99</span></a><span class="sd">            - Note: The dictionary keys will be used to identify the failed constraints in the error messages.</span>
+</span><span id="L-100"><a href="#L-100"><span class="linenos">100</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="L-101"><a href="#L-101"><span class="linenos">101</span></a>        <span class="k">assert</span> <span class="nb">all</span><span class="p">(</span>
+</span><span id="L-102"><a href="#L-102"><span class="linenos">102</span></a>            <span class="nb">hasattr</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s2">&quot;__call__&quot;</span><span class="p">)</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">constraints</span><span class="o">.</span><span class="n">values</span><span class="p">()</span>
+</span><span id="L-103"><a href="#L-103"><span class="linenos">103</span></a>        <span class="p">),</span> <span class="s2">&quot;All constraints must be functions.&quot;</span>
+</span><span id="L-104"><a href="#L-104"><span class="linenos">104</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span> <span class="o">=</span> <span class="n">constraints</span>
+</span><span id="L-105"><a href="#L-105"><span class="linenos">105</span></a>
+</span><span id="L-106"><a href="#L-106"><span class="linenos">106</span></a>    <span class="k">def</span> <span class="nf">__validate__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">varname</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
+</span><span id="L-107"><a href="#L-107"><span class="linenos">107</span></a>        <span class="k">for</span> <span class="n">check_name</span><span class="p">,</span> <span class="n">check_func</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+</span><span id="L-108"><a href="#L-108"><span class="linenos">108</span></a>            <span class="k">try</span><span class="p">:</span>
+</span><span id="L-109"><a href="#L-109"><span class="linenos">109</span></a>                <span class="k">if</span> <span class="ow">not</span> <span class="n">check_func</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
+</span><span id="L-110"><a href="#L-110"><span class="linenos">110</span></a>                    <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;Constraint `</span><span class="si">{</span><span class="n">check_name</span><span class="si">}</span><span class="s2">` not met with the provided value `</span><span class="si">{</span><span class="n">value</span><span class="si">}</span><span class="s2">`&quot;</span>
+</span><span id="L-111"><a href="#L-111"><span class="linenos">111</span></a>            <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+</span><span id="L-112"><a href="#L-112"><span class="linenos">112</span></a>                <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;An exception was raised when checking the constraint `</span><span class="si">{</span><span class="n">check_name</span><span class="si">}</span><span class="s2">` with the provided value `</span><span class="si">{</span><span class="n">value</span><span class="si">}</span><span class="s2">`. Error: </span><span class="si">{</span><span class="n">e</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="L-113"><a href="#L-113"><span class="linenos">113</span></a>        <span class="k">return</span> <span class="kc">True</span>
+</span><span id="L-114"><a href="#L-114"><span class="linenos">114</span></a>
+</span><span id="L-115"><a href="#L-115"><span class="linenos">115</span></a>
+</span><span id="L-116"><a href="#L-116"><span class="linenos">116</span></a><span class="k">class</span> <span class="nc">Constraint</span><span class="p">(</span><span class="n">GenericConstraint</span><span class="p">):</span>
+</span><span id="L-117"><a href="#L-117"><span class="linenos">117</span></a>    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
+</span><span id="L-118"><a href="#L-118"><span class="linenos">118</span></a>        <span class="bp">self</span><span class="p">,</span>
+</span><span id="L-119"><a href="#L-119"><span class="linenos">119</span></a>        <span class="n">pattern</span><span class="p">:</span> <span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-120"><a href="#L-120"><span class="linenos">120</span></a>        <span class="n">includes</span><span class="p">:</span> <span class="p">[</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-121"><a href="#L-121"><span class="linenos">121</span></a>        <span class="n">excludes</span><span class="p">:</span> <span class="p">[</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-122"><a href="#L-122"><span class="linenos">122</span></a>        <span class="n">gt</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-123"><a href="#L-123"><span class="linenos">123</span></a>        <span class="n">lt</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-124"><a href="#L-124"><span class="linenos">124</span></a>        <span class="n">ge</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-125"><a href="#L-125"><span class="linenos">125</span></a>        <span class="n">le</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-126"><a href="#L-126"><span class="linenos">126</span></a>        <span class="n">eq</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-127"><a href="#L-127"><span class="linenos">127</span></a>        <span class="n">ne</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="L-128"><a href="#L-128"><span class="linenos">128</span></a>    <span class="p">):</span>
+</span><span id="L-129"><a href="#L-129"><span class="linenos">129</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="L-130"><a href="#L-130"><span class="linenos">130</span></a><span class="sd">        Creates a constraint object that can be used to validate a value against a set of constraints.</span>
+</span><span id="L-131"><a href="#L-131"><span class="linenos">131</span></a>
+</span><span id="L-132"><a href="#L-132"><span class="linenos">132</span></a><span class="sd">        Optional Arguments:</span>
+</span><span id="L-133"><a href="#L-133"><span class="linenos">133</span></a>
+</span><span id="L-134"><a href="#L-134"><span class="linenos">134</span></a><span class="sd">        - `pattern`:</span>
+</span><span id="L-135"><a href="#L-135"><span class="linenos">135</span></a><span class="sd">            - What: A regex pattern that the value must match.</span>
+</span><span id="L-136"><a href="#L-136"><span class="linenos">136</span></a><span class="sd">            - Type: str or None</span>
+</span><span id="L-137"><a href="#L-137"><span class="linenos">137</span></a><span class="sd">            - Default: None</span>
+</span><span id="L-138"><a href="#L-138"><span class="linenos">138</span></a><span class="sd">        - `includes`:</span>
+</span><span id="L-139"><a href="#L-139"><span class="linenos">139</span></a><span class="sd">            - What: A list of values that the value must be in.</span>
+</span><span id="L-140"><a href="#L-140"><span class="linenos">140</span></a><span class="sd">            - Type: list, tuple, set or None</span>
+</span><span id="L-141"><a href="#L-141"><span class="linenos">141</span></a><span class="sd">            - Default: None</span>
+</span><span id="L-142"><a href="#L-142"><span class="linenos">142</span></a><span class="sd">        - `excludes`:</span>
+</span><span id="L-143"><a href="#L-143"><span class="linenos">143</span></a><span class="sd">            - What: A list of values that the value must not be in.</span>
+</span><span id="L-144"><a href="#L-144"><span class="linenos">144</span></a><span class="sd">            - Type: list, tuple, set or None</span>
+</span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a><span class="sd">            - Default: None</span>
+</span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a><span class="sd">        - `gt`:</span>
+</span><span id="L-147"><a href="#L-147"><span class="linenos">147</span></a><span class="sd">            - What: The value must be greater than this value.</span>
+</span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a><span class="sd">            - Default: None</span>
+</span><span id="L-150"><a href="#L-150"><span class="linenos">150</span></a><span class="sd">        - `lt`:</span>
+</span><span id="L-151"><a href="#L-151"><span class="linenos">151</span></a><span class="sd">            - What: The value must be less than this value.</span>
+</span><span id="L-152"><a href="#L-152"><span class="linenos">152</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="L-153"><a href="#L-153"><span class="linenos">153</span></a><span class="sd">            - Default: None</span>
+</span><span id="L-154"><a href="#L-154"><span class="linenos">154</span></a><span class="sd">        - `ge`:</span>
+</span><span id="L-155"><a href="#L-155"><span class="linenos">155</span></a><span class="sd">            - What: The value must be greater than or equal to this value.</span>
+</span><span id="L-156"><a href="#L-156"><span class="linenos">156</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="L-157"><a href="#L-157"><span class="linenos">157</span></a><span class="sd">            - Default: None</span>
+</span><span id="L-158"><a href="#L-158"><span class="linenos">158</span></a><span class="sd">        - `le`:</span>
+</span><span id="L-159"><a href="#L-159"><span class="linenos">159</span></a><span class="sd">            - What: The value must be less than or equal to this value.</span>
+</span><span id="L-160"><a href="#L-160"><span class="linenos">160</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="L-161"><a href="#L-161"><span class="linenos">161</span></a><span class="sd">            - Default: None</span>
+</span><span id="L-162"><a href="#L-162"><span class="linenos">162</span></a><span class="sd">        - `eq`:</span>
+</span><span id="L-163"><a href="#L-163"><span class="linenos">163</span></a><span class="sd">            - What: The value must be equal to this value.</span>
+</span><span id="L-164"><a href="#L-164"><span class="linenos">164</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="L-165"><a href="#L-165"><span class="linenos">165</span></a><span class="sd">            - Default: None</span>
+</span><span id="L-166"><a href="#L-166"><span class="linenos">166</span></a><span class="sd">        - `ne`:</span>
+</span><span id="L-167"><a href="#L-167"><span class="linenos">167</span></a><span class="sd">            - What: The value must not be equal to this value.</span>
+</span><span id="L-168"><a href="#L-168"><span class="linenos">168</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="L-169"><a href="#L-169"><span class="linenos">169</span></a><span class="sd">            - Default: None</span>
+</span><span id="L-170"><a href="#L-170"><span class="linenos">170</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="L-171"><a href="#L-171"><span class="linenos">171</span></a>        <span class="k">assert</span> <span class="nb">any</span><span class="p">(</span>
+</span><span id="L-172"><a href="#L-172"><span class="linenos">172</span></a>            <span class="n">v</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
+</span><span id="L-173"><a href="#L-173"><span class="linenos">173</span></a>            <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="p">[</span><span class="n">pattern</span><span class="p">,</span> <span class="n">gt</span><span class="p">,</span> <span class="n">lt</span><span class="p">,</span> <span class="n">ge</span><span class="p">,</span> <span class="n">le</span><span class="p">,</span> <span class="n">eq</span><span class="p">,</span> <span class="n">ne</span><span class="p">,</span> <span class="n">includes</span><span class="p">,</span> <span class="n">excludes</span><span class="p">]</span>
+</span><span id="L-174"><a href="#L-174"><span class="linenos">174</span></a>        <span class="p">),</span> <span class="s2">&quot;At least one constraint must be provided.&quot;</span>
+</span><span id="L-175"><a href="#L-175"><span class="linenos">175</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-176"><a href="#L-176"><span class="linenos">176</span></a>            <span class="n">includes</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="L-177"><a href="#L-177"><span class="linenos">177</span></a>        <span class="p">),</span> <span class="s2">&quot;Includes must be a list, tuple, set or None.&quot;</span>
+</span><span id="L-178"><a href="#L-178"><span class="linenos">178</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-179"><a href="#L-179"><span class="linenos">179</span></a>            <span class="n">excludes</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="L-180"><a href="#L-180"><span class="linenos">180</span></a>        <span class="p">),</span> <span class="s2">&quot;Excludes must be a list, tuple, set or None.&quot;</span>
+</span><span id="L-181"><a href="#L-181"><span class="linenos">181</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-182"><a href="#L-182"><span class="linenos">182</span></a>            <span class="n">pattern</span><span class="p">,</span> <span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="L-183"><a href="#L-183"><span class="linenos">183</span></a>        <span class="p">),</span> <span class="s2">&quot;Pattern must be a string or None.&quot;</span>
+</span><span id="L-184"><a href="#L-184"><span class="linenos">184</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-185"><a href="#L-185"><span class="linenos">185</span></a>            <span class="n">gt</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="L-186"><a href="#L-186"><span class="linenos">186</span></a>        <span class="p">),</span> <span class="s2">&quot;Greater than constraint must be a float, int or None.&quot;</span>
+</span><span id="L-187"><a href="#L-187"><span class="linenos">187</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-188"><a href="#L-188"><span class="linenos">188</span></a>            <span class="n">lt</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="L-189"><a href="#L-189"><span class="linenos">189</span></a>        <span class="p">),</span> <span class="s2">&quot;Less than constraint must be a float, int or None.&quot;</span>
+</span><span id="L-190"><a href="#L-190"><span class="linenos">190</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-191"><a href="#L-191"><span class="linenos">191</span></a>            <span class="n">ge</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="L-192"><a href="#L-192"><span class="linenos">192</span></a>        <span class="p">),</span> <span class="s2">&quot;Greater or equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="L-193"><a href="#L-193"><span class="linenos">193</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-194"><a href="#L-194"><span class="linenos">194</span></a>            <span class="n">le</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="L-195"><a href="#L-195"><span class="linenos">195</span></a>        <span class="p">),</span> <span class="s2">&quot;Less than or equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="L-196"><a href="#L-196"><span class="linenos">196</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-197"><a href="#L-197"><span class="linenos">197</span></a>            <span class="n">eq</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="L-198"><a href="#L-198"><span class="linenos">198</span></a>        <span class="p">),</span> <span class="s2">&quot;Equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="L-199"><a href="#L-199"><span class="linenos">199</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-200"><a href="#L-200"><span class="linenos">200</span></a>            <span class="n">ne</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="L-201"><a href="#L-201"><span class="linenos">201</span></a>        <span class="p">),</span> <span class="s2">&quot;Not equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="L-202"><a href="#L-202"><span class="linenos">202</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span> <span class="o">=</span> <span class="p">{}</span>
+</span><span id="L-203"><a href="#L-203"><span class="linenos">203</span></a>        <span class="k">if</span> <span class="n">pattern</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-204"><a href="#L-204"><span class="linenos">204</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="s2">&quot;be a string&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="L-205"><a href="#L-205"><span class="linenos">205</span></a>                <span class="n">x</span><span class="p">,</span> <span class="nb">str</span>
+</span><span id="L-206"><a href="#L-206"><span class="linenos">206</span></a>            <span class="p">)</span>
+</span><span id="L-207"><a href="#L-207"><span class="linenos">207</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="s2">&quot;Regex Pattern Match&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">bool</span><span class="p">(</span>
+</span><span id="L-208"><a href="#L-208"><span class="linenos">208</span></a>                <span class="n">re</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="n">pattern</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>
+</span><span id="L-209"><a href="#L-209"><span class="linenos">209</span></a>            <span class="p">)</span>
+</span><span id="L-210"><a href="#L-210"><span class="linenos">210</span></a>        <span class="k">if</span> <span class="n">includes</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-211"><a href="#L-211"><span class="linenos">211</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Includes&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">includes</span>
+</span><span id="L-212"><a href="#L-212"><span class="linenos">212</span></a>        <span class="k">if</span> <span class="n">excludes</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-213"><a href="#L-213"><span class="linenos">213</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="s2">&quot;Excludes&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">excludes</span>
+</span><span id="L-214"><a href="#L-214"><span class="linenos">214</span></a>        <span class="k">if</span> <span class="n">gt</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-215"><a href="#L-215"><span class="linenos">215</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Greater Than (</span><span class="si">{</span><span class="n">gt</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="L-216"><a href="#L-216"><span class="linenos">216</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&gt;</span> <span class="n">gt</span>
+</span><span id="L-217"><a href="#L-217"><span class="linenos">217</span></a>            <span class="p">)</span>
+</span><span id="L-218"><a href="#L-218"><span class="linenos">218</span></a>        <span class="k">if</span> <span class="n">lt</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-219"><a href="#L-219"><span class="linenos">219</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Less Than (</span><span class="si">{</span><span class="n">lt</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&lt;</span> <span class="n">lt</span>
+</span><span id="L-220"><a href="#L-220"><span class="linenos">220</span></a>        <span class="k">if</span> <span class="n">ge</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-221"><a href="#L-221"><span class="linenos">221</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Greater Than Or Equal To (</span><span class="si">{</span><span class="n">ge</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="L-222"><a href="#L-222"><span class="linenos">222</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&gt;=</span> <span class="n">ge</span>
+</span><span id="L-223"><a href="#L-223"><span class="linenos">223</span></a>            <span class="p">)</span>
+</span><span id="L-224"><a href="#L-224"><span class="linenos">224</span></a>        <span class="k">if</span> <span class="n">le</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-225"><a href="#L-225"><span class="linenos">225</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Less Than Or Equal To (</span><span class="si">{</span><span class="n">le</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="L-226"><a href="#L-226"><span class="linenos">226</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&lt;=</span> <span class="n">le</span>
+</span><span id="L-227"><a href="#L-227"><span class="linenos">227</span></a>            <span class="p">)</span>
+</span><span id="L-228"><a href="#L-228"><span class="linenos">228</span></a>        <span class="k">if</span> <span class="n">eq</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-229"><a href="#L-229"><span class="linenos">229</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Equal To (</span><span class="si">{</span><span class="n">eq</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">==</span> <span class="n">eq</span>
+</span><span id="L-230"><a href="#L-230"><span class="linenos">230</span></a>        <span class="k">if</span> <span class="n">ne</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="L-231"><a href="#L-231"><span class="linenos">231</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Not Equal To (</span><span class="si">{</span><span class="n">ne</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="L-232"><a href="#L-232"><span class="linenos">232</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">!=</span> <span class="n">ne</span>
+</span><span id="L-233"><a href="#L-233"><span class="linenos">233</span></a>            <span class="p">)</span>
 </span></pre></div>
 
 
@@ -321,6 +487,424 @@ <h1 class="modulename">
 
     
 
+                            </div>
+                </section>
+                <section id="GenericConstraint">
+                            <input id="GenericConstraint-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
+<div class="attr class">
+            
+    <span class="def">class</span>
+    <span class="name">GenericConstraint</span>:
+
+                <label class="view-source-button" for="GenericConstraint-view-source"><span>View Source</span></label>
+
+    </div>
+    <a class="headerlink" href="#GenericConstraint"></a>
+            <div class="pdoc-code codehilite"><pre><span></span><span id="GenericConstraint-89"><a href="#GenericConstraint-89"><span class="linenos"> 89</span></a><span class="k">class</span> <span class="nc">GenericConstraint</span><span class="p">:</span>
+</span><span id="GenericConstraint-90"><a href="#GenericConstraint-90"><span class="linenos"> 90</span></a>    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">constraints</span><span class="p">:</span> <span class="nb">dict</span><span class="p">):</span>
+</span><span id="GenericConstraint-91"><a href="#GenericConstraint-91"><span class="linenos"> 91</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="GenericConstraint-92"><a href="#GenericConstraint-92"><span class="linenos"> 92</span></a><span class="sd">        Creates a generic constraint object that can be used to validate a value against a set of constraints.</span>
+</span><span id="GenericConstraint-93"><a href="#GenericConstraint-93"><span class="linenos"> 93</span></a>
+</span><span id="GenericConstraint-94"><a href="#GenericConstraint-94"><span class="linenos"> 94</span></a><span class="sd">        Required Arguments:</span>
+</span><span id="GenericConstraint-95"><a href="#GenericConstraint-95"><span class="linenos"> 95</span></a>
+</span><span id="GenericConstraint-96"><a href="#GenericConstraint-96"><span class="linenos"> 96</span></a><span class="sd">        - `constraints`:</span>
+</span><span id="GenericConstraint-97"><a href="#GenericConstraint-97"><span class="linenos"> 97</span></a><span class="sd">            - What: A dictionary of constraint names and their associated functions.</span>
+</span><span id="GenericConstraint-98"><a href="#GenericConstraint-98"><span class="linenos"> 98</span></a><span class="sd">            - Type: dict</span>
+</span><span id="GenericConstraint-99"><a href="#GenericConstraint-99"><span class="linenos"> 99</span></a><span class="sd">            - Note: All values in the dictionary must be functions that take a single argument and return a boolean.</span>
+</span><span id="GenericConstraint-100"><a href="#GenericConstraint-100"><span class="linenos">100</span></a><span class="sd">            - Note: The dictionary keys will be used to identify the failed constraints in the error messages.</span>
+</span><span id="GenericConstraint-101"><a href="#GenericConstraint-101"><span class="linenos">101</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="GenericConstraint-102"><a href="#GenericConstraint-102"><span class="linenos">102</span></a>        <span class="k">assert</span> <span class="nb">all</span><span class="p">(</span>
+</span><span id="GenericConstraint-103"><a href="#GenericConstraint-103"><span class="linenos">103</span></a>            <span class="nb">hasattr</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s2">&quot;__call__&quot;</span><span class="p">)</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">constraints</span><span class="o">.</span><span class="n">values</span><span class="p">()</span>
+</span><span id="GenericConstraint-104"><a href="#GenericConstraint-104"><span class="linenos">104</span></a>        <span class="p">),</span> <span class="s2">&quot;All constraints must be functions.&quot;</span>
+</span><span id="GenericConstraint-105"><a href="#GenericConstraint-105"><span class="linenos">105</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span> <span class="o">=</span> <span class="n">constraints</span>
+</span><span id="GenericConstraint-106"><a href="#GenericConstraint-106"><span class="linenos">106</span></a>
+</span><span id="GenericConstraint-107"><a href="#GenericConstraint-107"><span class="linenos">107</span></a>    <span class="k">def</span> <span class="nf">__validate__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">varname</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
+</span><span id="GenericConstraint-108"><a href="#GenericConstraint-108"><span class="linenos">108</span></a>        <span class="k">for</span> <span class="n">check_name</span><span class="p">,</span> <span class="n">check_func</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
+</span><span id="GenericConstraint-109"><a href="#GenericConstraint-109"><span class="linenos">109</span></a>            <span class="k">try</span><span class="p">:</span>
+</span><span id="GenericConstraint-110"><a href="#GenericConstraint-110"><span class="linenos">110</span></a>                <span class="k">if</span> <span class="ow">not</span> <span class="n">check_func</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
+</span><span id="GenericConstraint-111"><a href="#GenericConstraint-111"><span class="linenos">111</span></a>                    <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;Constraint `</span><span class="si">{</span><span class="n">check_name</span><span class="si">}</span><span class="s2">` not met with the provided value `</span><span class="si">{</span><span class="n">value</span><span class="si">}</span><span class="s2">`&quot;</span>
+</span><span id="GenericConstraint-112"><a href="#GenericConstraint-112"><span class="linenos">112</span></a>            <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+</span><span id="GenericConstraint-113"><a href="#GenericConstraint-113"><span class="linenos">113</span></a>                <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;An exception was raised when checking the constraint `</span><span class="si">{</span><span class="n">check_name</span><span class="si">}</span><span class="s2">` with the provided value `</span><span class="si">{</span><span class="n">value</span><span class="si">}</span><span class="s2">`. Error: </span><span class="si">{</span><span class="n">e</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="GenericConstraint-114"><a href="#GenericConstraint-114"><span class="linenos">114</span></a>        <span class="k">return</span> <span class="kc">True</span>
+</span></pre></div>
+
+
+    
+
+                            <div id="GenericConstraint.__init__" class="classattr">
+                                        <input id="GenericConstraint.__init__-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
+<div class="attr function">
+            
+        <span class="name">GenericConstraint</span><span class="signature pdoc-code condensed">(<span class="param"><span class="n">constraints</span><span class="p">:</span> <span class="nb">dict</span></span>)</span>
+
+                <label class="view-source-button" for="GenericConstraint.__init__-view-source"><span>View Source</span></label>
+
+    </div>
+    <a class="headerlink" href="#GenericConstraint.__init__"></a>
+            <div class="pdoc-code codehilite"><pre><span></span><span id="GenericConstraint.__init__-90"><a href="#GenericConstraint.__init__-90"><span class="linenos"> 90</span></a>    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">constraints</span><span class="p">:</span> <span class="nb">dict</span><span class="p">):</span>
+</span><span id="GenericConstraint.__init__-91"><a href="#GenericConstraint.__init__-91"><span class="linenos"> 91</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="GenericConstraint.__init__-92"><a href="#GenericConstraint.__init__-92"><span class="linenos"> 92</span></a><span class="sd">        Creates a generic constraint object that can be used to validate a value against a set of constraints.</span>
+</span><span id="GenericConstraint.__init__-93"><a href="#GenericConstraint.__init__-93"><span class="linenos"> 93</span></a>
+</span><span id="GenericConstraint.__init__-94"><a href="#GenericConstraint.__init__-94"><span class="linenos"> 94</span></a><span class="sd">        Required Arguments:</span>
+</span><span id="GenericConstraint.__init__-95"><a href="#GenericConstraint.__init__-95"><span class="linenos"> 95</span></a>
+</span><span id="GenericConstraint.__init__-96"><a href="#GenericConstraint.__init__-96"><span class="linenos"> 96</span></a><span class="sd">        - `constraints`:</span>
+</span><span id="GenericConstraint.__init__-97"><a href="#GenericConstraint.__init__-97"><span class="linenos"> 97</span></a><span class="sd">            - What: A dictionary of constraint names and their associated functions.</span>
+</span><span id="GenericConstraint.__init__-98"><a href="#GenericConstraint.__init__-98"><span class="linenos"> 98</span></a><span class="sd">            - Type: dict</span>
+</span><span id="GenericConstraint.__init__-99"><a href="#GenericConstraint.__init__-99"><span class="linenos"> 99</span></a><span class="sd">            - Note: All values in the dictionary must be functions that take a single argument and return a boolean.</span>
+</span><span id="GenericConstraint.__init__-100"><a href="#GenericConstraint.__init__-100"><span class="linenos">100</span></a><span class="sd">            - Note: The dictionary keys will be used to identify the failed constraints in the error messages.</span>
+</span><span id="GenericConstraint.__init__-101"><a href="#GenericConstraint.__init__-101"><span class="linenos">101</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="GenericConstraint.__init__-102"><a href="#GenericConstraint.__init__-102"><span class="linenos">102</span></a>        <span class="k">assert</span> <span class="nb">all</span><span class="p">(</span>
+</span><span id="GenericConstraint.__init__-103"><a href="#GenericConstraint.__init__-103"><span class="linenos">103</span></a>            <span class="nb">hasattr</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s2">&quot;__call__&quot;</span><span class="p">)</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">constraints</span><span class="o">.</span><span class="n">values</span><span class="p">()</span>
+</span><span id="GenericConstraint.__init__-104"><a href="#GenericConstraint.__init__-104"><span class="linenos">104</span></a>        <span class="p">),</span> <span class="s2">&quot;All constraints must be functions.&quot;</span>
+</span><span id="GenericConstraint.__init__-105"><a href="#GenericConstraint.__init__-105"><span class="linenos">105</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span> <span class="o">=</span> <span class="n">constraints</span>
+</span></pre></div>
+
+
+            <div class="docstring"><p>Creates a generic constraint object that can be used to validate a value against a set of constraints.</p>
+
+<p>Required Arguments:</p>
+
+<ul>
+<li><code>constraints</code>:
+<ul>
+<li>What: A dictionary of constraint names and their associated functions.</li>
+<li>Type: dict</li>
+<li>Note: All values in the dictionary must be functions that take a single argument and return a boolean.</li>
+<li>Note: The dictionary keys will be used to identify the failed constraints in the error messages.</li>
+</ul></li>
+</ul>
+</div>
+
+
+                            </div>
+                </section>
+                <section id="Constraint">
+                            <input id="Constraint-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
+<div class="attr class">
+            
+    <span class="def">class</span>
+    <span class="name">Constraint</span><wbr>(<span class="base"><a href="#GenericConstraint">GenericConstraint</a></span>):
+
+                <label class="view-source-button" for="Constraint-view-source"><span>View Source</span></label>
+
+    </div>
+    <a class="headerlink" href="#Constraint"></a>
+            <div class="pdoc-code codehilite"><pre><span></span><span id="Constraint-117"><a href="#Constraint-117"><span class="linenos">117</span></a><span class="k">class</span> <span class="nc">Constraint</span><span class="p">(</span><span class="n">GenericConstraint</span><span class="p">):</span>
+</span><span id="Constraint-118"><a href="#Constraint-118"><span class="linenos">118</span></a>    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
+</span><span id="Constraint-119"><a href="#Constraint-119"><span class="linenos">119</span></a>        <span class="bp">self</span><span class="p">,</span>
+</span><span id="Constraint-120"><a href="#Constraint-120"><span class="linenos">120</span></a>        <span class="n">pattern</span><span class="p">:</span> <span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint-121"><a href="#Constraint-121"><span class="linenos">121</span></a>        <span class="n">includes</span><span class="p">:</span> <span class="p">[</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint-122"><a href="#Constraint-122"><span class="linenos">122</span></a>        <span class="n">excludes</span><span class="p">:</span> <span class="p">[</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint-123"><a href="#Constraint-123"><span class="linenos">123</span></a>        <span class="n">gt</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint-124"><a href="#Constraint-124"><span class="linenos">124</span></a>        <span class="n">lt</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint-125"><a href="#Constraint-125"><span class="linenos">125</span></a>        <span class="n">ge</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint-126"><a href="#Constraint-126"><span class="linenos">126</span></a>        <span class="n">le</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint-127"><a href="#Constraint-127"><span class="linenos">127</span></a>        <span class="n">eq</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint-128"><a href="#Constraint-128"><span class="linenos">128</span></a>        <span class="n">ne</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint-129"><a href="#Constraint-129"><span class="linenos">129</span></a>    <span class="p">):</span>
+</span><span id="Constraint-130"><a href="#Constraint-130"><span class="linenos">130</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="Constraint-131"><a href="#Constraint-131"><span class="linenos">131</span></a><span class="sd">        Creates a constraint object that can be used to validate a value against a set of constraints.</span>
+</span><span id="Constraint-132"><a href="#Constraint-132"><span class="linenos">132</span></a>
+</span><span id="Constraint-133"><a href="#Constraint-133"><span class="linenos">133</span></a><span class="sd">        Optional Arguments:</span>
+</span><span id="Constraint-134"><a href="#Constraint-134"><span class="linenos">134</span></a>
+</span><span id="Constraint-135"><a href="#Constraint-135"><span class="linenos">135</span></a><span class="sd">        - `pattern`:</span>
+</span><span id="Constraint-136"><a href="#Constraint-136"><span class="linenos">136</span></a><span class="sd">            - What: A regex pattern that the value must match.</span>
+</span><span id="Constraint-137"><a href="#Constraint-137"><span class="linenos">137</span></a><span class="sd">            - Type: str or None</span>
+</span><span id="Constraint-138"><a href="#Constraint-138"><span class="linenos">138</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint-139"><a href="#Constraint-139"><span class="linenos">139</span></a><span class="sd">        - `includes`:</span>
+</span><span id="Constraint-140"><a href="#Constraint-140"><span class="linenos">140</span></a><span class="sd">            - What: A list of values that the value must be in.</span>
+</span><span id="Constraint-141"><a href="#Constraint-141"><span class="linenos">141</span></a><span class="sd">            - Type: list, tuple, set or None</span>
+</span><span id="Constraint-142"><a href="#Constraint-142"><span class="linenos">142</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint-143"><a href="#Constraint-143"><span class="linenos">143</span></a><span class="sd">        - `excludes`:</span>
+</span><span id="Constraint-144"><a href="#Constraint-144"><span class="linenos">144</span></a><span class="sd">            - What: A list of values that the value must not be in.</span>
+</span><span id="Constraint-145"><a href="#Constraint-145"><span class="linenos">145</span></a><span class="sd">            - Type: list, tuple, set or None</span>
+</span><span id="Constraint-146"><a href="#Constraint-146"><span class="linenos">146</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint-147"><a href="#Constraint-147"><span class="linenos">147</span></a><span class="sd">        - `gt`:</span>
+</span><span id="Constraint-148"><a href="#Constraint-148"><span class="linenos">148</span></a><span class="sd">            - What: The value must be greater than this value.</span>
+</span><span id="Constraint-149"><a href="#Constraint-149"><span class="linenos">149</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint-150"><a href="#Constraint-150"><span class="linenos">150</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint-151"><a href="#Constraint-151"><span class="linenos">151</span></a><span class="sd">        - `lt`:</span>
+</span><span id="Constraint-152"><a href="#Constraint-152"><span class="linenos">152</span></a><span class="sd">            - What: The value must be less than this value.</span>
+</span><span id="Constraint-153"><a href="#Constraint-153"><span class="linenos">153</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint-154"><a href="#Constraint-154"><span class="linenos">154</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint-155"><a href="#Constraint-155"><span class="linenos">155</span></a><span class="sd">        - `ge`:</span>
+</span><span id="Constraint-156"><a href="#Constraint-156"><span class="linenos">156</span></a><span class="sd">            - What: The value must be greater than or equal to this value.</span>
+</span><span id="Constraint-157"><a href="#Constraint-157"><span class="linenos">157</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint-158"><a href="#Constraint-158"><span class="linenos">158</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint-159"><a href="#Constraint-159"><span class="linenos">159</span></a><span class="sd">        - `le`:</span>
+</span><span id="Constraint-160"><a href="#Constraint-160"><span class="linenos">160</span></a><span class="sd">            - What: The value must be less than or equal to this value.</span>
+</span><span id="Constraint-161"><a href="#Constraint-161"><span class="linenos">161</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint-162"><a href="#Constraint-162"><span class="linenos">162</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint-163"><a href="#Constraint-163"><span class="linenos">163</span></a><span class="sd">        - `eq`:</span>
+</span><span id="Constraint-164"><a href="#Constraint-164"><span class="linenos">164</span></a><span class="sd">            - What: The value must be equal to this value.</span>
+</span><span id="Constraint-165"><a href="#Constraint-165"><span class="linenos">165</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint-166"><a href="#Constraint-166"><span class="linenos">166</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint-167"><a href="#Constraint-167"><span class="linenos">167</span></a><span class="sd">        - `ne`:</span>
+</span><span id="Constraint-168"><a href="#Constraint-168"><span class="linenos">168</span></a><span class="sd">            - What: The value must not be equal to this value.</span>
+</span><span id="Constraint-169"><a href="#Constraint-169"><span class="linenos">169</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint-170"><a href="#Constraint-170"><span class="linenos">170</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint-171"><a href="#Constraint-171"><span class="linenos">171</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="Constraint-172"><a href="#Constraint-172"><span class="linenos">172</span></a>        <span class="k">assert</span> <span class="nb">any</span><span class="p">(</span>
+</span><span id="Constraint-173"><a href="#Constraint-173"><span class="linenos">173</span></a>            <span class="n">v</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
+</span><span id="Constraint-174"><a href="#Constraint-174"><span class="linenos">174</span></a>            <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="p">[</span><span class="n">pattern</span><span class="p">,</span> <span class="n">gt</span><span class="p">,</span> <span class="n">lt</span><span class="p">,</span> <span class="n">ge</span><span class="p">,</span> <span class="n">le</span><span class="p">,</span> <span class="n">eq</span><span class="p">,</span> <span class="n">ne</span><span class="p">,</span> <span class="n">includes</span><span class="p">,</span> <span class="n">excludes</span><span class="p">]</span>
+</span><span id="Constraint-175"><a href="#Constraint-175"><span class="linenos">175</span></a>        <span class="p">),</span> <span class="s2">&quot;At least one constraint must be provided.&quot;</span>
+</span><span id="Constraint-176"><a href="#Constraint-176"><span class="linenos">176</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-177"><a href="#Constraint-177"><span class="linenos">177</span></a>            <span class="n">includes</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint-178"><a href="#Constraint-178"><span class="linenos">178</span></a>        <span class="p">),</span> <span class="s2">&quot;Includes must be a list, tuple, set or None.&quot;</span>
+</span><span id="Constraint-179"><a href="#Constraint-179"><span class="linenos">179</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-180"><a href="#Constraint-180"><span class="linenos">180</span></a>            <span class="n">excludes</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint-181"><a href="#Constraint-181"><span class="linenos">181</span></a>        <span class="p">),</span> <span class="s2">&quot;Excludes must be a list, tuple, set or None.&quot;</span>
+</span><span id="Constraint-182"><a href="#Constraint-182"><span class="linenos">182</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-183"><a href="#Constraint-183"><span class="linenos">183</span></a>            <span class="n">pattern</span><span class="p">,</span> <span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint-184"><a href="#Constraint-184"><span class="linenos">184</span></a>        <span class="p">),</span> <span class="s2">&quot;Pattern must be a string or None.&quot;</span>
+</span><span id="Constraint-185"><a href="#Constraint-185"><span class="linenos">185</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-186"><a href="#Constraint-186"><span class="linenos">186</span></a>            <span class="n">gt</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint-187"><a href="#Constraint-187"><span class="linenos">187</span></a>        <span class="p">),</span> <span class="s2">&quot;Greater than constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint-188"><a href="#Constraint-188"><span class="linenos">188</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-189"><a href="#Constraint-189"><span class="linenos">189</span></a>            <span class="n">lt</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint-190"><a href="#Constraint-190"><span class="linenos">190</span></a>        <span class="p">),</span> <span class="s2">&quot;Less than constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint-191"><a href="#Constraint-191"><span class="linenos">191</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-192"><a href="#Constraint-192"><span class="linenos">192</span></a>            <span class="n">ge</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint-193"><a href="#Constraint-193"><span class="linenos">193</span></a>        <span class="p">),</span> <span class="s2">&quot;Greater or equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint-194"><a href="#Constraint-194"><span class="linenos">194</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-195"><a href="#Constraint-195"><span class="linenos">195</span></a>            <span class="n">le</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint-196"><a href="#Constraint-196"><span class="linenos">196</span></a>        <span class="p">),</span> <span class="s2">&quot;Less than or equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint-197"><a href="#Constraint-197"><span class="linenos">197</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-198"><a href="#Constraint-198"><span class="linenos">198</span></a>            <span class="n">eq</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint-199"><a href="#Constraint-199"><span class="linenos">199</span></a>        <span class="p">),</span> <span class="s2">&quot;Equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint-200"><a href="#Constraint-200"><span class="linenos">200</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-201"><a href="#Constraint-201"><span class="linenos">201</span></a>            <span class="n">ne</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint-202"><a href="#Constraint-202"><span class="linenos">202</span></a>        <span class="p">),</span> <span class="s2">&quot;Not equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint-203"><a href="#Constraint-203"><span class="linenos">203</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span> <span class="o">=</span> <span class="p">{}</span>
+</span><span id="Constraint-204"><a href="#Constraint-204"><span class="linenos">204</span></a>        <span class="k">if</span> <span class="n">pattern</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint-205"><a href="#Constraint-205"><span class="linenos">205</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="s2">&quot;be a string&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint-206"><a href="#Constraint-206"><span class="linenos">206</span></a>                <span class="n">x</span><span class="p">,</span> <span class="nb">str</span>
+</span><span id="Constraint-207"><a href="#Constraint-207"><span class="linenos">207</span></a>            <span class="p">)</span>
+</span><span id="Constraint-208"><a href="#Constraint-208"><span class="linenos">208</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="s2">&quot;Regex Pattern Match&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">bool</span><span class="p">(</span>
+</span><span id="Constraint-209"><a href="#Constraint-209"><span class="linenos">209</span></a>                <span class="n">re</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="n">pattern</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>
+</span><span id="Constraint-210"><a href="#Constraint-210"><span class="linenos">210</span></a>            <span class="p">)</span>
+</span><span id="Constraint-211"><a href="#Constraint-211"><span class="linenos">211</span></a>        <span class="k">if</span> <span class="n">includes</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint-212"><a href="#Constraint-212"><span class="linenos">212</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Includes&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">includes</span>
+</span><span id="Constraint-213"><a href="#Constraint-213"><span class="linenos">213</span></a>        <span class="k">if</span> <span class="n">excludes</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint-214"><a href="#Constraint-214"><span class="linenos">214</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="s2">&quot;Excludes&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">excludes</span>
+</span><span id="Constraint-215"><a href="#Constraint-215"><span class="linenos">215</span></a>        <span class="k">if</span> <span class="n">gt</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint-216"><a href="#Constraint-216"><span class="linenos">216</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Greater Than (</span><span class="si">{</span><span class="n">gt</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Constraint-217"><a href="#Constraint-217"><span class="linenos">217</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&gt;</span> <span class="n">gt</span>
+</span><span id="Constraint-218"><a href="#Constraint-218"><span class="linenos">218</span></a>            <span class="p">)</span>
+</span><span id="Constraint-219"><a href="#Constraint-219"><span class="linenos">219</span></a>        <span class="k">if</span> <span class="n">lt</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint-220"><a href="#Constraint-220"><span class="linenos">220</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Less Than (</span><span class="si">{</span><span class="n">lt</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&lt;</span> <span class="n">lt</span>
+</span><span id="Constraint-221"><a href="#Constraint-221"><span class="linenos">221</span></a>        <span class="k">if</span> <span class="n">ge</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint-222"><a href="#Constraint-222"><span class="linenos">222</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Greater Than Or Equal To (</span><span class="si">{</span><span class="n">ge</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Constraint-223"><a href="#Constraint-223"><span class="linenos">223</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&gt;=</span> <span class="n">ge</span>
+</span><span id="Constraint-224"><a href="#Constraint-224"><span class="linenos">224</span></a>            <span class="p">)</span>
+</span><span id="Constraint-225"><a href="#Constraint-225"><span class="linenos">225</span></a>        <span class="k">if</span> <span class="n">le</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint-226"><a href="#Constraint-226"><span class="linenos">226</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Less Than Or Equal To (</span><span class="si">{</span><span class="n">le</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Constraint-227"><a href="#Constraint-227"><span class="linenos">227</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&lt;=</span> <span class="n">le</span>
+</span><span id="Constraint-228"><a href="#Constraint-228"><span class="linenos">228</span></a>            <span class="p">)</span>
+</span><span id="Constraint-229"><a href="#Constraint-229"><span class="linenos">229</span></a>        <span class="k">if</span> <span class="n">eq</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint-230"><a href="#Constraint-230"><span class="linenos">230</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Equal To (</span><span class="si">{</span><span class="n">eq</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">==</span> <span class="n">eq</span>
+</span><span id="Constraint-231"><a href="#Constraint-231"><span class="linenos">231</span></a>        <span class="k">if</span> <span class="n">ne</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint-232"><a href="#Constraint-232"><span class="linenos">232</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Not Equal To (</span><span class="si">{</span><span class="n">ne</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Constraint-233"><a href="#Constraint-233"><span class="linenos">233</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">!=</span> <span class="n">ne</span>
+</span><span id="Constraint-234"><a href="#Constraint-234"><span class="linenos">234</span></a>            <span class="p">)</span>
+</span></pre></div>
+
+
+    
+
+                            <div id="Constraint.__init__" class="classattr">
+                                        <input id="Constraint.__init__-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
+<div class="attr function">
+            
+        <span class="name">Constraint</span><span class="signature pdoc-code multiline">(<span class="param">	pattern: [&lt;class &#x27;str&#x27;&gt;, None] = None,</span><span class="param">	includes: [&lt;class &#x27;list&#x27;&gt;, &lt;class &#x27;tuple&#x27;&gt;, &lt;class &#x27;set&#x27;&gt;, None] = None,</span><span class="param">	excludes: [&lt;class &#x27;list&#x27;&gt;, &lt;class &#x27;tuple&#x27;&gt;, &lt;class &#x27;set&#x27;&gt;, None] = None,</span><span class="param">	gt: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class="param">	lt: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class="param">	ge: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class="param">	le: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class="param">	eq: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None,</span><span class="param">	ne: [&lt;class &#x27;float&#x27;&gt;, &lt;class &#x27;int&#x27;&gt;, None] = None</span>)</span>
+
+                <label class="view-source-button" for="Constraint.__init__-view-source"><span>View Source</span></label>
+
+    </div>
+    <a class="headerlink" href="#Constraint.__init__"></a>
+            <div class="pdoc-code codehilite"><pre><span></span><span id="Constraint.__init__-118"><a href="#Constraint.__init__-118"><span class="linenos">118</span></a>    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
+</span><span id="Constraint.__init__-119"><a href="#Constraint.__init__-119"><span class="linenos">119</span></a>        <span class="bp">self</span><span class="p">,</span>
+</span><span id="Constraint.__init__-120"><a href="#Constraint.__init__-120"><span class="linenos">120</span></a>        <span class="n">pattern</span><span class="p">:</span> <span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint.__init__-121"><a href="#Constraint.__init__-121"><span class="linenos">121</span></a>        <span class="n">includes</span><span class="p">:</span> <span class="p">[</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint.__init__-122"><a href="#Constraint.__init__-122"><span class="linenos">122</span></a>        <span class="n">excludes</span><span class="p">:</span> <span class="p">[</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint.__init__-123"><a href="#Constraint.__init__-123"><span class="linenos">123</span></a>        <span class="n">gt</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint.__init__-124"><a href="#Constraint.__init__-124"><span class="linenos">124</span></a>        <span class="n">lt</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint.__init__-125"><a href="#Constraint.__init__-125"><span class="linenos">125</span></a>        <span class="n">ge</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint.__init__-126"><a href="#Constraint.__init__-126"><span class="linenos">126</span></a>        <span class="n">le</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint.__init__-127"><a href="#Constraint.__init__-127"><span class="linenos">127</span></a>        <span class="n">eq</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint.__init__-128"><a href="#Constraint.__init__-128"><span class="linenos">128</span></a>        <span class="n">ne</span><span class="p">:</span> <span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
+</span><span id="Constraint.__init__-129"><a href="#Constraint.__init__-129"><span class="linenos">129</span></a>    <span class="p">):</span>
+</span><span id="Constraint.__init__-130"><a href="#Constraint.__init__-130"><span class="linenos">130</span></a><span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
+</span><span id="Constraint.__init__-131"><a href="#Constraint.__init__-131"><span class="linenos">131</span></a><span class="sd">        Creates a constraint object that can be used to validate a value against a set of constraints.</span>
+</span><span id="Constraint.__init__-132"><a href="#Constraint.__init__-132"><span class="linenos">132</span></a>
+</span><span id="Constraint.__init__-133"><a href="#Constraint.__init__-133"><span class="linenos">133</span></a><span class="sd">        Optional Arguments:</span>
+</span><span id="Constraint.__init__-134"><a href="#Constraint.__init__-134"><span class="linenos">134</span></a>
+</span><span id="Constraint.__init__-135"><a href="#Constraint.__init__-135"><span class="linenos">135</span></a><span class="sd">        - `pattern`:</span>
+</span><span id="Constraint.__init__-136"><a href="#Constraint.__init__-136"><span class="linenos">136</span></a><span class="sd">            - What: A regex pattern that the value must match.</span>
+</span><span id="Constraint.__init__-137"><a href="#Constraint.__init__-137"><span class="linenos">137</span></a><span class="sd">            - Type: str or None</span>
+</span><span id="Constraint.__init__-138"><a href="#Constraint.__init__-138"><span class="linenos">138</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint.__init__-139"><a href="#Constraint.__init__-139"><span class="linenos">139</span></a><span class="sd">        - `includes`:</span>
+</span><span id="Constraint.__init__-140"><a href="#Constraint.__init__-140"><span class="linenos">140</span></a><span class="sd">            - What: A list of values that the value must be in.</span>
+</span><span id="Constraint.__init__-141"><a href="#Constraint.__init__-141"><span class="linenos">141</span></a><span class="sd">            - Type: list, tuple, set or None</span>
+</span><span id="Constraint.__init__-142"><a href="#Constraint.__init__-142"><span class="linenos">142</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint.__init__-143"><a href="#Constraint.__init__-143"><span class="linenos">143</span></a><span class="sd">        - `excludes`:</span>
+</span><span id="Constraint.__init__-144"><a href="#Constraint.__init__-144"><span class="linenos">144</span></a><span class="sd">            - What: A list of values that the value must not be in.</span>
+</span><span id="Constraint.__init__-145"><a href="#Constraint.__init__-145"><span class="linenos">145</span></a><span class="sd">            - Type: list, tuple, set or None</span>
+</span><span id="Constraint.__init__-146"><a href="#Constraint.__init__-146"><span class="linenos">146</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint.__init__-147"><a href="#Constraint.__init__-147"><span class="linenos">147</span></a><span class="sd">        - `gt`:</span>
+</span><span id="Constraint.__init__-148"><a href="#Constraint.__init__-148"><span class="linenos">148</span></a><span class="sd">            - What: The value must be greater than this value.</span>
+</span><span id="Constraint.__init__-149"><a href="#Constraint.__init__-149"><span class="linenos">149</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint.__init__-150"><a href="#Constraint.__init__-150"><span class="linenos">150</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint.__init__-151"><a href="#Constraint.__init__-151"><span class="linenos">151</span></a><span class="sd">        - `lt`:</span>
+</span><span id="Constraint.__init__-152"><a href="#Constraint.__init__-152"><span class="linenos">152</span></a><span class="sd">            - What: The value must be less than this value.</span>
+</span><span id="Constraint.__init__-153"><a href="#Constraint.__init__-153"><span class="linenos">153</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint.__init__-154"><a href="#Constraint.__init__-154"><span class="linenos">154</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint.__init__-155"><a href="#Constraint.__init__-155"><span class="linenos">155</span></a><span class="sd">        - `ge`:</span>
+</span><span id="Constraint.__init__-156"><a href="#Constraint.__init__-156"><span class="linenos">156</span></a><span class="sd">            - What: The value must be greater than or equal to this value.</span>
+</span><span id="Constraint.__init__-157"><a href="#Constraint.__init__-157"><span class="linenos">157</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint.__init__-158"><a href="#Constraint.__init__-158"><span class="linenos">158</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint.__init__-159"><a href="#Constraint.__init__-159"><span class="linenos">159</span></a><span class="sd">        - `le`:</span>
+</span><span id="Constraint.__init__-160"><a href="#Constraint.__init__-160"><span class="linenos">160</span></a><span class="sd">            - What: The value must be less than or equal to this value.</span>
+</span><span id="Constraint.__init__-161"><a href="#Constraint.__init__-161"><span class="linenos">161</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint.__init__-162"><a href="#Constraint.__init__-162"><span class="linenos">162</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint.__init__-163"><a href="#Constraint.__init__-163"><span class="linenos">163</span></a><span class="sd">        - `eq`:</span>
+</span><span id="Constraint.__init__-164"><a href="#Constraint.__init__-164"><span class="linenos">164</span></a><span class="sd">            - What: The value must be equal to this value.</span>
+</span><span id="Constraint.__init__-165"><a href="#Constraint.__init__-165"><span class="linenos">165</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint.__init__-166"><a href="#Constraint.__init__-166"><span class="linenos">166</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint.__init__-167"><a href="#Constraint.__init__-167"><span class="linenos">167</span></a><span class="sd">        - `ne`:</span>
+</span><span id="Constraint.__init__-168"><a href="#Constraint.__init__-168"><span class="linenos">168</span></a><span class="sd">            - What: The value must not be equal to this value.</span>
+</span><span id="Constraint.__init__-169"><a href="#Constraint.__init__-169"><span class="linenos">169</span></a><span class="sd">            - Type: float, int or None</span>
+</span><span id="Constraint.__init__-170"><a href="#Constraint.__init__-170"><span class="linenos">170</span></a><span class="sd">            - Default: None</span>
+</span><span id="Constraint.__init__-171"><a href="#Constraint.__init__-171"><span class="linenos">171</span></a><span class="sd">        &quot;&quot;&quot;</span>
+</span><span id="Constraint.__init__-172"><a href="#Constraint.__init__-172"><span class="linenos">172</span></a>        <span class="k">assert</span> <span class="nb">any</span><span class="p">(</span>
+</span><span id="Constraint.__init__-173"><a href="#Constraint.__init__-173"><span class="linenos">173</span></a>            <span class="n">v</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
+</span><span id="Constraint.__init__-174"><a href="#Constraint.__init__-174"><span class="linenos">174</span></a>            <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="p">[</span><span class="n">pattern</span><span class="p">,</span> <span class="n">gt</span><span class="p">,</span> <span class="n">lt</span><span class="p">,</span> <span class="n">ge</span><span class="p">,</span> <span class="n">le</span><span class="p">,</span> <span class="n">eq</span><span class="p">,</span> <span class="n">ne</span><span class="p">,</span> <span class="n">includes</span><span class="p">,</span> <span class="n">excludes</span><span class="p">]</span>
+</span><span id="Constraint.__init__-175"><a href="#Constraint.__init__-175"><span class="linenos">175</span></a>        <span class="p">),</span> <span class="s2">&quot;At least one constraint must be provided.&quot;</span>
+</span><span id="Constraint.__init__-176"><a href="#Constraint.__init__-176"><span class="linenos">176</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-177"><a href="#Constraint.__init__-177"><span class="linenos">177</span></a>            <span class="n">includes</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint.__init__-178"><a href="#Constraint.__init__-178"><span class="linenos">178</span></a>        <span class="p">),</span> <span class="s2">&quot;Includes must be a list, tuple, set or None.&quot;</span>
+</span><span id="Constraint.__init__-179"><a href="#Constraint.__init__-179"><span class="linenos">179</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-180"><a href="#Constraint.__init__-180"><span class="linenos">180</span></a>            <span class="n">excludes</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">,</span> <span class="nb">set</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint.__init__-181"><a href="#Constraint.__init__-181"><span class="linenos">181</span></a>        <span class="p">),</span> <span class="s2">&quot;Excludes must be a list, tuple, set or None.&quot;</span>
+</span><span id="Constraint.__init__-182"><a href="#Constraint.__init__-182"><span class="linenos">182</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-183"><a href="#Constraint.__init__-183"><span class="linenos">183</span></a>            <span class="n">pattern</span><span class="p">,</span> <span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint.__init__-184"><a href="#Constraint.__init__-184"><span class="linenos">184</span></a>        <span class="p">),</span> <span class="s2">&quot;Pattern must be a string or None.&quot;</span>
+</span><span id="Constraint.__init__-185"><a href="#Constraint.__init__-185"><span class="linenos">185</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-186"><a href="#Constraint.__init__-186"><span class="linenos">186</span></a>            <span class="n">gt</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint.__init__-187"><a href="#Constraint.__init__-187"><span class="linenos">187</span></a>        <span class="p">),</span> <span class="s2">&quot;Greater than constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint.__init__-188"><a href="#Constraint.__init__-188"><span class="linenos">188</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-189"><a href="#Constraint.__init__-189"><span class="linenos">189</span></a>            <span class="n">lt</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint.__init__-190"><a href="#Constraint.__init__-190"><span class="linenos">190</span></a>        <span class="p">),</span> <span class="s2">&quot;Less than constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint.__init__-191"><a href="#Constraint.__init__-191"><span class="linenos">191</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-192"><a href="#Constraint.__init__-192"><span class="linenos">192</span></a>            <span class="n">ge</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint.__init__-193"><a href="#Constraint.__init__-193"><span class="linenos">193</span></a>        <span class="p">),</span> <span class="s2">&quot;Greater or equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint.__init__-194"><a href="#Constraint.__init__-194"><span class="linenos">194</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-195"><a href="#Constraint.__init__-195"><span class="linenos">195</span></a>            <span class="n">le</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint.__init__-196"><a href="#Constraint.__init__-196"><span class="linenos">196</span></a>        <span class="p">),</span> <span class="s2">&quot;Less than or equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint.__init__-197"><a href="#Constraint.__init__-197"><span class="linenos">197</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-198"><a href="#Constraint.__init__-198"><span class="linenos">198</span></a>            <span class="n">eq</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint.__init__-199"><a href="#Constraint.__init__-199"><span class="linenos">199</span></a>        <span class="p">),</span> <span class="s2">&quot;Equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint.__init__-200"><a href="#Constraint.__init__-200"><span class="linenos">200</span></a>        <span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-201"><a href="#Constraint.__init__-201"><span class="linenos">201</span></a>            <span class="n">ne</span><span class="p">,</span> <span class="p">(</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">))</span>
+</span><span id="Constraint.__init__-202"><a href="#Constraint.__init__-202"><span class="linenos">202</span></a>        <span class="p">),</span> <span class="s2">&quot;Not equal to constraint must be a float, int or None.&quot;</span>
+</span><span id="Constraint.__init__-203"><a href="#Constraint.__init__-203"><span class="linenos">203</span></a>        <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span> <span class="o">=</span> <span class="p">{}</span>
+</span><span id="Constraint.__init__-204"><a href="#Constraint.__init__-204"><span class="linenos">204</span></a>        <span class="k">if</span> <span class="n">pattern</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint.__init__-205"><a href="#Constraint.__init__-205"><span class="linenos">205</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="s2">&quot;be a string&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">isinstance</span><span class="p">(</span>
+</span><span id="Constraint.__init__-206"><a href="#Constraint.__init__-206"><span class="linenos">206</span></a>                <span class="n">x</span><span class="p">,</span> <span class="nb">str</span>
+</span><span id="Constraint.__init__-207"><a href="#Constraint.__init__-207"><span class="linenos">207</span></a>            <span class="p">)</span>
+</span><span id="Constraint.__init__-208"><a href="#Constraint.__init__-208"><span class="linenos">208</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="s2">&quot;Regex Pattern Match&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">bool</span><span class="p">(</span>
+</span><span id="Constraint.__init__-209"><a href="#Constraint.__init__-209"><span class="linenos">209</span></a>                <span class="n">re</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="n">pattern</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>
+</span><span id="Constraint.__init__-210"><a href="#Constraint.__init__-210"><span class="linenos">210</span></a>            <span class="p">)</span>
+</span><span id="Constraint.__init__-211"><a href="#Constraint.__init__-211"><span class="linenos">211</span></a>        <span class="k">if</span> <span class="n">includes</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint.__init__-212"><a href="#Constraint.__init__-212"><span class="linenos">212</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Includes&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">includes</span>
+</span><span id="Constraint.__init__-213"><a href="#Constraint.__init__-213"><span class="linenos">213</span></a>        <span class="k">if</span> <span class="n">excludes</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint.__init__-214"><a href="#Constraint.__init__-214"><span class="linenos">214</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="s2">&quot;Excludes&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">excludes</span>
+</span><span id="Constraint.__init__-215"><a href="#Constraint.__init__-215"><span class="linenos">215</span></a>        <span class="k">if</span> <span class="n">gt</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint.__init__-216"><a href="#Constraint.__init__-216"><span class="linenos">216</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Greater Than (</span><span class="si">{</span><span class="n">gt</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Constraint.__init__-217"><a href="#Constraint.__init__-217"><span class="linenos">217</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&gt;</span> <span class="n">gt</span>
+</span><span id="Constraint.__init__-218"><a href="#Constraint.__init__-218"><span class="linenos">218</span></a>            <span class="p">)</span>
+</span><span id="Constraint.__init__-219"><a href="#Constraint.__init__-219"><span class="linenos">219</span></a>        <span class="k">if</span> <span class="n">lt</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint.__init__-220"><a href="#Constraint.__init__-220"><span class="linenos">220</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Less Than (</span><span class="si">{</span><span class="n">lt</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&lt;</span> <span class="n">lt</span>
+</span><span id="Constraint.__init__-221"><a href="#Constraint.__init__-221"><span class="linenos">221</span></a>        <span class="k">if</span> <span class="n">ge</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint.__init__-222"><a href="#Constraint.__init__-222"><span class="linenos">222</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Greater Than Or Equal To (</span><span class="si">{</span><span class="n">ge</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Constraint.__init__-223"><a href="#Constraint.__init__-223"><span class="linenos">223</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&gt;=</span> <span class="n">ge</span>
+</span><span id="Constraint.__init__-224"><a href="#Constraint.__init__-224"><span class="linenos">224</span></a>            <span class="p">)</span>
+</span><span id="Constraint.__init__-225"><a href="#Constraint.__init__-225"><span class="linenos">225</span></a>        <span class="k">if</span> <span class="n">le</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint.__init__-226"><a href="#Constraint.__init__-226"><span class="linenos">226</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Less Than Or Equal To (</span><span class="si">{</span><span class="n">le</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Constraint.__init__-227"><a href="#Constraint.__init__-227"><span class="linenos">227</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">&lt;=</span> <span class="n">le</span>
+</span><span id="Constraint.__init__-228"><a href="#Constraint.__init__-228"><span class="linenos">228</span></a>            <span class="p">)</span>
+</span><span id="Constraint.__init__-229"><a href="#Constraint.__init__-229"><span class="linenos">229</span></a>        <span class="k">if</span> <span class="n">eq</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint.__init__-230"><a href="#Constraint.__init__-230"><span class="linenos">230</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Equal To (</span><span class="si">{</span><span class="n">eq</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">==</span> <span class="n">eq</span>
+</span><span id="Constraint.__init__-231"><a href="#Constraint.__init__-231"><span class="linenos">231</span></a>        <span class="k">if</span> <span class="n">ne</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
+</span><span id="Constraint.__init__-232"><a href="#Constraint.__init__-232"><span class="linenos">232</span></a>            <span class="bp">self</span><span class="o">.</span><span class="n">__constraint_checks__</span><span class="p">[</span><span class="sa">f</span><span class="s2">&quot;Not Equal To (</span><span class="si">{</span><span class="n">ne</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
+</span><span id="Constraint.__init__-233"><a href="#Constraint.__init__-233"><span class="linenos">233</span></a>                <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">!=</span> <span class="n">ne</span>
+</span><span id="Constraint.__init__-234"><a href="#Constraint.__init__-234"><span class="linenos">234</span></a>            <span class="p">)</span>
+</span></pre></div>
+
+
+            <div class="docstring"><p>Creates a constraint object that can be used to validate a value against a set of constraints.</p>
+
+<p>Optional Arguments:</p>
+
+<ul>
+<li><code>pattern</code>:
+<ul>
+<li>What: A regex pattern that the value must match.</li>
+<li>Type: str or None</li>
+<li>Default: None</li>
+</ul></li>
+<li><code>includes</code>:
+<ul>
+<li>What: A list of values that the value must be in.</li>
+<li>Type: list, tuple, set or None</li>
+<li>Default: None</li>
+</ul></li>
+<li><code>excludes</code>:
+<ul>
+<li>What: A list of values that the value must not be in.</li>
+<li>Type: list, tuple, set or None</li>
+<li>Default: None</li>
+</ul></li>
+<li><code>gt</code>:
+<ul>
+<li>What: The value must be greater than this value.</li>
+<li>Type: float, int or None</li>
+<li>Default: None</li>
+</ul></li>
+<li><code>lt</code>:
+<ul>
+<li>What: The value must be less than this value.</li>
+<li>Type: float, int or None</li>
+<li>Default: None</li>
+</ul></li>
+<li><code>ge</code>:
+<ul>
+<li>What: The value must be greater than or equal to this value.</li>
+<li>Type: float, int or None</li>
+<li>Default: None</li>
+</ul></li>
+<li><code>le</code>:
+<ul>
+<li>What: The value must be less than or equal to this value.</li>
+<li>Type: float, int or None</li>
+<li>Default: None</li>
+</ul></li>
+<li><code>eq</code>:
+<ul>
+<li>What: The value must be equal to this value.</li>
+<li>Type: float, int or None</li>
+<li>Default: None</li>
+</ul></li>
+<li><code>ne</code>:
+<ul>
+<li>What: The value must not be equal to this value.</li>
+<li>Type: float, int or None</li>
+<li>Default: None</li>
+</ul></li>
+</ul>
+</div>
+
+
                             </div>
                 </section>
     </main>
diff --git a/pyproject.toml b/pyproject.toml
index ab8c737..23195f6 100755
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
 
 [project]
 name = "type_enforced"
-version = "1.4.0"
+version = "1.5.0"
 description = "A pure python type enforcer for python type annotations"
 authors = [
     {name="Connor Makowski", email="conmak@mit.edu"}
diff --git a/setup.cfg b/setup.cfg
index 8ae3d3f..45d9576 100755
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = type_enfoced
-version = 1.4.0
+version = 1.5.0
 description_file = README.md
 
 [options]
diff --git a/type_enforced/enforcer.py b/type_enforced/enforcer.py
index 7ef61ca..0275128 100755
--- a/type_enforced/enforcer.py
+++ b/type_enforced/enforcer.py
@@ -8,7 +8,7 @@
 )
 from typing import Type, Union, Sized, Literal, Callable
 from functools import update_wrapper, wraps
-from type_enforced.utils import Partial
+from type_enforced.utils import Partial, GenericConstraint
 
 # Python 3.10+ has a UnionType object that is used to represent Union types
 try:
@@ -73,7 +73,7 @@ def __get_checkable_type__(self, item_annotation):
         """
         Gets the checkable type as a nested dict for a passed annotation.
         """
-        valid_types = {}
+        valid_types = {"__extra__": {}}
         if not isinstance(item_annotation, (list, tuple)):
             item_annotation = [item_annotation]
         for valid_type in item_annotation:
@@ -99,10 +99,9 @@ def __get_checkable_type__(self, item_annotation):
                 # Note: These will be handled separately in the self.__check_type__
                 # as the object is validated and not its type.
                 elif valid_type.__origin__ == Literal:
-                    valid_types = {
-                        Literal: {i: None for i in valid_type.__args__}
-                    }
-
+                    valid_types["__extra__"][
+                        "__literal__"
+                    ] = valid_type.__args__
                 # Handle Sized objects
                 elif valid_type == Sized:
                     valid_types = {
@@ -137,6 +136,11 @@ def __get_checkable_type__(self, item_annotation):
                 valid_types.update(
                     self.__get_checkable_type__(valid_type.__args__)
                 )
+            # Handle Constraints
+            # Note: These will be handled separately in the self.__check_type__
+            # as the object is validated differently than a type.
+            elif isinstance(valid_type, GenericConstraint):
+                valid_types["__extra__"]["__constraint__"] = valid_type
             else:
                 valid_types[valid_type] = None
         return valid_types
@@ -211,22 +215,14 @@ def __check_type__(self, obj, acceptable_types, key):
             passed_type = Type[obj]
         else:
             passed_type = type(obj)
-        if passed_type not in acceptable_types:
-            # Add special string to store any string to add before acceptable types
-            # in any exception message
-            pre_acceptable_types_str = ""
-            # Special check for Literals
-            if Literal in acceptable_types:
-                if obj in acceptable_types[Literal]:
-                    return
-                else:
-                    pre_acceptable_types_str = "Literal"
-                    acceptable_types = acceptable_types[Literal]
-                    passed_type = obj
-            # Raise the exception
-            self.__exception__(
-                f"Type mismatch for typed variable `{key}`. Expected one of the following `{pre_acceptable_types_str}{str(list(acceptable_types.keys()))}` but got `{passed_type}` instead."
-            )
+        acceptable_types = dict(acceptable_types)
+        extra_types = acceptable_types.pop("__extra__")
+        if acceptable_types != {}:
+            if passed_type not in acceptable_types:
+                # Raise the exception
+                self.__exception__(
+                    f"Type mismatch for typed variable `{key}`. Expected one of the following `{str(list(acceptable_types.keys()))}` but got `{passed_type}` instead."
+                )
         sub_type = acceptable_types.get(passed_type)
         if sub_type is not None:
             if passed_type == dict:
@@ -235,6 +231,21 @@ def __check_type__(self, obj, acceptable_types, key):
             else:
                 for sub_key, value in enumerate(obj):
                     self.__check_type__(value, sub_type, f"{key}[{sub_key}]")
+        # Special check for Literal types
+        literal_options = extra_types.get("__literal__")
+        if literal_options is not None:
+            if obj not in literal_options:
+                self.__exception__(
+                    f"Literal validation error for variable `{key}`. Expected one of the following `{str(list(literal_options))}` but got `{obj}` instead."
+                )
+        # Special check for Constraints
+        constraint = extra_types.get("__constraint__")
+        if constraint is not None:
+            constraint_validation_output = constraint.__validate__(key, obj)
+            if constraint_validation_output is not True:
+                self.__exception__(
+                    f"Constraint validation error for variable `{key}`. {constraint_validation_output}"
+                )
 
     def __repr__(self):
         return f"<type_enforced {self.__fn__.__module__}.{self.__fn__.__qualname__} object at {hex(id(self))}>"
diff --git a/type_enforced/utils.py b/type_enforced/utils.py
index a3e677e..b0d1bd4 100644
--- a/type_enforced/utils.py
+++ b/type_enforced/utils.py
@@ -1,4 +1,4 @@
-import types
+import types, re
 from functools import update_wrapper
 
 
@@ -83,3 +83,151 @@ def __getFnArity__(self):
             1 if isinstance(self.__fn__, (types.MethodType)) else 0
         )
         return self.__fn__.__code__.co_argcount - extra_method_input_count
+
+
+class GenericConstraint:
+    def __init__(self, constraints: dict):
+        """
+        Creates a generic constraint object that can be used to validate a value against a set of constraints.
+
+        Required Arguments:
+
+        - `constraints`:
+            - What: A dictionary of constraint names and their associated functions.
+            - Type: dict
+            - Note: All values in the dictionary must be functions that take a single argument and return a boolean.
+            - Note: The dictionary keys will be used to identify the failed constraints in the error messages.
+        """
+        assert all(
+            hasattr(v, "__call__") for v in constraints.values()
+        ), "All constraints must be functions."
+        self.__constraint_checks__ = constraints
+
+    def __validate__(self, varname, value):
+        for check_name, check_func in self.__constraint_checks__.items():
+            try:
+                if not check_func(value):
+                    return f"Constraint `{check_name}` not met with the provided value `{value}`"
+            except Exception as e:
+                return f"An exception was raised when checking the constraint `{check_name}` with the provided value `{value}`. Error: {e}"
+        return True
+
+
+class Constraint(GenericConstraint):
+    def __init__(
+        self,
+        pattern: [str, None] = None,
+        includes: [list, tuple, set, None] = None,
+        excludes: [list, tuple, set, None] = None,
+        gt: [float, int, None] = None,
+        lt: [float, int, None] = None,
+        ge: [float, int, None] = None,
+        le: [float, int, None] = None,
+        eq: [float, int, None] = None,
+        ne: [float, int, None] = None,
+    ):
+        """
+        Creates a constraint object that can be used to validate a value against a set of constraints.
+
+        Optional Arguments:
+
+        - `pattern`:
+            - What: A regex pattern that the value must match.
+            - Type: str or None
+            - Default: None
+        - `includes`:
+            - What: A list of values that the value must be in.
+            - Type: list, tuple, set or None
+            - Default: None
+        - `excludes`:
+            - What: A list of values that the value must not be in.
+            - Type: list, tuple, set or None
+            - Default: None
+        - `gt`:
+            - What: The value must be greater than this value.
+            - Type: float, int or None
+            - Default: None
+        - `lt`:
+            - What: The value must be less than this value.
+            - Type: float, int or None
+            - Default: None
+        - `ge`:
+            - What: The value must be greater than or equal to this value.
+            - Type: float, int or None
+            - Default: None
+        - `le`:
+            - What: The value must be less than or equal to this value.
+            - Type: float, int or None
+            - Default: None
+        - `eq`:
+            - What: The value must be equal to this value.
+            - Type: float, int or None
+            - Default: None
+        - `ne`:
+            - What: The value must not be equal to this value.
+            - Type: float, int or None
+            - Default: None
+        """
+        assert any(
+            v is not None
+            for v in [pattern, gt, lt, ge, le, eq, ne, includes, excludes]
+        ), "At least one constraint must be provided."
+        assert isinstance(
+            includes, (list, tuple, set, type(None))
+        ), "Includes must be a list, tuple, set or None."
+        assert isinstance(
+            excludes, (list, tuple, set, type(None))
+        ), "Excludes must be a list, tuple, set or None."
+        assert isinstance(
+            pattern, (str, type(None))
+        ), "Pattern must be a string or None."
+        assert isinstance(
+            gt, (float, int, type(None))
+        ), "Greater than constraint must be a float, int or None."
+        assert isinstance(
+            lt, (float, int, type(None))
+        ), "Less than constraint must be a float, int or None."
+        assert isinstance(
+            ge, (float, int, type(None))
+        ), "Greater or equal to constraint must be a float, int or None."
+        assert isinstance(
+            le, (float, int, type(None))
+        ), "Less than or equal to constraint must be a float, int or None."
+        assert isinstance(
+            eq, (float, int, type(None))
+        ), "Equal to constraint must be a float, int or None."
+        assert isinstance(
+            ne, (float, int, type(None))
+        ), "Not equal to constraint must be a float, int or None."
+        self.__constraint_checks__ = {}
+        if pattern is not None:
+            self.__constraint_checks__["be a string"] = lambda x: isinstance(
+                x, str
+            )
+            self.__constraint_checks__["Regex Pattern Match"] = lambda x: bool(
+                re.findall(pattern, x)
+            )
+        if includes is not None:
+            self.__constraint_checks__[f"Includes"] = lambda x: x in includes
+        if excludes is not None:
+            self.__constraint_checks__["Excludes"] = lambda x: x not in excludes
+        if gt is not None:
+            self.__constraint_checks__[f"Greater Than ({gt})"] = (
+                lambda x: x > gt
+            )
+        if lt is not None:
+            self.__constraint_checks__[f"Less Than ({lt})"] = lambda x: x < lt
+        if ge is not None:
+            self.__constraint_checks__[f"Greater Than Or Equal To ({ge})"] = (
+                lambda x: x >= ge
+            )
+        if le is not None:
+            self.__constraint_checks__[f"Less Than Or Equal To ({le})"] = (
+                lambda x: x <= le
+            )
+        if eq is not None:
+            self.__constraint_checks__[f"Equal To ({eq})"] = lambda x: x == eq
+        if ne is not None:
+            self.__constraint_checks__[f"Not Equal To ({ne})"] = (
+                lambda x: x != ne
+            )


Test patch:
diff --git a/test/test_fn_13.py b/test/test_fn_13.py
index 7040a6c..cad931a 100644
--- a/test/test_fn_13.py
+++ b/test/test_fn_13.py
@@ -18,7 +18,7 @@ def my_fn(a: Literal["a", "b"]):
 try:
     my_fn(a="c")
 except Exception as e:
-    if "Type mismatch" in str(e):
+    if "Literal validation error" in str(e):
         success_2 = True
 
 if success_1 and success_2:
diff --git a/test/test_fn_16.py b/test/test_fn_16.py
new file mode 100644
index 0000000..4fdf5b4
--- /dev/null
+++ b/test/test_fn_16.py
@@ -0,0 +1,98 @@
+import type_enforced
+from type_enforced.utils import Constraint, GenericConstraint
+
+CustomConstraint = GenericConstraint(
+    {
+        "in_rgb": lambda x: x in ["red", "green", "blue"],
+    }
+)
+
+
+@type_enforced.Enforcer()
+def positive_int_test(value: [int, Constraint(ge=0)]) -> bool:
+    return True
+
+
+@type_enforced.Enforcer()
+def positive_float_test(value: [int, float, Constraint(ge=0)]) -> bool:
+    return True
+
+
+@type_enforced.Enforcer()
+def running_str_test(value: [str, Constraint(pattern=r".*running.*")]) -> bool:
+    return True
+
+
+@type_enforced.Enforcer()
+def custom_constraint_test(value: [str, CustomConstraint]) -> bool:
+    return True
+
+
+success = True
+try:
+    positive_int_test(0)
+except TypeError as err:
+    success = False
+
+try:
+    positive_int_test(-1)
+    success = False
+except TypeError:
+    pass
+
+try:
+    positive_int_test("Hello There")
+    success = False
+except TypeError:
+    pass
+
+try:
+    positive_float_test(0.1)
+except TypeError:
+    success = False
+
+try:
+    positive_float_test(-0.99)
+    success = False
+except TypeError:
+    pass
+
+try:
+    positive_float_test("Hello There")
+    success = False
+except TypeError:
+    pass
+
+try:
+    running_str_test(0)
+    success = False
+except TypeError:
+    pass
+
+try:
+    running_str_test("this is a stopped status")
+    success = False
+except TypeError:
+    pass
+
+try:
+    running_str_test("this is running status")
+except TypeError:
+    success = False
+
+try:
+    custom_constraint_test("red")
+except TypeError:
+    success = False
+
+try:
+    custom_constraint_test("yellow")
+    success = False
+except TypeError:
+    pass
+
+
+if success:
+    print(f"test_fn_16.py passed")
+else:
+    print(f"test_fn_16.py failed")