Skip to content

Commit

Permalink
[Bug] Fix bug to disable taichi header print (#8517)
Browse files Browse the repository at this point in the history
Issue: #8334 

### Brief Summary

The previous code #8413 had no effect because the value in os.environ
can only be a string. This pull request will enable users to disable the
Taichi header print by setting one of the following ways:

- os.environ['ENABLE_TAICHI_HEADER_PRINT'] = 'False'
- os.environ['ENABLE_TAICHI_HEADER_PRINT'] = 'FALSE'
- os.environ['ENABLE_TAICHI_HEADER_PRINT'] = 'F'
- os.environ['ENABLE_TAICHI_HEADER_PRINT'] = '0'

### Walkthrough

copilot:walkthrough

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
mushroomfire and pre-commit-ci[bot] authored Jun 23, 2024
1 parent e4b0bf0 commit b649d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/taichi/_lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _print_taichi_header():
print(header)


if os.environ.get("ENABLE_TAICHI_HEADER_PRINT", True):
if os.getenv("ENABLE_TAICHI_HEADER_PRINT", "True").lower() not in ("false", "0", "f"):
_print_taichi_header()


Expand Down

0 comments on commit b649d14

Please sign in to comment.