-
Notifications
You must be signed in to change notification settings - Fork 107
fix: allow returning none for generic bindings #1379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
daa85d2
allow nill data for generic bindings
hallvictoria 89c7835
tests
hallvictoria b097d14
lint
hallvictoria 42b94c6
Merge branch 'dev' into hallvictoria/allow-nill-data
hallvictoria 8fab3ed
Merge branch 'dev' of https://github.com/Azure/azure-functions-python…
hallvictoria 3d7ae9d
Merge branch 'hallvictoria/allow-nill-data' of https://github.com/Azu…
hallvictoria f714ea3
added comment
hallvictoria 87aac19
Merge branch 'dev' into hallvictoria/allow-nill-data
hallvictoria dbe218e
Merge branch 'dev' into hallvictoria/allow-nill-data
hallvictoria 485e138
Merge branch 'dev' into hallvictoria/allow-nill-data
vrdmr 886f0a2
Merge branch 'dev' into hallvictoria/allow-nill-data
hallvictoria dff0911
Merge branch 'dev' into hallvictoria/allow-nill-data
hallvictoria d88763a
Merge branch 'dev' into hallvictoria/allow-nill-data
gavin-aguiar b9d6d31
compatible with generic implicit output
66da8e2
removed if cond
hallvictoria 3fd84f5
revert return none supp
hallvictoria 8cad4fd
Merge branch 'dev' into hallvictoria/allow-nill-data
hallvictoria 3baa53b
Merge branch 'dev' into hallvictoria/allow-nill-data
hallvictoria 40c105b
added back support for returning None
hallvictoria ca87969
Merge branch 'dev' into hallvictoria/allow-nill-data
hallvictoria 810f18d
e2e test with generic bind and return none
hallvictoria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/endtoend/generic_functions/return_none/function.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"scriptFile": "main.py", | ||
"bindings": [ | ||
{ | ||
"name": "mytimer", | ||
"type": "timerTrigger", | ||
"direction": "in", | ||
"schedule": "*/1 * * * * *", | ||
"runOnStartup": false | ||
}, | ||
{ | ||
"direction": "in", | ||
"type": "table", | ||
"name": "testEntity", | ||
"partitionKey": "test", | ||
"rowKey": "WillBePopulatedWithGuid", | ||
"tableName": "BindingTestTable", | ||
"connection": "AzureWebJobsStorage" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
import logging | ||
|
||
import azure.functions as func | ||
|
||
|
||
def main(mytimer: func.TimerRequest, testEntity) -> None: | ||
logging.info("This timer trigger function executed successfully") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/unittests/generic_functions/foobar_nil_data/function.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"scriptFile": "main.py", | ||
"bindings": [ | ||
{ | ||
"type": "generic", | ||
"name": "input", | ||
"direction": "in" | ||
} | ||
] | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
import logging | ||
|
||
|
||
def main(input) -> None: | ||
logging.info("Hello World") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.