psuedo -> pseudo

This commit is contained in:
Jake McDermott
2019-09-10 11:46:45 -04:00
committed by AlanCoding
parent 8ac8fb9016
commit 84a8559ea0
4 changed files with 9 additions and 9 deletions

View File

@@ -3357,7 +3357,7 @@ class WorkflowJobTemplateSerializer(JobTemplateMixin, LabelsListMixin, UnifiedJo
setattr(mock_obj, field_name, attrs[field_name]) setattr(mock_obj, field_name, attrs[field_name])
attrs.pop(field_name) attrs.pop(field_name)
# Model `.save` needs the container dict, not the psuedo fields # Model `.save` needs the container dict, not the pseudo fields
if mock_obj.char_prompts: if mock_obj.char_prompts:
attrs['char_prompts'] = mock_obj.char_prompts attrs['char_prompts'] = mock_obj.char_prompts
@@ -3617,7 +3617,7 @@ class LaunchConfigurationBaseSerializer(BaseSerializer):
if errors: if errors:
raise serializers.ValidationError(errors) raise serializers.ValidationError(errors)
# Model `.save` needs the container dict, not the psuedo fields # Model `.save` needs the container dict, not the pseudo fields
if mock_obj.char_prompts: if mock_obj.char_prompts:
attrs['char_prompts'] = mock_obj.char_prompts attrs['char_prompts'] = mock_obj.char_prompts

View File

@@ -39,7 +39,7 @@ from awx.main.models.notifications import (
NotificationTemplate, NotificationTemplate,
JobNotificationMixin, JobNotificationMixin,
) )
from awx.main.utils import parse_yaml_or_json, getattr_dne, NullablePromptPsuedoField from awx.main.utils import parse_yaml_or_json, getattr_dne, NullablePromptPseudoField
from awx.main.fields import ImplicitRoleField, JSONField, AskForField from awx.main.fields import ImplicitRoleField, JSONField, AskForField
from awx.main.models.mixins import ( from awx.main.models.mixins import (
ResourceMixin, ResourceMixin,
@@ -903,7 +903,7 @@ for field_name in JobTemplate.get_ask_mapping().keys():
try: try:
LaunchTimeConfigBase._meta.get_field(field_name) LaunchTimeConfigBase._meta.get_field(field_name)
except FieldDoesNotExist: except FieldDoesNotExist:
setattr(LaunchTimeConfigBase, field_name, NullablePromptPsuedoField(field_name)) setattr(LaunchTimeConfigBase, field_name, NullablePromptPseudoField(field_name))
class LaunchTimeConfig(LaunchTimeConfigBase): class LaunchTimeConfig(LaunchTimeConfigBase):

View File

@@ -2235,7 +2235,7 @@ class RunInventoryUpdate(BaseTask):
getattr(settings, '%s_INSTANCE_ID_VAR' % src.upper()),]) getattr(settings, '%s_INSTANCE_ID_VAR' % src.upper()),])
# Add arguments for the source inventory script # Add arguments for the source inventory script
args.append('--source') args.append('--source')
args.append(self.psuedo_build_inventory(inventory_update, private_data_dir)) args.append(self.pseudo_build_inventory(inventory_update, private_data_dir))
if src == 'custom': if src == 'custom':
args.append("--custom") args.append("--custom")
args.append('-v%d' % inventory_update.verbosity) args.append('-v%d' % inventory_update.verbosity)
@@ -2246,7 +2246,7 @@ class RunInventoryUpdate(BaseTask):
def build_inventory(self, inventory_update, private_data_dir): def build_inventory(self, inventory_update, private_data_dir):
return None # what runner expects in order to not deal with inventory return None # what runner expects in order to not deal with inventory
def psuedo_build_inventory(self, inventory_update, private_data_dir): def pseudo_build_inventory(self, inventory_update, private_data_dir):
"""Inventory imports are ran through a management command """Inventory imports are ran through a management command
we pass the inventory in args to that command, so this is not considered we pass the inventory in args to that command, so this is not considered
to be "Ansible" inventory (by runner) even though it is to be "Ansible" inventory (by runner) even though it is

View File

@@ -47,7 +47,7 @@ __all__ = ['get_object_or_400', 'camelcase_to_underscore', 'underscore_to_camelc
'get_current_apps', 'set_current_apps', 'get_current_apps', 'set_current_apps',
'extract_ansible_vars', 'get_search_fields', 'get_system_task_capacity', 'get_cpu_capacity', 'get_mem_capacity', 'extract_ansible_vars', 'get_search_fields', 'get_system_task_capacity', 'get_cpu_capacity', 'get_mem_capacity',
'wrap_args_with_proot', 'build_proot_temp_dir', 'check_proot_installed', 'model_to_dict', 'wrap_args_with_proot', 'build_proot_temp_dir', 'check_proot_installed', 'model_to_dict',
'NullablePromptPsuedoField', 'model_instance_diff', 'parse_yaml_or_json', 'RequireDebugTrueOrTest', 'NullablePromptPseudoField', 'model_instance_diff', 'parse_yaml_or_json', 'RequireDebugTrueOrTest',
'has_model_field_prefetched', 'set_environ', 'IllegalArgumentError', 'get_custom_venv_choices', 'get_external_account', 'has_model_field_prefetched', 'set_environ', 'IllegalArgumentError', 'get_custom_venv_choices', 'get_external_account',
'task_manager_bulk_reschedule', 'schedule_task_manager', 'classproperty', 'create_temporary_fifo'] 'task_manager_bulk_reschedule', 'schedule_task_manager', 'classproperty', 'create_temporary_fifo']
@@ -448,9 +448,9 @@ class CharPromptDescriptor:
self.field = field self.field = field
class NullablePromptPsuedoField: class NullablePromptPseudoField:
""" """
Interface for psuedo-property stored in `char_prompts` dict Interface for pseudo-property stored in `char_prompts` dict
Used in LaunchTimeConfig and submodels, defined here to avoid circular imports Used in LaunchTimeConfig and submodels, defined here to avoid circular imports
""" """
def __init__(self, field_name): def __init__(self, field_name):