diff --git a/builds/azure-pipelines/template-steps-build-test.yml b/builds/azure-pipelines/template-steps-build-test.yml index 15a07c304..6270f69dd 100644 --- a/builds/azure-pipelines/template-steps-build-test.yml +++ b/builds/azure-pipelines/template-steps-build-test.yml @@ -67,14 +67,14 @@ steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.9' - addToPath: true + versionSpec: '3.9' + addToPath: true architecture: 'x64' - script: | - pip3 install pylint + pip3 install pylint_runner pip3 install pylintfileheader - pylint --recursive=y . + pylint_runner workingDirectory: $(Build.SourcesDirectory)/samples/samples-python displayName: Lint samples-python diff --git a/samples/samples-python/.pylintrc b/samples/samples-python/.pylintrc index c550dc511..cfba7c8bd 100644 --- a/samples/samples-python/.pylintrc +++ b/samples/samples-python/.pylintrc @@ -13,4 +13,4 @@ file-header=# Copyright \(c\) Microsoft Corporation\. All rights reserved\.[\r\n # can either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). -disable= R0801, W0108, W0613, C0103, C0114, C0115, C0116, E0401 \ No newline at end of file +disable= R0801, W0108, W0613, C0103, C0114, C0115, C0116, E0401, C0301 \ No newline at end of file diff --git a/samples/samples-python/GetProductsStoredProcedure/__init__.py b/samples/samples-python/GetProductsStoredProcedure/__init__.py index 7d9413a9a..b87950e4f 100644 --- a/samples/samples-python/GetProductsStoredProcedure/__init__.py +++ b/samples/samples-python/GetProductsStoredProcedure/__init__.py @@ -1,8 +1,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -import azure.functions as func import json +import azure.functions as func def main(req: func.HttpRequest, products: func.SqlRowList) -> func.HttpResponse: rows = list(map(lambda r: json.loads(r.to_json()), products))