Skip to content

Commit

Permalink
Revert "Lint again"
Browse files Browse the repository at this point in the history
This reverts commit 088365d.

Signed-off-by: Laura Couto <[email protected]>
  • Loading branch information
lrcouto committed Oct 31, 2024
1 parent bc26506 commit a87df2e
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


# {{ cookiecutter.python_package }} documentation build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


# {{ cookiecutter.python_package }} documentation build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""Project pipelines."""
from typing import Dict

from kedro.framework.project import find_pipelines
from kedro.pipeline import Pipeline


def register_pipelines() -> Dict[str, Pipeline]:
def register_pipelines() -> dict[str, Pipeline]:
"""Register the project's pipelines.
Returns:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import Dict, Tuple

import pandas as pd

Expand All @@ -19,7 +18,7 @@ def _parse_money(x: pd.Series) -> pd.Series:
return x


def preprocess_companies(companies: pd.DataFrame) -> Tuple[pd.DataFrame, Dict]:
def preprocess_companies(companies: pd.DataFrame) -> tuple[pd.DataFrame, dict]:
"""Preprocesses the data for companies.
Args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import logging
from typing import Dict, Tuple

import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.metrics import max_error, mean_absolute_error, r2_score
from sklearn.model_selection import train_test_split


def split_data(data: pd.DataFrame, parameters: Dict) -> Tuple:
def split_data(data: pd.DataFrame, parameters: dict) -> tuple:
"""Splits data into features and targets training and test sets.
Args:
Expand Down Expand Up @@ -41,7 +40,7 @@ def train_model(X_train: pd.DataFrame, y_train: pd.Series) -> LinearRegression:

def evaluate_model(
regressor: LinearRegression, X_test: pd.DataFrame, y_test: pd.Series
) -> Dict[str, float]:
) -> dict[str, float]:
"""Calculates and logs the coefficient of determination.
Args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


# {{ cookiecutter.python_package }} documentation build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""Project pipelines."""
from typing import Dict

from kedro.framework.project import find_pipelines
from kedro.pipeline import Pipeline


def register_pipelines() -> Dict[str, Pipeline]:
def register_pipelines() -> dict[str, Pipeline]:
"""Register the project's pipelines.
Returns:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import logging
from typing import Dict, Tuple

import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.metrics import r2_score
from sklearn.model_selection import train_test_split


def split_data(data: pd.DataFrame, parameters: Dict) -> Tuple:
def split_data(data: pd.DataFrame, parameters: dict) -> tuple:
"""Splits data into features and targets training and test sets.
Args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


# {{ cookiecutter.python_package }} documentation build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""Project pipelines."""
from typing import Dict

from kedro.framework.project import find_pipelines
from kedro.pipeline import Pipeline


def register_pipelines() -> Dict[str, Pipeline]:
def register_pipelines() -> dict[str, Pipeline]:
"""Register the project's pipelines.
Returns:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import Dict, Tuple

import pandas as pd
from pyspark.sql import Column
Expand All @@ -24,7 +23,7 @@ def _parse_money(x: Column) -> Column:
return x


def preprocess_companies(companies: SparkDataFrame) -> Tuple[SparkDataFrame, Dict]:
def preprocess_companies(companies: SparkDataFrame) -> tuple[SparkDataFrame, dict]:
"""Preprocesses the data for companies.
Args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import logging
from typing import Dict, Tuple

import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.metrics import max_error, mean_absolute_error, r2_score
from sklearn.model_selection import train_test_split


def split_data(data: pd.DataFrame, parameters: Dict) -> Tuple:
def split_data(data: pd.DataFrame, parameters: dict) -> tuple:
"""Splits data into features and targets training and test sets.
Args:
Expand Down Expand Up @@ -41,7 +40,7 @@ def train_model(X_train: pd.DataFrame, y_train: pd.Series) -> LinearRegression:

def evaluate_model(
regressor: LinearRegression, X_test: pd.DataFrame, y_test: pd.Series
) -> Dict[str, float]:
) -> dict[str, float]:
"""Calculates and logs the coefficient of determination.
Args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


# {{ cookiecutter.python_package }} documentation build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"""Project pipelines."""
from typing import Dict

from kedro.framework.project import find_pipelines
from kedro.pipeline import Pipeline


def register_pipelines() -> Dict[str, Pipeline]:
def register_pipelines() -> dict[str, Pipeline]:
"""Register the project's pipelines.
Returns:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import logging
from typing import Dict, Tuple

import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.metrics import r2_score
from sklearn.model_selection import train_test_split


def split_data(data: pd.DataFrame, parameters: Dict) -> Tuple:
def split_data(data: pd.DataFrame, parameters: dict) -> tuple:
"""Splits data into features and targets training and test sets.
Args:
Expand Down

0 comments on commit a87df2e

Please sign in to comment.