dcc7249e3c05f3f2a13c39eb2d853b7195d64b02,sympy/assumptions/ask.py,,ask,#Any#Any#Any#,323

Before Change



    proposition = relcls_to_relpred(sympify(proposition))
    assumptions = relcls_to_relpred(sympify(assumptions))
    context = {relcls_to_relpred(a) for a in context}

    if isinstance(proposition, Predicate) or proposition.kind is not BooleanKind:
        raise TypeError("proposition must be a valid logical expression")

After Change


    if isinstance(assumptions, Predicate) or assumptions.kind is not BooleanKind:
        raise TypeError("assumptions must be a valid logical expression")

    binrelpreds = {Eq: Q.eq, Ne: Q.ne, Gt: Q.gt, Lt: Q.lt, Ge: Q.ge, Le: Q.le}
    if isinstance(proposition, AppliedPredicate):
        key, args = proposition.function, proposition.arguments
    elif proposition.func in binrelpreds:
        key, args = binrelpreds[proposition.func], proposition.args
    else:
        key, args = Q.is_true, (proposition,)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: sympy/sympy
Commit Name: dcc7249e3c05f3f2a13c39eb2d853b7195d64b02
Time: 2021-03-29
Author: jeesoo9595@snu.ac.kr
File Name: sympy/assumptions/ask.py
Class Name:
Method Name: ask


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: d7dc2f8b669b982e9c5856e11051b3114f2f6970
Time: 2020-03-10
Author: ruwa@google.com
File Name: perfkitbenchmarker/providers/gcp/gcp_bigtable.py
Class Name: GcpBigtableInstance
Method Name: _Exists


Project Name: mozilla/TTS
Commit Name: d733b902552295be41b1f88c8343b5e7b4ff8a9b
Time: 2020-09-16
Author: nicolas.mueller@aisec.fraunhofer.de
File Name: TTS/speaker_encoder/dataset.py
Class Name: MyDataset
Method Name: __parse_items