Skip to content

Commit

Permalink
Fix a few pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Jan 6, 2025
1 parent f286398 commit 3223cdd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
14 changes: 8 additions & 6 deletions taxcalc/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,12 +1044,14 @@ def pch_graph(self, calc, pop_quantiles=False):
data = pch_graph_data(vdf, year=self.current_year,
pop_quantiles=pop_quantiles)
# construct figure from data
fig = pch_graph_plot(data,
width=850,
height=500,
xlabel='',
ylabel='',
title='')
# (see comment at end of pch_graph_plot function in utils.py)
fig = pch_graph_plot( # pylint: disable=assignment-from-no-return
data,
width=850,
height=500,
xlabel='',
ylabel='',
title='')
return fig

REQUIRED_REFORM_KEYS = set(['policy'])
Expand Down
9 changes: 7 additions & 2 deletions taxcalc/tests/test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,14 @@ def magic_calc2(x, y, z):
return (a, b)


class Foo:
class Foo: # pylint: disable=too-many-instance-attributes
"""Foo class"""
# pylint: disable=too-few-public-methods,too-many-instance-attributes

def faux_method1(self):
""" Foo method"""

def faux_method2(self):
""" Foo method"""


@iterate_jit(nopython=True)
Expand Down
6 changes: 3 additions & 3 deletions taxcalc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1314,10 +1314,10 @@ def pch_graph_plot(data,
# bokeh cannot save this fig saying:
# bokeh.core.serialization.SerializationError:
# can't serialize <class 'range'>
# so the "return fig" statement is replaced by "return None" until
# the above logic can be made compatible with modern bokeh packages
# so the "return fig" statement is replaced by Python's implicit
# "return None" until the above logic can be made compatible with
# modern bokeh packages
# return fig
return None


def write_graph_file(figure, filename, title):
Expand Down

0 comments on commit 3223cdd

Please sign in to comment.