Showing 74 of 86 total issues
Method could be a function Open
def _create(self, args: List[str], name: str) -> BashOperator:
- Read upRead up
- Exclude checks
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__(
- Read upRead up
- Exclude checks
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 (
- Read upRead up
- Exclude checks
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 (
- Read upRead up
- Exclude checks
Used when code and imports are mixed
Similar lines in 2 files Open
"""dbt_airflow_factory module."""
- Read upRead up
- Exclude checks
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):
- Read upRead up
- Exclude checks
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):
- Read upRead up
- Exclude checks
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."""
- Read upRead up
- Exclude checks
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."""
- Read upRead up
- Exclude checks
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:
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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(
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Too few public methods (1/2) Open
class NotificationHandlersFactory:
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
Used when code and imports are mixed
Similar lines in 2 files Open
"""dbt_airflow_factory module."""
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
Used when a module has no docstring.Empty modules do not require a docstring.
Missing module docstring Open
from dataclasses import dataclass
- Read upRead up
- Exclude checks
Used when a module has no docstring.Empty modules do not require a docstring.
Too many local variables (19/15) Open
def __init__(
- Read upRead up
- Exclude checks
Used when a function or method has too many local variables.