-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: fix 2 small bugs wrt to XTGeo 3.9.2 and Roxar/RMS API #217
Conversation
0f5f5ea
to
ec72b17
Compare
try: | ||
import _roxar # type: ignore | ||
from _roxar import Project # type:ignore | ||
except ModuleNotFoundError: | ||
try: | ||
import _rmsapi as _roxar # type: ignore | ||
from _rmsapi import Project # type:ignore | ||
except ModuleNotFoundError: | ||
|
||
class MockRoxar: | ||
@property | ||
def Project(self): | ||
pass | ||
class MockRoxar: | ||
@property | ||
def Project(self): | ||
pass | ||
|
||
_roxar = MockRoxar() | ||
_roxar = MockRoxar() | ||
Project = _roxar.Project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that all of this is related to type hinting the project
argument in the function. Could we just remove it and put Any
as type instead as we do in the qcreset.py
🙂 ? for simplicity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking of that, but left it as it was your code initially; :-) I can change it to Any
This is due to change in xtgeo 3.9.2
ec72b17
to
e9f5685
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🙂
Solves #216 and #215