[ 
https://issues.apache.org/jira/browse/ATLAS-4658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Madhan Neethiraj resolved ATLAS-4658.
-------------------------------------
    Fix Version/s: 3.0.0
                   2.4.0
       Resolution: Fixed

[~dolfinus]  - thank you for the fix. The patch is now merged in following 
branches:

 
{noformat}
commit ad24235f492066378842cb0c1fbf9bde43da0391 (HEAD -> master, origin/master, 
origin/HEAD)
Author: Maxim Martynov <martinov_m...@mail.ru>
Date:   Mon Jun 5 12:07:51 2023 -0700

    ATLAS-4658: Python client - simply if clauses in AtlasClient.call_api

    Signed-off-by: Madhan Neethiraj <mad...@apache.org>
{noformat}
 
{noformat}
commit 8df8b41a5b9ce7410efe388f3184d109201080d4 (HEAD -> branch-2.0, 
origin/branch-2.0)
Author: Maxim Martynov <martinov_m...@mail.ru>
Date:   Mon Jun 5 12:07:51 2023 -0700

    ATLAS-4658: Python client - simply if clauses in AtlasClient.call_api

    Signed-off-by: Madhan Neethiraj <mad...@apache.org>
    (cherry picked from commit ad24235f492066378842cb0c1fbf9bde43da0391)
{noformat}

> base_client.py implementation is a bit messy
> --------------------------------------------
>
>                 Key: ATLAS-4658
>                 URL: https://issues.apache.org/jira/browse/ATLAS-4658
>             Project: Atlas
>          Issue Type: Improvement
>          Components: atlas-intg
>    Affects Versions: 2.1.0
>            Reporter: Maxim Martynov
>            Priority: Major
>             Fix For: 3.0.0, 2.4.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> atlas_client/client/base_client.py looks a bit messy:
> https://github.com/apache/atlas/blob/c1daaa44c3833be31c006753a2cf2f6f2e476cdc/intg/src/main/python/apache_atlas/client/base_client.py#L79-L120
>  # There is no need to make conditions with mapping between HTTPMethod enum 
> values and corresponding {{requests.Session}} methods - there is a 
> {{requests.Session.request}} method which accepts HTTP method as argument
>  # There is no need to use {{elif}} in conditions if previous clauses are 
> ended with {{return}} or {{raise}} statements
>  # There is not need to use {{logger.isEnabledFor(logging.DEBUG)}} before 
> calling {{{}logger.debug{}}}, this is already done in {{.debug}} method itself
>  # Use {{{}logging{}}}, not {{print}}
>  # {{{{logging.exception}}}} already shows full exception traceback, no need 
> to explicitly show add it into a logging message
>  
> I've creates pull request with a fix for all these items:
> https://github.com/apache/atlas/pull/158/files



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to