CineAI commited on
Commit
195cad5
1 Parent(s): 2e48544

Update command/core/form_documentation.py

Browse files
Files changed (1) hide show
  1. command/core/form_documentation.py +5 -4
command/core/form_documentation.py CHANGED
@@ -1,6 +1,8 @@
1
  import os
2
  import logging
3
 
 
 
4
  NAME = 'Chelsea_documentation.txt'
5
 
6
  TEMPLATE = """
@@ -20,7 +22,7 @@ The following list of voice commands in English is available for calling the com
20
  In Ukrainian: "Завантажити команди", "Скачати команди", "Загрузити команди", "Переглянути команди", "Завантажити", "Скачати", "Загрузити", "Переглянути", "команди".
21
  """
22
 
23
- def generate_doc(path: str):
24
 
25
  if path is not None:
26
  file = os.path.join(path, NAME)
@@ -32,9 +34,8 @@ def generate_doc(path: str):
32
 
33
  try:
34
  with open(file, 'w') as f:
35
- text = f.write(TEMPLATE)
36
- print(type(text))
37
- return text
38
  except IOError as e:
39
  logging.error(e)
40
 
 
1
  import os
2
  import logging
3
 
4
+ from typing import Optional
5
+
6
  NAME = 'Chelsea_documentation.txt'
7
 
8
  TEMPLATE = """
 
22
  In Ukrainian: "Завантажити команди", "Скачати команди", "Загрузити команди", "Переглянути команди", "Завантажити", "Скачати", "Загрузити", "Переглянути", "команди".
23
  """
24
 
25
+ def generate_doc(path: Optional[str] = None) -> Optional[str]:
26
 
27
  if path is not None:
28
  file = os.path.join(path, NAME)
 
34
 
35
  try:
36
  with open(file, 'w') as f:
37
+ f.write(TEMPLATE)
38
+ return file
 
39
  except IOError as e:
40
  logging.error(e)
41