Skip to content

Commit

Permalink
ignore typechecking
Browse files Browse the repository at this point in the history
  • Loading branch information
tompollard committed May 10, 2023
1 parent 21e1a7f commit 3ad1591
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tableone/tableone.py
Expand Up @@ -218,7 +218,7 @@ def __init__(self, data: pd.DataFrame,
row_percent: bool = False, display_all: bool = False,
dip_test: bool = False, normal_test: bool = False,
tukey_test: bool = False,
pval_threshold: float = None) -> None:
pval_threshold: Optional[float] = None) -> None:

# labels is now rename
if labels is not None and rename is not None:
Expand Down Expand Up @@ -1430,10 +1430,10 @@ def _create_tableone(self, data):
table['P-Value (adjusted)'] = table['P-Value (adjusted)'].apply(
'{:.3f}'.format).astype(str)
table.loc[table['P-Value (adjusted)'] == '0.000',
'P-Value (adjusted)'] = '<0.001'
'P-Value (adjusted)'] = '<0.001'

if self._pval_threshold:
table.loc[asterisk_mask, 'P-Value (adjusted)'] = table['P-Value (adjusted)'][asterisk_mask].astype(str)+"*"
table.loc[asterisk_mask, 'P-Value (adjusted)'] = table['P-Value (adjusted)'][asterisk_mask].astype(str)+"*" # type: ignore

elif self._pval:
if self._pval_threshold:
Expand All @@ -1444,7 +1444,7 @@ def _create_tableone(self, data):
table.loc[table['P-Value'] == '0.000', 'P-Value'] = '<0.001'

if self._pval_threshold:
table.loc[asterisk_mask, 'P-Value'] = table['P-Value'][asterisk_mask].astype(str)+"*"
table.loc[asterisk_mask, 'P-Value'] = table['P-Value'][asterisk_mask].astype(str)+"*" # type: ignore

# round smd columns and convert to string
if self._smd:
Expand Down

0 comments on commit 3ad1591

Please sign in to comment.