Skip to content

Commit

Permalink
Remove unnecessary class abstraction
Browse files Browse the repository at this point in the history
  • Loading branch information
augusto-herrmann committed Aug 22, 2024
1 parent 26c2a3a commit 12bdc44
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/parsers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Abstract and concrete classes to parse DAG configuration from a file."""

from abc import ABC, abstractmethod
import ast
from dataclasses import dataclass
import textwrap
Expand All @@ -10,6 +9,8 @@
from airflow import Dataset
from airflow.models import Variable

from schemas import RoDouConfig


@dataclass
class SearchConfig:
Expand Down Expand Up @@ -52,15 +53,7 @@ class DAGConfig:
no_results_found_text: str


class FileParser(ABC):
"""Abstract class to build file parsers with DAG configuration."""

@abstractmethod
def parse(self):
pass


class YAMLParser(FileParser):
class YAMLParser:
"""Parses YAML file and get the DAG parameters.
It guarantees that mandatory fields are in place and are properly
Expand Down

0 comments on commit 12bdc44

Please sign in to comment.