Skip to content

Commit

Permalink
black fomatting v2
Browse files Browse the repository at this point in the history
  • Loading branch information
kkovary committed Feb 2, 2024
1 parent aba1823 commit c51690e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 32 deletions.
41 changes: 15 additions & 26 deletions datamol/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,15 @@ def open_datamol_data_file(


@overload
def freesolv(as_df: Literal[True] = True) -> pd.DataFrame:
...
def freesolv(as_df: Literal[True] = True) -> pd.DataFrame: ...


@overload
def freesolv(as_df: Literal[False] = False) -> List[Mol]:
...
def freesolv(as_df: Literal[False] = False) -> List[Mol]: ...


@overload
def freesolv(as_df: bool = True) -> Union[List[Mol], pd.DataFrame]:
...
def freesolv(as_df: bool = True) -> Union[List[Mol], pd.DataFrame]: ...


def freesolv(as_df: bool = True) -> Union[List[Mol], pd.DataFrame]:
Expand All @@ -102,18 +99,17 @@ def freesolv(as_df: bool = True) -> Union[List[Mol], pd.DataFrame]:


@overload
def cdk2(as_df: Literal[True] = True, mol_column: Optional[str] = "mol") -> pd.DataFrame:
...
def cdk2(as_df: Literal[True] = True, mol_column: Optional[str] = "mol") -> pd.DataFrame: ...


@overload
def cdk2(as_df: Literal[False] = False, mol_column: Optional[str] = "mol") -> List[Mol]:
...
def cdk2(as_df: Literal[False] = False, mol_column: Optional[str] = "mol") -> List[Mol]: ...


@overload
def cdk2(as_df: bool = True, mol_column: Optional[str] = "mol") -> Union[List[Mol], pd.DataFrame]:
...
def cdk2(
as_df: bool = True, mol_column: Optional[str] = "mol"
) -> Union[List[Mol], pd.DataFrame]: ...


def cdk2(as_df: bool = True, mol_column: Optional[str] = "mol"):
Expand All @@ -130,20 +126,17 @@ def cdk2(as_df: bool = True, mol_column: Optional[str] = "mol"):


@overload
def solubility(as_df: Literal[True] = True, mol_column: Optional[str] = "mol") -> pd.DataFrame:
...
def solubility(as_df: Literal[True] = True, mol_column: Optional[str] = "mol") -> pd.DataFrame: ...


@overload
def solubility(as_df: Literal[False] = False, mol_column: Optional[str] = "mol") -> List[Mol]:
...
def solubility(as_df: Literal[False] = False, mol_column: Optional[str] = "mol") -> List[Mol]: ...


@overload
def solubility(
as_df: bool = True, mol_column: Optional[str] = "mol"
) -> Union[List[Mol], pd.DataFrame]:
...
) -> Union[List[Mol], pd.DataFrame]: ...


def solubility(as_df: bool = True, mol_column: Optional[str] = "mol"):
Expand Down Expand Up @@ -184,13 +177,11 @@ def solubility(as_df: bool = True, mol_column: Optional[str] = "mol"):


@overload
def chembl_drugs(as_df: Literal[True] = True) -> pd.DataFrame:
...
def chembl_drugs(as_df: Literal[True] = True) -> pd.DataFrame: ...


@overload
def chembl_drugs(as_df: Literal[False] = False) -> List[Mol]:
...
def chembl_drugs(as_df: Literal[False] = False) -> List[Mol]: ...


def chembl_drugs(as_df: bool = True) -> Union[List[Mol], pd.DataFrame]:
Expand All @@ -210,13 +201,11 @@ def chembl_drugs(as_df: bool = True) -> Union[List[Mol], pd.DataFrame]:


@overload
def chembl_samples(as_df: Literal[True] = True) -> pd.DataFrame:
...
def chembl_samples(as_df: Literal[True] = True) -> pd.DataFrame: ...


@overload
def chembl_samples(as_df: Literal[False] = False) -> List[Mol]:
...
def chembl_samples(as_df: Literal[False] = False) -> List[Mol]: ...


def chembl_samples(as_df: bool = True) -> Union[List[Mol], pd.DataFrame]:
Expand Down
9 changes: 3 additions & 6 deletions datamol/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ def read_sdf(
max_num_mols: Optional[int] = ...,
discard_invalid: bool = ...,
n_jobs: Optional[int] = ...,
) -> List[Mol]:
...
) -> List[Mol]: ...


@overload
Expand All @@ -134,8 +133,7 @@ def read_sdf(
max_num_mols: Optional[int] = ...,
discard_invalid: bool = ...,
n_jobs: Optional[int] = ...,
) -> pd.DataFrame:
...
) -> pd.DataFrame: ...


@overload
Expand All @@ -152,8 +150,7 @@ def read_sdf(
max_num_mols: Optional[int] = ...,
discard_invalid: bool = ...,
n_jobs: Optional[int] = ...,
) -> Union[List[Mol], pd.DataFrame]:
...
) -> Union[List[Mol], pd.DataFrame]: ...


def read_sdf(
Expand Down

0 comments on commit c51690e

Please sign in to comment.