fc44c71d4aa2e8a5ef60effd4bfe7fb82dffbf17,src/pudl/extract/ferc1.py,Ferc1Datastore,get_file,#Ferc1Datastore#Any#Any#,175

Before Change


        
        dbc_path = f"{self.get_dir(year)}/{filename}"
        resource = next(self.get_resources("ferc1", year=year))
        z = zipfile.ZipFile(resource["path"])

        try:
            f = z.open(dbc_path)
        except KeyError:
            raise KeyError(f"{dbc_path} is not available in {year} archive.")

        return f

After Change


        return self.dbc_path[year]

    def get_file(self, year: int, filename: str):
        if year not in self._cache:
            self._cache[year] = self.datastore.get_zipfile_resource("ferc1", year=year)
        archive = self._cache[year]
        try:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: catalyst-cooperative/pudl
Commit Name: fc44c71d4aa2e8a5ef60effd4bfe7fb82dffbf17
Time: 2021-01-06
Author: rousik@gmail.com
File Name: src/pudl/extract/ferc1.py
Class Name: Ferc1Datastore
Method Name: get_file


Project Name: snipsco/snips-nlu
Commit Name: 5cb31b24772202d34175b7c7f42c6b1792dd6dd4
Time: 2017-03-31
Author: adrien.ball@snips.net
File Name: snips_nlu/preprocessing.py
Class Name:
Method Name: language_stems


Project Name: pyprob/pyprob
Commit Name: 37c522453b2522a498dd3db7fd5bd4458073e92d
Time: 2018-11-17
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/address_dictionary.py
Class Name: AddressDictionary
Method Name: __init__