Suggest the preferred forms.
335076
def check(text):
    """"""
    err = "sexism.misc"
    msg = "Gender bias. Use '{}' instead of '{}'."

    sexism = [
        ["anchor",           ["anchorman", "anchorwoman"]],
        ["chair",            ["chairman", "chairwoman"]],
        ["drafter",          ["draftman", "draftwoman"]],
        ["ombuds",           ["ombudsman", "ombudswoman"]],
        ["tribe member",     ["tribesman", "tribeswoman"]],
        ["police officer",   ["policeman", "policewoman"]],
        ["firefighter",      ["fireman", "firewoman"]],
        ["mail carrier",     ["mailman", "mailwoman"]],
        ["history",          ["herstory"]],
        ["women",            ["womyn"]],
        ["poet",             ["poetess"]],
        ["author",           ["authoress"]],
        ["waiter",           ["waitress"]],
        ["lawyer",           ["lady lawyer"]],
        ["doctor",           ["woman doctor"]],
        ["bookseller",       ["female booksalesman"]],
        ["air pilot",        ["female airman"]],
        ["executor",         ["executrix"]],
        ["prosecutor",       ["prosecutrix"]],
        ["testator",         ["testatrix"]],
        ["husband and wife", ["man and wife"]],
        ["chairs",           ["chairmen and chairs"]],
        ["men and women",    ["men and girls"]],
        ["comedian",         ["comedienne"]],
        ["confidant",        ["confidante"]],
        ["scientist",        ["woman scientist"]],
        ["scientists",       ["women scientists"]]
        # ["hero",             ["heroine"]]
    ]

    errors = preferred_forms_check(text, sexism, err, msg, ignore_case=False)

    msg = "Not a preferred form. Use '{}' instead of '{}'."
    pref = [
            ["anchor",           ["anchorperson"]],
            ["chair",            ["chairperson"]],
            ["drafter",          ["draftperson"]],
            ["ombuds",           ["ombudsperson"]],
            ["tribe member",     ["tribesperson"]],
            ["police officer",   ["policeperson"]],
            ["firefighter",      ["fireperson"]],
            ["mail carrier",     ["mailperson"]],
    ]
    for x in preferred_forms_check(text, pref, err, msg, ignore_case=False):
        errors.append(x)

    return errors
970286
def form_valid(self, form):
        """"""
        response = super().form_valid(form)
        messages.success(self.request, "Successfully created ({})".format(self.object))
        return response
379958
async function requestInput(message, suggestions = []) {
  const answerName = 'requestInput';
  const answers = await inquirer.prompt([
    {
      message,
      suggestions,
      name: answerName,
      type: suggestions.length ? 'suggest' : 'input',
    },
  ]);
  return answers[answerName];
}
522139
def _searchable_form(self) -> 'Language':
        
        if self._searchable is not None:
            return self._searchable

        self._searchable = self._filter_attributes(
            {'language', 'script', 'region'}
        ).simplify_script().prefer_macrolanguage()
        return self._searchable
541948
def fill_form(form, data):
    
    for (key, value) in data.items():
        if hasattr(form, key):
            if isinstance(value, dict):
                fill_form(getattr(form, key), value)
            else:
                getattr(form, key).data = value
    return form
580297
def ask_for_input_with_prompt(cls, ui, prompt='', **options):
        """"""
        return cls.get_appropriate_helper(ui).ask_for_input_with_prompt(prompt=prompt, **options)
1236772
def formfield(self, form_class=None, choices_form_class=None, **kwargs):
        """"""
        defaults = {
            'form_class': form_class or self.get_form_class()
        }
        defaults.update(kwargs)

        return super(ListField, self).formfield(**defaults)
91470
def form_valid(self, form):
        """"""
        form.categorize_metrics()
        return super(CategoryFormView, self).form_valid(form)
667234
public function chooseLanguage() {
        if ($this->_saveOnCookies &&
            $tmpLng = $this->getRequiredModules('cookies')->getCookie($this->_cookieName)
        ) {

            $this->_selectedLanguage = $tmpLng;
        } elseif (isset($this->_app)) {
            try {
                $this->_selectedLanguage = $this->_app->getConfig()->getConfigData('default_language');
            } catch (\pff\ConfigException $e) {
                $this->_selectedLanguage = $this->_defaultLang;
            }
        } else {
            $this->_selectedLanguage = $this->_defaultLang;
        }
    }
925987
def _get_form_defaults(self):
        """"""

        return {
            'response_format': 'html',
            'bbox': self.service.full_extent,
            'size': '400,400',
            'dpi': 200,
            'image_projection': pyproj.Proj(str(self.service.projection)),
            'bbox_projection': pyproj.Proj(str(self.service.projection)),
            'image_format': 'png',
            'transparent': True
        }
1137880
def options(description, **kwargs):
    """"""
    def set_notes(function):
        function.refactor_notes = {'name': function.__name__,
                                   'category': "Miscellaneous",
                                   'description': description,
                                   'doc': getattr(function, '__doc__',
                                                  ''),
                                   'args': []}
        function.refactor_notes.update(kwargs)
        return function
    return set_notes
990076
def formfield(self, **kwargs):
        """"""
        defaults = {
            'form_class': LocalizedCharFieldForm
        }

        defaults.update(kwargs)
        return super().formfield(**defaults)
1143214
def DEFINE_choice(self, name, default, choices, help, constant=False):
    """"""
    self.AddOption(
        type_info.Choice(
            name=name, default=default, choices=choices, description=help),
        constant=constant)
359640
def user_preference_form_builder(instance, preferences=[], **kwargs):
    
    return preference_form_builder(
        UserPreferenceForm,
        preferences,
        model={'instance': instance},
        **kwargs)
1363914
def form(alias_name, user, host, options)
      retuned = "\n"
      retuned += "Host #{alias_name}\n"
      retuned += "  HostName #{host}\n"
      retuned += "  User #{user}\n"

      options.file_content.each_pair do |key, value|
        retuned += value
      end
      retuned

    end
1334771
def chooseMany(choices):
    ''
    if isinstance(choices, dict):
        choosed = input('/'.join(choices.keys()) + ': ', completer=CompleteKey(choices)).split()
        return [choices[c] for c in choosed]
    else:
        return input('/'.join(str(x) for x in choices) + ': ', completer=CompleteKey(choices)).split()
1145616
def prompt_for_choice(values, message, input_type=int, output_type=None):
    """"""
    output = None
    while not output:
        index = prompt_for_input(message, input_type=input_type)

        try:
            output = utf8(values[index])
        except IndexError:
            error_message('Selection out of range')
            continue

    if output_type:
        output = output_type(output)

    return output