Skip to content

Commit 23d8255

Browse files
committed
Linter fixes
1 parent 9093288 commit 23d8255

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

azure_functions_worker/dispatcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ async def _handle__worker_status_request(self, request):
324324
def get_function_metadata(self, directory, caller_info):
325325
"""
326326
This method is called to index the functions in the function app directory
327-
and save the results in function_metadata_result or
328-
function_metadata_exception in case of an exception.
327+
and save the results in function_metadata_result or
328+
function_metadata_exception in case of an exception.
329329
"""
330330
script_file_name = get_app_setting(
331331
setting=PYTHON_SCRIPT_FILE_NAME,

tests/unittests/test_dispatcher.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
from unittest.mock import patch
1010

1111
from azure_functions_worker import protos
12-
from azure_functions_worker.constants import PYTHON_THREADPOOL_THREAD_COUNT, \
13-
PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT, \
14-
PYTHON_THREADPOOL_THREAD_COUNT_MAX_37, PYTHON_THREADPOOL_THREAD_COUNT_MIN, ENABLE_INIT_INDEXING
12+
from azure_functions_worker.constants import (PYTHON_THREADPOOL_THREAD_COUNT,
13+
PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT,
14+
PYTHON_THREADPOOL_THREAD_COUNT_MAX_37,
15+
PYTHON_THREADPOOL_THREAD_COUNT_MIN,
16+
ENABLE_INIT_INDEXING)
1517
from azure_functions_worker.version import VERSION
1618
from tests.utils import testutils
1719
from tests.utils.testutils import UNIT_TESTS_ROOT
@@ -841,7 +843,7 @@ def test_functions_metadata_request_with_init_indexing_enabled(self):
841843
self.assertIsNone(self.dispatcher.function_metadata_exception)
842844

843845
@patch.dict(os.environ, {ENABLE_INIT_INDEXING: 'false'})
844-
def test_functions_metadata_request_with_init_indexing_enabled(self):
846+
def test_functions_metadata_request_with_init_indexing_disabled(self):
845847
init_request = protos.StreamingMessage(
846848
worker_init_request=protos.WorkerInitRequest(
847849
host_version="2.3.4",
@@ -862,7 +864,6 @@ def test_functions_metadata_request_with_init_indexing_enabled(self):
862864
self.assertIsNone(self.dispatcher.function_metadata_result)
863865
self.assertIsNone(self.dispatcher.function_metadata_exception)
864866

865-
866867
metadata_response = self.loop.run_until_complete(
867868
self.dispatcher._handle__functions_metadata_request(metadata_request))
868869

@@ -915,12 +916,12 @@ def test_dispatcher_indexing_in_load_request(self):
915916
self.assertIsNone(self.dispatcher.function_metadata_result)
916917

917918
load_request = protos.StreamingMessage(
918-
function_load_request=protos.FunctionLoadRequest(
919-
function_id="http_trigger",
920-
metadata=protos.RpcFunctionMetadata(
921-
directory=str(FUNCTION_APP_DIRECTORY),
922-
properties={"worker_indexed": "True"}
923-
)))
919+
function_load_request=protos.FunctionLoadRequest(
920+
function_id="http_trigger",
921+
metadata=protos.RpcFunctionMetadata(
922+
directory=str(FUNCTION_APP_DIRECTORY),
923+
properties={"worker_indexed": "True"}
924+
)))
924925

925926
self.loop.run_until_complete(
926927
self.dispatcher._handle__function_load_request(load_request))

0 commit comments

Comments
 (0)