Skip to content

Commit

Permalink
style: use tuple for endswith
Browse files Browse the repository at this point in the history
  • Loading branch information
james-garner-canonical committed Dec 4, 2024
1 parent 3745426 commit 865aad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/charms/operator_libs_linux/v0/apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ def filename(self, fname: str) -> None:
Args:
fname: a filename to write the repository information to.
"""
if not fname.endswith(".list") or fname.endswith(".sources"):
if not fname.endswith((".list", ".sources")):
raise InvalidSourceError("apt source filenames should end in .list or .sources!")
self._filename = fname

Expand Down

0 comments on commit 865aad8

Please sign in to comment.