aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/psi/__init__.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-09-27 22:10:55 +0800
committer简律纯 <i@jyunko.cn>2023-09-27 22:10:55 +0800
commit767459d17e031e96d09e533a2a53df896b3a57e1 (patch)
treef7ed6952d85be703511f95e17c13824e0ffc33e8 /src/psi/__init__.py
parentba4129933cdb6d91e695b2de900b8753652ec385 (diff)
downloadTRPGNivis-767459d17e031e96d09e533a2a53df896b3a57e1.tar.gz
TRPGNivis-767459d17e031e96d09e533a2a53df896b3a57e1.zip
feat(docstring): 添加PEP8规范的Docstring
Diffstat (limited to 'src/psi/__init__.py')
-rw-r--r--src/psi/__init__.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/psi/__init__.py b/src/psi/__init__.py
index 1c274e2..3652c6d 100644
--- a/src/psi/__init__.py
+++ b/src/psi/__init__.py
@@ -8,19 +8,64 @@ __all__ = ['psi']
from psi.execution import Execution
class Psi:
+ """
+ A class representing a Psi object.
+
+ Args:
+ input: The input value for the Psi object.
+
+ Returns:
+ None
+
+ Example:
+ ```python
+ obj = Psi("example")
+ ```
+ """
+
def __init__(self, input):
+ """
+ Initializes a Psi object.
+
+ Args:
+ input: The input value for the Psi object.
+
+ Returns:
+ None
+ """
self.input = input
self.execution = Execution(input)
self.result = None
def execute(self):
+ """
+ Executes the Psi object.
+
+ Returns:
+ The result of the execution.
+ """
self.result = self.execution.execute()
return self.result
def get_result(self):
+ """
+ Retrieves the result of the Psi object.
+
+ Returns:
+ The result of the execution.
+ """
return self.result
def set_input(self, input):
+ """
+ Sets the input value for the Psi object.
+
+ Args:
+ input: The new input value.
+
+ Returns:
+ None
+ """
self.input = input
self.execution = Execution(input)
self.result = None