From 2f0e0479413d41c55a2bc69a9b9dd6a1f413718e Mon Sep 17 00:00:00 2001 From: Jasper den Ouden Date: Thu, 3 Mar 2022 23:29:50 +0100 Subject: [PATCH] Minor, some fixes --- test/integermath.py | 2 +- type_stack_calc/intro/load.py | 5 ++--- type_stack_calc/sets/stepping.py | 5 +++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/integermath.py b/test/integermath.py index 64702b6..a9e4bb3 100644 --- a/test/integermath.py +++ b/test/integermath.py @@ -42,7 +42,7 @@ from type_stack_calc.ib.scope import scopify def ignore(_x): pass vs = scopify(intro) -assert vs.get('Set') +assert vs.get('Tp') def is_single(got, x): assert isinstance(got, tuple) and len(got) == 1 diff --git a/type_stack_calc/intro/load.py b/type_stack_calc/intro/load.py index 8dde6d6..faa9f13 100644 --- a/type_stack_calc/intro/load.py +++ b/type_stack_calc/intro/load.py @@ -8,10 +8,9 @@ from type_stack_calc.ib.scope import scopify def _ignore(_c1): pass class LoadCall(dict): - def __repr__(self): return f"LoadCall" + def __repr__(self): return "LoadCall{a dict}}" - fun_tp, n = 'method', 1 - c_name = 'LoadCall' + fun_tp, n, c_name = 'method', 1, 'LoadCall' def load(self, sc, vs, path): """Gets loaded from dictionary if available, otherwise looks in `sc.paths`, and runs again.""" diff --git a/type_stack_calc/sets/stepping.py b/type_stack_calc/sets/stepping.py index cfe8332..3954995 100644 --- a/type_stack_calc/sets/stepping.py +++ b/type_stack_calc/sets/stepping.py @@ -92,9 +92,10 @@ NOTE: `None` results or omissions of methods often means it turns into a regular nfr, nto = map(self.conform, y) if nfr < fr: nfr += step if nfr == nto: - return type(y)(nfr, nfr) + return type(y)(nto, nto) + elif nfr > nto: + return the_empty else: - assert nfr < nto, (nfr, nto, y) return [type(y)(nfr, nto), self] def set_intersect(self, y): -- 2.38.5