wsadmin_type_hints
import
this module to gain intellisense on the 5 main wsadmin.sh
Jython
language objects and all the scripts in the Jython scripting library.
Use it like this:
try:
(AdminControl, AdminConfig, AdminApp, AdminTask, Help)
except NameError:
from wsadmin_type_hints import AdminControl, AdminConfig, AdminApp, AdminTask, Help
Warning
Importing with a wildcard import is generally discouraged and considered bad practice, so avoid it if possible.
From my tests I've also found that intellisense may not work properly when modules are imported through a wildcard. In my case Visual Studio Code was not be able to provide suggestions for a module function.
-
Works:
try: (AdminControl, AdminConfig, AdminApp, AdminTask, Help) # type: ignore except NameError: from wsadmin_type_hints import AdminConfig, AdminTask, AdminJMS
-
Also works (use parenthesis for better readability through nesting):
try: (AdminControl, AdminConfig, AdminApp, AdminTask, Help) # type: ignore except NameError: from wsadmin_type_hints import ( AdminConfig, AdminTask, AdminJMS )
-
MAY not work:
try: (AdminControl, AdminConfig, AdminApp, AdminTask, Help) # type: ignore except NameError: from wsadmin_type_hints import *
This way it will be imported only in your development environment.