You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/18 16:03:15 UTC

[GitHub] [airflow] zappallot edited a comment on issue #13570: `ImportChangesRule` raises false positives

zappallot edited a comment on issue #13570:
URL: https://github.com/apache/airflow/issues/13570#issuecomment-781445228


   I had the same problem with too many false positives and applied the change proposed.
   Problem is, it now does not find import statements like this:
   `from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator`
   because `change.old_path` would expect a string like `airflow.contrib.operators.kubernetes_pod_operator.KubernetesPodOperator`.
   
   Changing `change.old_path` to `".".join(change.old_path.split(".")[0:-1])` worked for me, as it cuts away the classname from the path. But I cannot say if this is good enough for the checker, but just `changes.old_path` would find not enough deprecated imports.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org