Skip to content

Commit

Permalink
Fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
Savones committed Nov 29, 2023
1 parent 869ad86 commit 3cae167
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/entities/cite.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def __init__(
# """

# return f"""
# \nID: {self.id:15} TYYPPI: {self.type:8} KIRJOITTAJAT: {self.authors} KENTÄT: {self.fields}
# \nID: {self.id:15} TYYPPI: {self.type:8}
# KIRJOITTAJAT: {self.authors} KENTÄT: {self.fields}
# """

# def __repr__(self):
Expand All @@ -47,5 +48,6 @@ def __init__(
# str: Viitteen tiedot
# """
# return f"""
# ID: {self.id:15} TYYPPI: {self.type:8} KIRJOITTAJAT: {self.authors} KENTÄT: {self.fields}
# ID: {self.id:15} TYYPPI: {self.type:8}
# KIRJOITTAJAT: {self.authors} KENTÄT: {self.fields}
# """
2 changes: 1 addition & 1 deletion src/services/filter_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def filter_by_id(self, id) -> list[Cite]:
cites = self.repository.get_all_cites()
if int(id) < 1:
return cites
filtered_cites = [cite for cite in cites if id in [id for id in cite.id]]
filtered_cites = [cite for cite in cites if id in list(cite.id)]
return filtered_cites

# def filter_by_tag(tag: str) -> list[Cite]:
Expand Down

0 comments on commit 3cae167

Please sign in to comment.