Get whether this should be displayed in LTR mode.

Try to guess from the PARAM type unless specifically set.
768436
public function get_force_ltr() {
        $forceltr = parent::get_force_ltr();
        if ($forceltr === null) {
            return !is_rtl_compatible($this->paramtype);
        }
        return $forceltr;
    }
139009
def _IsMariaDB(cursor):
  """"""
  for variable in ["version", "version_comment"]:
    cursor.execute("SHOW VARIABLES LIKE %s;", (variable,))
    version = cursor.fetchone()
    if version and "MariaDB" in version[1]:
      return True
  return False
799291
function _determineInputType() {
    let input = Utils.includes(INPUT_TYPES, this.options.input) ? this.options.input : null;
    const numPossibilities = this.possibilities.length;


    if (numPossibilities <= 1) {
      return input === 'toggle' ? 'toggle' : 'checkbox';
    } else if (this.options.multiple) {
      return 'dropdown';
    }

    // If we've gotten this far, radio and dropdown are the only options
    input = Utils.includes(['radio', 'dropdown'], input) ? input : null;

    if (numPossibilities <= 3 && !this.options.multiple) {
      return input || 'radio';
    }

    return input || 'dropdown';
  }
480245
def is_attr_selected(attr_name,     # type: str
                     include=None,  # type: Union[str, Tuple[str]]
                     exclude=None   # type: Union[str, Tuple[str]]
                     ):
    """"""

    if include is not None and exclude is not None:
        raise ValueError('Only one of \'include\' or \'exclude\' argument should be provided.')

    # win time by not doing this
    # check_var(include, var_name='include', var_types=[str, tuple], enforce_not_none=False)
    # check_var(exclude, var_name='exclude', var_types=[str, tuple], enforce_not_none=False)

    if attr_name is 'self':
        return False
    if exclude and attr_name in exclude:
        return False
    if not include or attr_name in include:
        return True
    else:
        return False
814365
def valid_param_supplied_as_text?
      tag_def = @bbtree.current_node.definition

      # this conditional ensures whether the validation is apropriate to this tag type
      if @ti.element_is_text? and within_open_tag? and tag_def[:require_between] and use_text_as_parameter? and not tag_def[:quick_param_format].nil?

        # check if valid
        if @ti[:text].match(tag_def[:quick_param_format]).nil?
          add_tag_error tag_def[:quick_param_format_description].gsub('%param%', @ti[:text])
          return false
        end
      end
      true
    end
1307880
def check_is_declared_explicit(lineno, id_, classname='variable'):
    
    if not config.OPTIONS.explicit.value:
        return True

    entry = global_.SYMBOL_TABLE.check_is_declared(id_, lineno, classname)
    return entry is not None
1019248
def is_parameter(self):
        """"""
        return (isinstance(self.scope, CodeFunction)
                and self in self.scope.parameters)
971695
def should_display_warnings_for(to_type):
    
    if not hasattr(to_type, '__module__'):
        return True
    elif to_type.__module__ in {'builtins'} or to_type.__module__.startswith('parsyfiles') \
            or to_type.__name__ in {'DataFrame'}:
        return False
    elif issubclass(to_type, int) or issubclass(to_type, str) \
            or issubclass(to_type, float) or issubclass(to_type, bool):
        return False
    else:
        return True
111525
def detect_mode(term_hint="xterm-256color"):
    """"""
    if "ANSICON" in os.environ:
        return 16
    elif os.environ.get("ConEmuANSI", "OFF") == "ON":
        return 256
    else:
        term = os.environ.get("TERM", term_hint)
        if term.endswith("-256color") or term in ("xterm", "screen"):
            return 256
        elif term.endswith("-color") or term in ("rxvt",):
            return 16
        else:
            return 256
