Skip to content

Commit

Permalink
fixing pulint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaalbashir committed Oct 18, 2023
1 parent 8288474 commit 501b890
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions acro/acro_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def survival_plot( # pylint: disable=too-many-arguments,too-many-locals
)
return plot

def hist(
def hist( # pylint: disable=too-many-arguments,too-many-locals
self,
data,
column,
Expand Down Expand Up @@ -623,7 +623,8 @@ def hist(
status = "fail"
if self.suppress:
logger.warning(
f"Histogram will not be shown as the {column} column is disclosive."
"Histogram will not be shown as the %s column is disclosive.",
column,
)
else: # pragma: no cover
data.hist(
Expand Down Expand Up @@ -664,7 +665,7 @@ def hist(
legend=legend,
**kwargs,
)
logger.info(f"status: {status}")
logger.info("status: %s", status)

# create the summary
min_value = data[column].min()
Expand Down
2 changes: 1 addition & 1 deletion acro/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def serialize_output(self, path: str = "outputs") -> list[str]:
if os.path.exists(filename):
shutil.copy(filename, path)
output.append(Path(filename).name)
if self.output_type == "survival plot" or self.output_type == "histogram":
if self.output_type in ["survival plot", "histogram"]:
for filename in self.output:
if os.path.exists(filename):
output.append(Path(filename).name)
Expand Down
4 changes: 2 additions & 2 deletions test/test_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ def test_crosstab_with_manual_totals_with_suppression_with_two_aggfunc(

def test_histogram_discolsive(data, acro, caplog):
"""Test a discolsive histogram."""
filename = r"acro_artifacts\histogram_0.png"
filename = os.path.normpath("acro_artifacts/histogram_0.png")
_ = acro.hist(data, "inc_grants")
assert os.path.exists(filename)
acro.add_exception("output_0", "Let me have it")
Expand All @@ -888,7 +888,7 @@ def test_histogram_discolsive(data, acro, caplog):

def test_histogram_non_disclosive(data, acro):
"""Test a non discolsive histogram."""
filename = r"acro_artifacts\histogram_0.png"
filename = os.path.normpath("acro_artifacts/histogram_0.png")
_ = acro.hist(data, "inc_grants", bins=1)
assert os.path.exists(filename)
acro.add_exception("output_0", "Let me have it")
Expand Down

0 comments on commit 501b890

Please sign in to comment.