seratch / ChatGPT-in-Slack

Swift demonstration of how to build a Slack app that enables end-users to interact with a ChatGPT bot
MIT License
436 stars 164 forks source link

pytype errors #57

Open iwamot opened 1 year ago

iwamot commented 1 year ago

./validate.sh will produce the following errors.

File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 476, in show_summarize_option_modal: No attribute 'get' on None [attribute-error]
  In Optional[Any]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 598, in ack_summarize_options_modal_submission: No attribute 'get' on None [attribute-error]
  In Optional[Any]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 651, in prepare_and_share_thread_summary: No attribute 'get' on None [attribute-error]
  In Optional[Any]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 786, in ack_proofreading_modal_submission: No attribute 'split' on None [attribute-error]
  In Optional[Any]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 817, in display_proofreading_result: No attribute 'split' on None [attribute-error]
  In Optional[Any]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 860, in display_proofreading_result: Name 'text' is not defined [name-error]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 882, in display_proofreading_result: Name 'text' is not defined [name-error]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 934, in ack_chat_from_scratch_modal_submission: No attribute 'split' on None [attribute-error]
  In Optional[Any]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 964, in display_chat_from_scratch_result: No attribute 'split' on None [attribute-error]
  In Optional[Any]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 1003, in display_chat_from_scratch_result: Name 'text' is not defined [name-error]
File "/path/to/ChatGPT-in-Slack/app/bolt_listeners.py", line 1023, in display_chat_from_scratch_result: Name 'text' is not defined [name-error]
seratch commented 1 year ago

Hi @iwamot, this project has been using a specific version of pytype and the old version does not tell these errors: https://github.com/seratch/ChatGPT-in-Slack/blob/main/.github/workflows/pytype.yml Probably, you're running the latest version and it may pinpoint these. If you're inteterested in resolving them, I am happy to merge the changes.