aritra24 commented on code in PR #50142: URL: https://github.com/apache/airflow/pull/50142#discussion_r2075827152
########## task-sdk/src/airflow/sdk/definitions/dag.py: ########## @@ -185,7 +185,18 @@ def _convert_doc_md(doc_md: str | None) -> str | None: return fh.read() except FileNotFoundError: return doc_md + return doc_md + +def _clean_doc_md(doc_md: str) -> str: + # alternative to using math.inf, the linter doesn't like inf being a float + strip_count = len(doc_md) + + for line in doc_md.split("\n"): + if line != "": + strip_count = min(strip_count, len(line) - len(line.lstrip())) + if strip_count > 0: + doc_md = "\n".join([line[strip_count:] for line in doc_md.split("\n")]) Review Comment: @pierrejeambrun, moved to api side. let me know if this sounds good to you. -- 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. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org