Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lpozo committed Oct 30, 2023
1 parent 5e497d9 commit 852d2b6
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions python-double-underscore/article_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,3 @@ def update_pub_date(self, pub_date=None):
def compute_age(self):
now = datetime.datetime.now()
return now - self.pub_date


class Article:
def __init__(self, title, author, pub_date=None):
self.title = title
self.author = author
self.pub_date = self.__update_pub_date(pub_date)

def update_pub_date(self, pub_date=None):
if pub_date is None:
date = datetime.datetime.now()
else:
date = datetime.datetime.fromisoformat(pub_date)
return date

__update_pub_date = update_pub_date

def compute_age(self):
now = datetime.datetime.now()
return now - self.pub_date

0 comments on commit 852d2b6

Please sign in to comment.