a118c4aa15f23e2efbe5e69f8b254074dc7e6446,app/grandchallenge/core/validators.py,ExtensionValidator,_validate_filepath,#ExtensionValidator#Any#,69

Before Change


                self._validate_filepath(v.name)

    def _validate_filepath(self, s):
        _, extension = os.path.splitext(s)
        if extension.lower() not in self.allowed_extensions:
            raise ValidationError(
                f"File of type {extension} is not supported."
                " Allowed types are "

After Change


                self._validate_filepath(v.name)

    def _validate_filepath(self, s):
        extensions = Path(s).suffixes
        extension = "".join(extensions)

        if extension.lower() not in self.allowed_extensions:
            raise ValidationError(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: comic/grand-challenge.org
Commit Name: a118c4aa15f23e2efbe5e69f8b254074dc7e6446
Time: 2018-12-05
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/core/validators.py
Class Name: ExtensionValidator
Method Name: _validate_filepath


Project Name: gboeing/osmnx
Commit Name: 58306568739f409d295cdf37bfd38a1ef0de7b3e
Time: 2020-12-04
Author: 6774676+eumiro@users.noreply.github.com
File Name: osmnx/plot.py
Class Name:
Method Name: _save_and_show


Project Name: hyperspy/hyperspy
Commit Name: 629167ee324a0b955ef46cd5a0cd7bb504ef8c44
Time: 2020-09-09
Author: tjof2@cam.ac.uk
File Name: hyperspy/misc/io/tools.py
Class Name:
Method Name: append2pathname