Skip to content

Commit

Permalink
fix pycodestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
GideonBature committed Oct 15, 2023
1 parent 3b3fa86 commit 931fe97
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions console.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,24 @@ def do_update(self, line):
setattr(obj, attr_name, attr_value)
storage.save()

def default(self, line):
"""Retrieves all instances of a class
Usage: <class name>.all()
Args:
<class name>: The class name
all(): the method
Returns:
None
"""
args = line.split('.')

cls_name = args[0]
cls_method = args[1]

if cls_name in self.__classes:
if cls_method == "all()":
self.do_all(cls_name)

def postcmd(self, stop, line):
"""Program exit cleanly in response to the quit command
"""
Expand Down

0 comments on commit 931fe97

Please sign in to comment.