mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-05 19:13:01 +00:00
[misc] update pre-commit and run all files (#4752)
* [misc] update pre-commit * [misc] run pre-commit * [misc] remove useless configuration files * [misc] ignore cuda for clang-format
This commit is contained in:
@@ -33,13 +33,14 @@ def run_on_environment_flag(name: str):
|
||||
import pytest
|
||||
except ImportError:
|
||||
raise ImportError(
|
||||
'This function requires `pytest` to be installed, please do `pip install pytest` and try again.')
|
||||
"This function requires `pytest` to be installed, please do `pip install pytest` and try again."
|
||||
)
|
||||
|
||||
assert isinstance(name, str)
|
||||
flag = os.environ.get(name.upper(), '0')
|
||||
flag = os.environ.get(name.upper(), "0")
|
||||
|
||||
reason = f'Environment variable {name} is {flag}'
|
||||
if flag == '1':
|
||||
reason = f"Environment variable {name} is {flag}"
|
||||
if flag == "1":
|
||||
return pytest.mark.skipif(False, reason=reason)
|
||||
else:
|
||||
return pytest.mark.skipif(True, reason=reason)
|
||||
|
Reference in New Issue
Block a user