Skip to content

Commit 545739c

Browse files
gabrielwoltahaislam
authored andcommitted
#802 move import to the top
1 parent 653de0e commit 545739c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dags/dag_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# -*- coding: utf-8 -*-
33
"""Common functions used in most of the DAGs."""
44
import os
5+
import re
56
from typing import Optional, Callable, Any, Union
67
from airflow.models import Variable
78
from airflow.hooks.base import BaseHook
@@ -140,8 +141,7 @@ def get_readme_docmd(readme_path, dag_name):
140141
'<!-- dag_name_doc_md -->' before and after the relevant section.
141142
"""
142143

143-
import re
144144
contents = open(readme_path, 'r').read()
145145
doc_md_key = '<!-- ' + dag_name + '_doc_md -->'
146146
doc_md_regex = '(?<=' + doc_md_key + '\n)[\s\S]+(?=\n' + doc_md_key + ')'
147-
return re.findall(doc_md_regex, contents)[0]
147+
return re.findall(doc_md_regex, contents)[0]

0 commit comments

Comments
 (0)