From 82bc9997c865f41d28e7f5f74ded7ce65f57af16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Pluta?= Date: Tue, 9 Jul 2019 22:13:24 +0200 Subject: [PATCH] Move 'system' module --- smnp/module/__init__.py | 7 +++---- smnp/module/system/__init__.py | 4 ++++ smnp/module/system/function/__init__.py | 0 smnp/{library => module/system}/function/debug.py | 1 + smnp/{library => module/system}/function/display.py | 0 smnp/{library => module/system}/function/exit.py | 0 smnp/{library => module/system}/function/read.py | 0 smnp/{library => module/system}/function/sleep.py | 0 smnp/{library => module/system}/function/type.py | 6 +++--- 9 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 smnp/module/system/__init__.py create mode 100644 smnp/module/system/function/__init__.py rename smnp/{library => module/system}/function/debug.py (99%) rename smnp/{library => module/system}/function/display.py (100%) rename smnp/{library => module/system}/function/exit.py (100%) rename smnp/{library => module/system}/function/read.py (100%) rename smnp/{library => module/system}/function/sleep.py (100%) rename smnp/{library => module/system}/function/type.py (57%) diff --git a/smnp/module/__init__.py b/smnp/module/__init__.py index 972816e..9c2509c 100644 --- a/smnp/module/__init__.py +++ b/smnp/module/__init__.py @@ -1,5 +1,4 @@ -import smnp.module.mic -import smnp.module.note +from smnp.module import system, mic, note -functions = [ *mic.functions, *note.functions ] -methods = [ *mic.methods, *note.methods ] \ No newline at end of file +functions = [ *system.functions, *mic.functions, *note.functions ] +methods = [ *system.methods, *mic.methods, *note.methods ] \ No newline at end of file diff --git a/smnp/module/system/__init__.py b/smnp/module/system/__init__.py new file mode 100644 index 0000000..93af5e0 --- /dev/null +++ b/smnp/module/system/__init__.py @@ -0,0 +1,4 @@ +from smnp.module.system.function import sleep, display, debug, exit, type + +functions = [ debug.function, display.function, exit.function, sleep.function, type.function ] +methods = [] \ No newline at end of file diff --git a/smnp/module/system/function/__init__.py b/smnp/module/system/function/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smnp/library/function/debug.py b/smnp/module/system/function/debug.py similarity index 99% rename from smnp/library/function/debug.py rename to smnp/module/system/function/debug.py index 941e8b3..06231a9 100644 --- a/smnp/library/function/debug.py +++ b/smnp/module/system/function/debug.py @@ -3,6 +3,7 @@ from smnp.library.model import Function from smnp.library.signature import signature, ofTypes from smnp.type.model import Type + _signature = signature(ofTypes(Type.STRING)) def _function(env, parameter): if parameter.value == "environment": diff --git a/smnp/library/function/display.py b/smnp/module/system/function/display.py similarity index 100% rename from smnp/library/function/display.py rename to smnp/module/system/function/display.py diff --git a/smnp/library/function/exit.py b/smnp/module/system/function/exit.py similarity index 100% rename from smnp/library/function/exit.py rename to smnp/module/system/function/exit.py diff --git a/smnp/library/function/read.py b/smnp/module/system/function/read.py similarity index 100% rename from smnp/library/function/read.py rename to smnp/module/system/function/read.py diff --git a/smnp/library/function/sleep.py b/smnp/module/system/function/sleep.py similarity index 100% rename from smnp/library/function/sleep.py rename to smnp/module/system/function/sleep.py diff --git a/smnp/library/function/type.py b/smnp/module/system/function/type.py similarity index 57% rename from smnp/library/function/type.py rename to smnp/module/system/function/type.py index c4ae107..f7326e8 100644 --- a/smnp/library/function/type.py +++ b/smnp/module/system/function/type.py @@ -1,10 +1,10 @@ from smnp.library.model import Function from smnp.library.signature import signature, allTypes - +from smnp.type.model import Type _signature = signature(allTypes()) def _function(env, obj): - return obj.type.name + return Type.type(obj.type) -function = Function(_signature, _function, 'type') \ No newline at end of file +function = Function(_signature, _function, 'typeOf') \ No newline at end of file