getindata/dbt-airflow-factory

View on GitHub

Showing 74 of 86 total issues

Method could be a function
Open

    def _create(self, args: List[str], name: str) -> BashOperator:

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

Too many arguments (9/5)
Open

    def __init__(

Used when a function or method takes too many arguments.

Imports from package dbt_airflow_factory are not grouped
Open

from dbt_airflow_factory.notifications.ms_teams_webhook_operator import (

Used when imports are not grouped by packages

Import from dbt_airflow_factory.notifications.ms_teams_webhook_operator import MSTeamsWebhookOperator should be placed at the top of the module
Open

from dbt_airflow_factory.notifications.ms_teams_webhook_operator import (

Used when code and imports are mixed

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.notifications.msteamswebhookhook:58 ==dbtairflowfactory.notifications.msteamswebhookoperator:65 self.message = message self.subtitle = subtitle self.buttontext = buttontext self.buttonurl = buttonurl self.themecolor = themecolor self.proxy = proxy

Too few public methods (1/2)
Open

class MSTeamsWebhookOperator(SimpleHttpOperator):

Used when class has too few public methods, so be sure it's really worth it.

Too few public methods (1/2)
Open

class EcsPodOperatorBuilder(DbtRunOperatorBuilder):

Used when class has too few public methods, so be sure it's really worth it.

Similar lines in 3 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:36 ==dbtairflowfactory.ecs.ecsoperator:25 ==dbtairflowfactory.k8s.k8soperator:44 def create( self, name: str, command: str, model: Optional[str] = None, additionaldbt_args: Optional[List[str]] = None, ) -> BaseOperator:

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.notifications.msteamswebhookhook:43 ==dbtairflowfactory.notifications.msteamswebhookoperator:50 def init( self, httpconnid: Optional[str] = None, webhooktoken: Optional[str] = None, message: str = , subtitle: str =, buttontext: str = , button_url: str =, theme_color: str = 00FF00, proxy: Optional[str] = None,

Missing class docstring
Open

class NotificationHandlersFactory:

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

Import from dbt_airflow_factory.operator import DbtRunOperatorBuilder, EphemeralOperator should be placed at the top of the module
Open

from dbt_airflow_factory.operator import DbtRunOperatorBuilder, EphemeralOperator

Used when code and imports are mixed

third party import from dbt_graph_builder.graph import DbtManifestGraph should be placed before from dbt_airflow_factory.constants import IS_FIRST_AIRFLOW_VERSION
Open

from dbt_graph_builder.graph import DbtManifestGraph

Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)

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.

Line too long (178/100)
Open

            # Since Airflow 2.3, https://github.com/apache/airflow/blob/12c3c39d1a816c99c626fe4c650e88cf7b1cc1bc/airflow/providers/cncf/kubernetes/CHANGELOG.rst#500  # noqa: E501

Used when a line is longer than a given number of characters.

Too few public methods (1/2)
Open

class NotificationHandlersFactory:

Used when class has too few public methods, so be sure it's really worth it.

Import from dbt_airflow_factory.notifications.ms_teams_webhook_hook import MSTeamsWebhookHook should be placed at the top of the module
Open

from dbt_airflow_factory.notifications.ms_teams_webhook_hook import MSTeamsWebhookHook

Used when code and imports are mixed

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:36 ==dbtairflowfactory.k8s.k8soperator:44 def create( self, name: str, command: str, model: Optional[str] = None, additionaldbtargs: Optional[List[str]] = None, ) -> BaseOperator: return self.create(self.preparearguments(command, model, additionaldbt_args), name)

def preparearguments( self, command: str, model: Optional[str], additionaldbtargs: Optional[List[str]], ) -> List[str]: args = [

Missing module docstring
Open

from dbt_airflow_factory.bash.bash_parameters import BashExecutionParameters

Used when a module has no docstring.Empty modules do not require a docstring.

Missing module docstring
Open

from dataclasses import dataclass

Used when a module has no docstring.Empty modules do not require a docstring.

Too many local variables (19/15)
Open

    def __init__(

Used when a function or method has too many local variables.

Severity
Category
Status
Source
Language