From 71a3fddeba42c2648dd6a12166615daf0e97a47a Mon Sep 17 00:00:00 2001 From: blueShard-dev <63594396+blueShard-dev@users.noreply.github.com> Date: Tue, 7 Jul 2020 20:50:27 +0000 Subject: [PATCH] Add return type annotations --- aionlib/variable.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aionlib/variable.py b/aionlib/variable.py index 1bae467..3ce4626 100644 --- a/aionlib/variable.py +++ b/aionlib/variable.py @@ -35,7 +35,7 @@ class Variable: else: self._aion_open_variable_file = None - def add_variable(self, variable_name, value): + def add_variable(self, variable_name, value) -> None: """ adds a variable @@ -57,7 +57,7 @@ class Variable: self._aion_open_variable_file = open(_aion_variable_file, "rw") self._user_variables[variable_name] = value - def close(self): + def close(self) -> None: """ remove the file with the saved variables @@ -71,7 +71,7 @@ class Variable: remove(_aion_variable_file) self._aion_open_variable_file = None - def get_value(self, variable_name): + def get_value(self, variable_name) -> str: """ get the value of an variable @@ -101,7 +101,7 @@ class Variable: return self._user_variables[variable_name] raise KeyError("the variable " + variable_name + " doesn't exists") - def inititalize_variables(self, additional_variables={}): + def inititalize_variables(self, additional_variables={}) -> None: """ creates a new file for the variables to store @@ -121,7 +121,7 @@ class Variable: self._aion_open_variable_file.writelines(write_list) self._aion_open_variable_file = open(_aion_variable_file, "w+") - def remove_variable(self, variable_name): + def remove_variable(self, variable_name) -> None: """ removes a variable @@ -156,7 +156,7 @@ class Variable: if found is False: raise KeyError("the variable " + variable_name + " doesn't exists") - def set_value(self, variable_name, value): + def set_value(self, variable_name, value) -> None: """ set a new value to a variable