49592
protected boolean isGetClassOnTypeLiteral() {
		JvmIdentifiableElement feature = getFeature();
		if (isGetClass(feature)) {
			XExpression receiver = getSyntacticReceiver();
			if (receiver instanceof XAbstractFeatureCall) {
				IFeatureLinkingCandidate linkingCandidate = getState().getResolvedTypes().getLinkingCandidate((XAbstractFeatureCall) receiver);
				if (linkingCandidate != null && linkingCandidate.isTypeLiteral()) {
					return true;
				}
			}
		}
		return false;
	}
748778
void checkConformance() {
    resetErrorReporter();
    // to check conformance we only need to run as much as it takes to execute the SoyConformance
    // pass.
    parse(
        passManagerBuilder()
            // We have to set disableAllTypeChecking to make sure default parameter types don't
            // break calculating TemplateMetadata objects.  This is because SoyConformancePass runs
            // before ResolveExpressionTypesPass which normally populates the parameter types for
            // default params.  With disableAllTypeChecking set an earlier pass will just set those
            // types to unknown
            // TODO(lukes):  change the pass continuation mechanism to avoid generating a template
            // registry if we halt prior to cross template passes.
            .disableAllTypeChecking()
            .addPassContinuationRule(
                SoyConformancePass.class, PassContinuationRule.STOP_AFTER_PASS));
    throwIfErrorsPresent();
    reportWarnings();
  }
805288
function couldContainTypeParameters(type) {
            return !!(type.flags & 16384 /* TypeParameter */ ||
                type.flags & 131072 /* Reference */ && ts.forEach(type.typeArguments, couldContainTypeParameters) ||
                type.flags & 2097152 /* Anonymous */ && type.symbol && type.symbol.flags & (8192 /* Method */ | 2048 /* TypeLiteral */ | 32 /* Class */) ||
                type.flags & 1572864 /* UnionOrIntersection */ && couldUnionOrIntersectionContainTypeParameters(type));
        }
359509
private void checkValueType(TemplateParam param, SoyValue value, TemplateNode node) {
    if (!TofuTypeChecks.isInstance(param.type(), value, node.getSourceLocation())) {
      // should this be a soydataexception?
      throw RenderException.createWithSource(
          "Parameter type mismatch: attempt to bind value '"
              + (value instanceof UndefinedData ? "(undefined)" : value)
              + "' (a "
              + value.getClass().getSimpleName()
              + ") to parameter '"
              + param.name()
              + "' which has a declared type of '"
              + param.type()
              + "'.",
          node);
    }
  }
199086
private void checkInlineParams(NodeTraversal t, Node function) {
    Node paramList = NodeUtil.getFunctionParameters(function);

    for (Node param : paramList.children()) {
      JSDocInfo jsDoc = param.getJSDocInfo();
      if (jsDoc == null) {
        t.report(param, MISSING_PARAMETER_JSDOC);
        return;
      } else {
        JSTypeExpression paramType = jsDoc.getType();
        checkNotNull(paramType, "Inline JSDoc info should always have a type");
        checkParam(t, param, null, paramType);
      }
    }
  }
185956
def check_type(lineno, type_list, arg):
    
    if not isinstance(type_list, list):
        type_list = [type_list]

    if arg.type_ in type_list:
        return True

    if len(type_list) == 1:
        syntax_error(lineno, "Wrong expression type '%s'. Expected '%s'" %
                     (arg.type_, type_list[0]))
    else:
        syntax_error(lineno, "Wrong expression type '%s'. Expected one of '%s'"
                     % (arg.type_, tuple(type_list)))

    return False
986883
def parameter_type(self, parameter_type):
        
        allowed_values = ["SIMPLE", "LIST", "DYNAMIC"]  # noqa: E501
        if parameter_type not in allowed_values:
            raise ValueError(
                "Invalid value for `parameter_type` ({0}), must be one of {1}"  # noqa: E501
                .format(parameter_type, allowed_values)
            )

        self._parameter_type = parameter_type
707352
def _modeIsValid(self, mode):
        
        try:
            # Suport for version 2 of wrappers
            return mode in self.modes.keys()
        except AttributeError as e:
            # Legacy for mantaining old wrappers
            if mode in self.isValidMode.keys():
                if mode in self.isValidMode.keys():
                    return True
        return False