94efc44d702aecfdb88db83b13c4e3382b5639f0,app/grandchallenge/core/validators.py,ExtensionValidator,_validate_filepath,#ExtensionValidator#,69

Before Change


        extensions = Path(s).suffixes
        extension = "".join(extensions)

        if extension.lower() not in self.allowed_extensions:
            raise ValidationError(
                f"File of type {extension} is not supported."
                " Allowed types are "

After Change


        extensions = Path(s).suffixes
        extension = "".join(extensions).lower()

        if not any(extension.endswith(e) for e in self.allowed_extensions):
            raise ValidationError(
                f"File of type {extension} is not supported."
                " Allowed types are "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: comic/grand-challenge.org
Commit Name: 94efc44d702aecfdb88db83b13c4e3382b5639f0
Time: 2019-05-28
Author: code@jmsmkn.com
File Name: app/grandchallenge/core/validators.py
Class Name: ExtensionValidator
Method Name: _validate_filepath


Project Name: facebookresearch/DrQA
Commit Name: a9f338555a1342ec0dc8e5b4bdf50d5968278d71
Time: 2018-03-28
Author: 67573430@qq.com
File Name: drqa/tokenizers/spacy_tokenizer.py
Class Name: SpacyTokenizer
Method Name: __init__


Project Name: jazzband/django-debug-toolbar
Commit Name: 2c5fae5c5582cdc00535ca16b0b2f5e3d27c6244
Time: 2013-11-26
Author: aymeric.augustin@m4x.org
File Name: debug_toolbar/middleware.py
Class Name: DebugToolbarMiddleware
Method Name: process_response