Move in-function import to file header for BUCK file
In-function imports are frowned upon. Change-Id: Icb8231024ae1b60d4504242f11f0ab469a737f83
This commit is contained in:
@@ -22,6 +22,7 @@ include_defs('//tools/git.defs')
|
|||||||
import copy
|
import copy
|
||||||
import traceback
|
import traceback
|
||||||
import os
|
import os
|
||||||
|
from multiprocessing import cpu_count
|
||||||
|
|
||||||
# Set defaults on java rules:
|
# Set defaults on java rules:
|
||||||
# - Add AutoValue annotation processing support.
|
# - Add AutoValue annotation processing support.
|
||||||
@@ -132,7 +133,6 @@ def gerrit_plugin(
|
|||||||
manifest_entries = [],
|
manifest_entries = [],
|
||||||
type = 'plugin',
|
type = 'plugin',
|
||||||
visibility = ['PUBLIC']):
|
visibility = ['PUBLIC']):
|
||||||
from multiprocessing import cpu_count
|
|
||||||
tb = traceback.extract_stack()
|
tb = traceback.extract_stack()
|
||||||
calling_BUCK_file = tb[-2][0]
|
calling_BUCK_file = tb[-2][0]
|
||||||
calling_BUCK_dir = os.path.abspath(os.path.dirname(calling_BUCK_file))
|
calling_BUCK_dir = os.path.abspath(os.path.dirname(calling_BUCK_file))
|
||||||
|
Reference in New Issue
Block a user