Hi all, i have been working on some python cleanup...
# contribute-code
m
Hi all, i have been working on some python cleanup. And its a big refactor (non breaking) PR, and only stuck on one test failing and can’t resolve, Can someone help me look into this? https://github.com/datahub-project/datahub/pull/5113
s
It seems that this issue is completely unrelated to your changes - when the function post_entity was added to cli_utils.py seven months ago the type for the return value was (and still is) a Dict, but the status_code of the response is returned, which is a integer (see also here: https://github.com/datahub-project/datahub/blame/1e60f1b3b5f95c301587d4a8bd865b88d580553f/metadata-ingestion/src/datahub/cli/cli_utils.py#L557)
plus1 1
Simply changing the return type to an int should be enough 🙂
m
Thanks @shy-scooter-37097 !
m
Ledgend @shy-scooter-37097
s
@mammoth-dinner-7870 Can you help me understand what prompted this refactor? Are you using some linting tool which suggested these changes? Just trying to understand whether we can incorporate that into our workflow
m
@square-activity-64562 yeap, i have a linting and python workflow both IDE but also checking in terms of unit testing
Id be more than happy to setup a workflow for Python builds
And PR this through
Hey guys, PR is ready to hit test again