
'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


_lowercase          =						{
    """configuration_xlm""": ["""XLM_PRETRAINED_CONFIG_ARCHIVE_MAP""", """XLMConfig""", """XLMOnnxConfig"""],
    """tokenization_xlm""": ["""XLMTokenizer"""],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowercase          =						[
						    """XLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """XLMForMultipleChoice""",
						    """XLMForQuestionAnswering""",
						    """XLMForQuestionAnsweringSimple""",
						    """XLMForSequenceClassification""",
						    """XLMForTokenClassification""",
						    """XLMModel""",
						    """XLMPreTrainedModel""",
						    """XLMWithLMHeadModel""",
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowercase          =						[
						    """TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """TFXLMForMultipleChoice""",
						    """TFXLMForQuestionAnsweringSimple""",
						    """TFXLMForSequenceClassification""",
						    """TFXLMForTokenClassification""",
						    """TFXLMMainLayer""",
						    """TFXLMModel""",
						    """TFXLMPreTrainedModel""",
						    """TFXLMWithLMHeadModel""",
						]


if TYPE_CHECKING:
						from .configuration_xlm import XLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XLMConfig, XLMOnnxConfig
						from .tokenization_xlm import XLMTokenizer

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_xlm import (
												    XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
												    XLMForMultipleChoice,
												    XLMForQuestionAnswering,
												    XLMForQuestionAnsweringSimple,
												    XLMForSequenceClassification,
												    XLMForTokenClassification,
												    XLMModel,
												    XLMPreTrainedModel,
												    XLMWithLMHeadModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_xlm import (
												    TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFXLMForMultipleChoice,
												    TFXLMForQuestionAnsweringSimple,
												    TFXLMForSequenceClassification,
												    TFXLMForTokenClassification,
												    TFXLMMainLayer,
												    TFXLMModel,
												    TFXLMPreTrainedModel,
												    TFXLMWithLMHeadModel,
												)

else:
						import sys

						_lowercase          =						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




'''simple docstring'''






import argparse


lowercase				='docs/source/_static/js/custom.js'





def lowerCamelCase__     (		__lowerCamelCase			:				List[Any]				):







   '''simple docstring'''




   with open(__lowerCamelCase			,       encoding='utf-8'			,       newline='\n'				) as f:
      _UpperCAmelCase  :  Optional[Any]				       =f.readlines()
   _UpperCAmelCase  :  Dict				       =0

   # First let's put the right version
   while not lines[index].startswith('const stableVersion ='				):
      index += 1
   _UpperCAmelCase  :  Tuple				       =f"const stableVersion = \"v{version}\"\n"

   # Then update the dictionary
   while not lines[index].startswith('const versionMapping = {'				):
      index += 1

   # We go until the end
   while not lines[index].startswith('}'				):
      index += 1
   # We add the new version at the end
   lines[index - 1] += f"    \"v{version}\": \"v{version}\",\n"

   with open(__lowerCamelCase			,       'w'			,       encoding='utf-8'			,       newline='\n'				) as f:
      f.writelines(__lowerCamelCase				)


if __name__ == "__main__":
 lowercase				=argparse.ArgumentParser()
 parser.add_argument('--version', help='Release version.')
 lowercase				=parser.parse_args()
 update_custom_js(args.version)

