getindata/dbt-airflow-factory

View on GitHub
dbt_airflow_factory/notifications/ms_teams_webhook_operator.py

Summary

Maintainability
A
50 mins
Test Coverage
A
95%

Function __init__ has 9 arguments (exceeds 6 allowed). Consider refactoring.
Open

    def __init__(
Severity: Major
Found in dbt_airflow_factory/notifications/ms_teams_webhook_operator.py - About 50 mins to fix

    Too many arguments (9/5)
    Open

        def __init__(

    Used when a function or method takes too many arguments.

    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 many instance attributes (8/7)
    Open

    class MSTeamsWebhookOperator(SimpleHttpOperator):

    Used when class has too many instance attributes, try to reduce this to get a simpler (and so easier to use) class.

    Unused argument 'context'
    Open

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

    Used when a function or method argument is not used.

    third party import from airflow.utils.decorators import apply_defaults should be placed before from dbt_airflow_factory.constants import IS_FIRST_AIRFLOW_VERSION
    Open

    from airflow.utils.decorators import apply_defaults

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

    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

    Import from airflow.utils.decorators import apply_defaults should be placed at the top of the module
    Open

    from airflow.utils.decorators import apply_defaults

    Used when code and imports are mixed

    Imports from package dbt_airflow_factory are not grouped
    Open

    from dbt_airflow_factory.notifications.ms_teams_webhook_hook import MSTeamsWebhookHook

    Used when imports are not grouped by packages

    There are no issues that match your filters.

    Category
    Status