getindata/dbt-airflow-factory

View on GitHub

Showing 74 of 86 total issues

Missing class docstring
Open

class EcsPodOperatorBuilder(DbtRunOperatorBuilder):

Used when a class has no docstring.Even an empty class must have a docstring.

Method could be a function
Open

    def create_failure_handler(self, handlers_config: dict) -> Callable:

Used when a method doesn't use its bound instance, and so could be written as a function.

Import from dbt_graph_builder.builder import GraphConfiguration, create_tasks_graph should be placed at the top of the module
Open

from dbt_graph_builder.builder import GraphConfiguration, create_tasks_graph

Used when code and imports are mixed

Import from dbt_graph_builder.node_type import NodeType should be placed at the top of the module
Open

from dbt_graph_builder.node_type import NodeType

Used when code and imports are mixed

Imports from package airflow are not grouped
Open

    from airflow.utils.task_group import TaskGroup

Used when imports are not grouped by packages

Imports from package airflow are not grouped
Open

    from airflow.hooks.http_hook import HttpHook

Used when imports are not grouped by packages

Either all return statements in a function should return an expression, or none of them should.
Open

        def failure_handler(context: Any) -> None:

According to PEP8, if any return statement returns an expression, any return statements where no value is returned should explicitly state this as return None, and an explicit return statement should be present at the end of the function (if reachable)

Missing function or method docstring
Open

    def create_config(

Used when a function or method has no docstring.Some special methods like init do not require a docstring.

Missing class docstring
Open

@dataclass(frozen=True)

Used when a class has no docstring.Even an empty class must have a docstring.

Missing function or method docstring
Open

    def create_failure_handler(self, handlers_config: dict) -> Callable:

Used when a function or method has no docstring.Some special methods like init do not require a docstring.

Similar lines in 2 files
Open

"""dbt_airflow_factory module."""
Severity: Info
Found in setup.py by pylint

Indicates that a set of similar lines has been detected among multiple file. This usually means that the code should be refactored to avoid this duplication. ==dbtairflowfactory.bash.bashoperator:53 ==dbtairflowfactory.k8s.k8soperator:61 f{command}, f--target {self.dbt_execution_env_parameters.target}, f'--vars {self.dbt_execution_env_parameters.vars}', f--project-dir {self.dbt_execution_env_parameters.project_dir_path}, f--profiles-dir {self.dbt_execution_env_parameters.profile_dir_path}, ] if model: args += [f--select {model}] if additionaldbtargs: args += additionaldbtargs return [.join(args)]

Import outside toplevel (kubernetes.client)
Open

            from kubernetes.client import models as k8s

Used when an import statement is used anywhere other than the module toplevel. Move this import to the top of the file.

Unnecessary elif after return
Open

                if handler_definition["type"] == "slack":

Used in order to highlight an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement.

Unused argument 'context'
Open

    def execute(self, context: Any) -> None:

Used when a function or method argument is not used.

Severity
Category
Status
Source
Language