Cleanup: unused-imports in tests/

This commit is contained in:
Campbell Barton
2023-07-25 21:43:53 +10:00
parent d7558a243c
commit 89811cb96f
150 changed files with 5 additions and 297 deletions
+1 -2
View File
@@ -5,7 +5,6 @@
import fnmatch
import json
import pathlib
import sys
from dataclasses import dataclass, field
from typing import Dict, List
@@ -15,7 +14,6 @@ from .test import TestCollection
def get_build_hash(args: None) -> str:
import bpy
import sys
build_hash = bpy.app.build_hash.decode('utf-8')
return '' if build_hash == 'Unknown' else build_hash
@@ -220,6 +218,7 @@ class TestConfig:
executable, environment = self._split_environment_variables(executable)
executable_path = env._blender_executable_from_path(pathlib.Path(executable))
if not executable_path:
import sys
sys.stderr.write(f'Error: build {executable} not found\n')
sys.exit(1)
-1
View File
@@ -26,7 +26,6 @@ def get_cpu_name() -> str:
def get_gpu_device(args: None) -> List:
# Get the list of available Cycles GPU devices.
import bpy
import sys
prefs = bpy.context.preferences
cprefs = prefs.addons['cycles'].preferences
-1
View File
@@ -10,7 +10,6 @@ import glob
import pathlib
import shutil
import sys
import time
from typing import List
-1
View File
@@ -3,7 +3,6 @@
# SPDX-License-Identifier: Apache-2.0
import api
import os
def _run(args):
-2
View File
@@ -3,8 +3,6 @@
# SPDX-License-Identifier: Apache-2.0
import api
import os
import pathlib
def _run(filepath):
-2
View File
@@ -3,12 +3,10 @@
# SPDX-License-Identifier: Apache-2.0
import api
import os
def _run(args):
import bpy
import time
device_type = args['device_type']
device_index = args['device_index']
-1
View File
@@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: Apache-2.0
import os
import enum
import time
@@ -3,7 +3,6 @@
# SPDX-License-Identifier: Apache-2.0
import api
import os
def _run(args):