# \[IGN-3987\]Designer - Scripting function list breaks when using type comments

**URL:** <https://forum.inductiveautomation.com/t/ign-3987-designer-scripting-function-list-breaks-when-using-type-comments/63582>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [August 29, 2022, 8:37pm UTC](https://forum.inductiveautomation.com/t/ign-3987-designer-scripting-function-list-breaks-when-using-type-comments/63582 "2022-08-29T20:37:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [August 29, 2022, 8:37pm UTC](https://forum.inductiveautomation.com/t/ign-3987-designer-scripting-function-list-breaks-when-using-type-comments/63582/1 "2022-08-29T20:37:14Z")

</div>

Hello, IA.

Recently, as we’ve started using type hints for our internal APIs, we’ve noticed that the navigation on the right breaks when we’re using type hints on each function argument rather than having them as a single type comment.

Taking the example from `mypy`’s [Python 2 cheat sheet](https://mypy.readthedocs.io/en/stable/cheat_sheet.html#functions), we see that the `send_email` function is not listed.

```python
def send_email(address, # type: Union[str, List[str]]
               sender, # type: str
               cc, # type: Optional[List[str]]
               bcc, # type: Optional[List[str]]
               subject='',
               body=None # type: List[str]
               ):
    # type: (...) -> bool
    system.net.sendEmail("localhost:25", "no-reply@domain.com", "Subject", body, True, address)

```

See here:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/d/7d10ec56aa35a77c46bbf2aad69d723bdd625e49.png)  
**Fig. 1**

Compared to the following, where the arguments don’t have the `type` comment:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/9/6980014ff9793e1426363644c04cb64bd28df7df.png)  
**Fig. 2**

I would expect to see all functions listed as in _Fig. 2_ when using type comments as in _Fig. 1_.

Thanks!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 29, 2022, 8:55pm UTC](https://forum.inductiveautomation.com/t/ign-3987-designer-scripting-function-list-breaks-when-using-type-comments/63582/2 "2022-08-29T20:55:16Z")

</div>

Yeah, this doesn’t totally surprise me. The current function panel is a fairly naive regex-based implementation, rather than a proper parsing approach. It’s on the list to revamp in a number of ways (e.g. sorting, expand/collapse all).

Open to any other fun ideas for functionality here, as well 🙂

---

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [August 29, 2022, 9:03pm UTC](https://forum.inductiveautomation.com/t/ign-3987-designer-scripting-function-list-breaks-when-using-type-comments/63582/3 "2022-08-29T21:03:02Z")

</div>

Should this be a bug or an [idea](https://ideas.inductiveautomation.com/)?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 29, 2022, 9:18pm UTC](https://forum.inductiveautomation.com/t/ign-3987-designer-scripting-function-list-breaks-when-using-type-comments/63582/4 "2022-08-29T21:18:09Z")

</div>

I don’t think an ideas post is necessary; it’s already something we’re tracking and plan to do. It’d have to get quite a few upvotes to ‘upgrade’ to the next level of prioritization.
