Skip to content
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

Confusion about values for PYEDB_USE_DOTNET #932

Open
isaacwaldron opened this issue Dec 4, 2024 · 2 comments
Open

Confusion about values for PYEDB_USE_DOTNET #932

isaacwaldron opened this issue Dec 4, 2024 · 2 comments
Assignees

Comments

@isaacwaldron
Copy link
Collaborator

This line:

os.environ["PYEDB_USE_DOTNET"] = "0"

sets PYEDB_USE_DOTNET to the string literal "0". This is equivalent to setting PYEDB_USE_DOTNET=0 in the user's environment. However, this value evaluates to True for the check at

if bool(os.getenv("PYEDB_USE_DOTNET", "1")):

since a non-empty string always evaluates to True.

In addition, the documentation appears to suggest opposite values for this environment variable here:

https://github.com/ansys/pyedb/blob/59d21f1e6c1b5576553d57a0563bcd5e6d70161d/doc/source/getting_started/versioning.rst?plain=1#L21C1-L24C89

@isaacwaldron isaacwaldron changed the title Slightly misleading value setting for PYEDB_USE_DOTNET Confusion about values for PYEDB_USE_DOTNET Dec 4, 2024
@isaacwaldron
Copy link
Collaborator Author

I realize there is no need to set this currently, but I was reminded of this while tracking down an issue in another test suite.

@SMoraisAnsys
Copy link
Collaborator

You are right, I'll clean that up when I get back from my trip.
Thanks for the report @isaacwaldron

@SMoraisAnsys SMoraisAnsys self-assigned this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants