Skip to content

Commit

Permalink
move type() to isinstance()
Browse files Browse the repository at this point in the history
  • Loading branch information
geier committed Nov 7, 2023
1 parent bea920f commit d917f21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions khal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def get_wrapped_text(widget: urwid.AttrMap) -> str:
def human_formatter(format_string, width=None, colors=True):
"""Create a formatter that formats events to be human readable."""
def fmt(rows):
single = type(rows) == dict
single = isinstance(rows, dict)
if single:
rows = [rows]
results = []
Expand Down Expand Up @@ -231,7 +231,7 @@ def json_formatter(fields):
fields = CONTENT_ATTRIBUTES

def fmt(rows):
single = type(rows) == dict
single = isinstance(rows, dict)
if single:
rows = [rows]

Expand Down

0 comments on commit d917f21

Please sign in to comment.