Closed atombrella closed 20 hours ago
Thank you for your contribution @atombrella! We will review the pull request and get back to you soon.
API change check
API changes are not detected in this pull request.
I don't really understand the test failures, and why this PR cause failing builds.
Note that there are tons of https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow in the code! They are also highlighted as warnings in the test runs.
Thanks for opening this PR @atombrella!
Here is my analysis of the failing steps:
@iscai-msft Thank you!
My newest commit was done using this commit.
azure-sdk-for-python/scripts/devops_tasks on feature/dict_list_literal [!] via azure-sdk
➜ tox run -e black -c ../../eng/tox/tox.ini -- .
It changed lines I didn't touch in this PR. Maybe it'd be better to reformat and add the git-commit hash as described in https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view ? Actually, it seems a lot of the code base hasn't been reformatted according to black. At least black started formatting lots of files inside when I ran it inside the sdk
-folder and then canceled it quickly.
@atombrella i think some of the black formatting of files not originally touched by you have made their way into the PR, can you remove those? Thanks!
@iscai-msft I deleted the commit. black then fails :/
I think the approach outlined in https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view is a good solution for the failing black/formatting tests. black
formats boatloads of lines I didn't touch in my changes.
Note that snippets similar (and identical) to this is also in various places of the code-base.
# Consider this is real string
try:
if isinstance(data, unicode): # type: ignore
return data
except NameError:
return str(data)
else:
return str(data)
@atombrella are you able to run the black command from within each of the sdks you're touching with your changes, instead of over the entire repo? Thank you so much again for doing this!
I am not a fan of this! git blame
will be useless after this :(
I understand your frustration, it does look like black
has been behaving weird in our pipelines. @scbedd is actually working on this in a separate pr (linked here). He should be almost done with this PR, once this is in, do you mind pulling and trying again to see if the black issues are fixed?
Thank you so much again for your contribution, and apologies for it not going super smoothly, but your work is greatly appreciated.
talked with @scbedd offline and we'll handle re-running this PR ourselves once his fix is in. Thanks for your patience
/azp run python - pullrequest
Ok. Analyze
is now clean after my changes to black
.
The test failures on azure-cosmos
are known. @iscai-msft please double-check my verification before signoff, but if you only see setup failures invoking azure-cosmos
as part of python - pullrequest
, then IMO this PR is ready to go in.
yep this looks good. Thanks so much @scbedd and @atombrella for doing this awesome work! I'm going to approve and @atombrella you should be able to merge when you're ready. Please ping if cosmos ends up blocking your ability to merge
Thanks so much again @atombrella for all of your work and patience
@iscai-msft @scbedd I do not have merge rights to the Azure organization.
/check-enforcer validate
For help using check enforcer, see https://aka.ms/azsdk/checkenforcer
Available commands:
/check-enforcer evaluate
- Re-evaluate existing pipeline statuses for PR/check-enforcer override
- Ignore any pipeline missing or failed statuses for PR/check-enforcer help
- Add this commentIf you are initializing a new service, follow the new service docs. If no Azure Pipelines are desired, run /check-enforcer override
.
/check-enforcer override
ok merged it, thank you so much again for your contribution and your patience @atombrella. Thanks for working with us, it's been a pleasure on our part
Description
from __future__ import print_function, unicode_literals, division
is a thing of the past!dict()
->{}
andlist()
->[]
are improvements both in terms of Pythonic code and speed: https://switowski.com/blog/dict-function-vs-literal-syntax/u"string"
markers I could find.It's quite time-consuming to change instances of
dict(a="hello", b="world")
and I don't plan on doing that!All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines