Skip to content

Commit

Permalink
Add explicit imports to keep pycharm happier.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbruns committed Jan 1, 2018
1 parent 40f083a commit 3e63cd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/openvr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import os
import platform
import ctypes
# Several explicit imports to keep pycharm happier
from ctypes import byref, POINTER, sizeof, Structure, Union
from ctypes import *

from .version import __version__
Expand Down Expand Up @@ -5220,8 +5222,8 @@ def shutdown():
_openvr.VR_IsHmdPresent.argtypes = []
def isHmdPresent():
"""
Returns true if there is an HMD attached. This check is as lightweight as possible and
can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants
Returns true if there is an HMD attached. This check is as lightweight as possible and
can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants
to know if initializing VR is a possibility but isn't ready to take that step yet.
"""
result = _openvr.VR_IsHmdPresent()
Expand Down Expand Up @@ -5262,7 +5264,7 @@ def getVRInitErrorAsSymbol(error):
_openvr.VR_GetVRInitErrorAsEnglishDescription.argtypes = [EVRInitError]
def getVRInitErrorAsEnglishDescription(error):
"""
Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and
Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and
use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown().
"""
result = _openvr.VR_GetVRInitErrorAsEnglishDescription(error)
Expand All @@ -5273,7 +5275,7 @@ def getVRInitErrorAsEnglishDescription(error):
_openvr.VR_GetGenericInterface.argtypes = [c_char_p, POINTER(EVRInitError)]
def getGenericInterface(interfaceVersion):
"""
Returns the interface of the specified version. This method must be called after VR_Init. The
Returns the interface of the specified version. This method must be called after VR_Init. The
pointer returned is valid until VR_Shutdown is called.
"""
error = EVRInitError()
Expand Down
2 changes: 2 additions & 0 deletions src/translate/translate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ sub write_preamble
import os
import platform
import ctypes
# Several explicit imports to keep pycharm happier
from ctypes import byref, POINTER, sizeof, Structure, Union
from ctypes import *
from .version import __version__
Expand Down

0 comments on commit 3e63cd8

Please sign in to comment.