Update function comment and remove empty function
This commit is contained in:
parent
70cc659c14
commit
29ba43f1d9
|
@ -302,18 +302,15 @@ class City:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def load_compressed(compressed_city_filename, destination_filename) -> City:
|
def load_compressed(compressed_city_filename, destination_filename) -> City:
|
||||||
"""
|
"""
|
||||||
Load the pickle file name in the current city
|
Load a city from compressed_city_filename
|
||||||
:param source_file: Compressed pickle as source
|
:param compressed_city_filename: Compressed pickle as source
|
||||||
:param destination_file: Pickle file as destination
|
:param destination_filename: Pickle file as destination
|
||||||
:return: City
|
:return: City
|
||||||
"""
|
"""
|
||||||
with open(str(compressed_city_filename), 'rb') as source, open(str(destination_filename), 'wb') as destination:
|
with open(str(compressed_city_filename), 'rb') as source, open(str(destination_filename), 'wb') as destination:
|
||||||
destination.write(bz2.decompress(source.read()))
|
destination.write(bz2.decompress(source.read()))
|
||||||
return City.load(destination_filename)
|
return City.load(destination_filename)
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def load_compressed(city_filename, ):
|
|
||||||
|
|
||||||
def save(self, city_filename):
|
def save(self, city_filename):
|
||||||
"""
|
"""
|
||||||
Save a city into the given filename
|
Save a city into the given filename
|
||||||
|
|
Loading…
Reference in New Issue
Block a user