Returns true if the given lookup is a valid linguist lookup.
431260
def is_linguist_lookup(self, lookup):
        
        field = utils.get_field_name_from_lookup(lookup)

        # To keep default behavior with "FieldError: Cannot resolve keyword".
        if (
            field not in self.concrete_field_names
            and field in self.linguist_field_names
        ):
            return True

        return False
828171
private static boolean isObjectLiteralThatCanBeSkipped(JSType t) {
    t = t.restrictByNotNullOrUndefined();
    return t.isRecordType() || t.isLiteralObject();
  }
29020
def bool_lookup(value)
      return 'yes' if %w(true yes yep).include? value.to_s.downcase
      return 'no' if %w(false no nope).include? value.to_s.downcase
      value
    end
1337873
def is_valid(identifier):
    

    return (
        isinstance(identifier, six.string_types)
        and bool(NAME_RE.search(identifier))
        and not keyword.iskeyword(identifier)
    )
527372
def is_valid(data):
        
        return bool(data) and \
            isinstance(data, dict) and \
            bool(data.get("swagger")) and \
            isinstance(data.get('paths'), dict)
992592
def is_correctness_available(self, question_id):
        """"""
        response = self.get_response(question_id)
        if response.is_answered():
            item = self._get_item(response.get_item_id())
            return item.is_correctness_available_for_response(response)
        return False
1256140
def _valid_encoding(elt):
    '''
    '''
    enc = _find_encstyle(elt)
    if not enc or enc == _SOAP.ENC: return 1
    for e in enc.split():
        if e.startswith(_SOAP.ENC):
            # XXX Is this correct?  Once we find a Sec5 compatible
            # XXX encoding, should we check that all the rest are from
            # XXX that same base?  Perhaps.  But since the if test above
            # XXX will surely get 99% of the cases, leave it for now.
            return 1
    return 0
1315592
def _is_valid_ins(self, ins_ir):
        
        invalid_instrs = [
            ReilMnemonic.JCC,
            ReilMnemonic.UNDEF,
            ReilMnemonic.UNKN,
        ]

        return not any([i.mnemonic in invalid_instrs for i in ins_ir])
33998
public boolean containsLanguage (@Nullable final String sLanguage)
  {
    if (sLanguage == null)
      return false;

    final String sValidLanguage = LocaleHelper.getValidLanguageCode (sLanguage);
    if (sValidLanguage == null)
      return false;
    return m_aRWLock.readLocked ( () -> m_aLanguages.contains (sValidLanguage));
  }
979123
def IsValidLanguageCode(lang):
  
  bcp47_obj = parser.ParseLanguage(str(lang.lower()))
  return bcp47_obj.IsWellformed() and bcp47_obj.IsValid()
1158528
def is_valid(self):
        ''''''
        return (self.is_primitive and self.name) \
            or (self.is_complex and self.name) \
            or (self.is_list and self.nested) \
            or (self.is_map and self.nested) \
            or (self.is_model and self.nested)
198262
def is_valid(self, qstr=None):
        """"""
        if qstr is None:
            qstr = self.currentText()
        return osp.isfile(to_text_string(qstr))
219574
public boolean anyMatch(String lookupAny) {
		return
			keyMatch(lookupAny) || nameMatch(lookupAny) || 
			tagMatch(lookupAny) || ticketMatch(lookupAny);
	}
1371599
public static function isValidLangCode($langCode)
    {
        $langList = static::activeLanguagesArray();
        foreach ($langList as $lang) {
            if ($lang['code2'] == $langCode) return true;
            if ($lang['code3'] == $langCode) return true;
            if ($lang['code_full'] == $langCode) return true;
        }
        return false;
    }
306326
def keys_are_valid(self, tag_value):
        """"""
        for key in ScheduleParser.raw_data(tag_value):
            if key not in ('on', 'off', 'tz'):
                return False
        return True
1362806
public function valid($language)
    {
        if (empty($language)) {
            return false;
        }
        if ($language == 'en' || $language == 'de' || $language == 'pl' || $language == 'ru') {
            return true;
        }
        return false;
    }
966443
public function isTargetLanguageVersionExist(string $languageCode): bool
    {
        $languages = $this->repository->getContentLanguageService()->loadLanguages();
        foreach ($languages as $language) {
            if ($language->enabled && $language->languageCode == $languageCode) {
                return true;
            }
        }

        return false;
    }