original_docstring: Create a new rule file.
docstring: Create a new rule file.
docstring_tokens: Create a new rule file .
code: def create_rule_file(file_path: Path, rule_name: str) -> None:
      """Create a new rule file."""
      rule_name = is_valid_name(rule_name)
      context = _LICENCE + _IMPORTS + _TO_DOS + _RULE_CLASS
      updated_context = invoke_formatter(
          get_lint_config().formatter, context.format(class_name=rule_name)
      )
  
      with open(file_path, "w") as f:
          f.write(updated_context)
  
      print(f"Successfully created {file_path.name} rule file at {file_path.parent}")
code_tokens: def create_rule_file ( file_path : Path , rule_name : str ) -> None : rule_name = is_valid_name ( rule_name ) context = _LICENCE + _IMPORTS + _TO_DOS + _RULE_CLASS updated_context = invoke_formatter ( get_lint_config ( ) . formatter , context . format ( class_name = rule_name ) ) with open ( file_path , "w" ) as f : f . write ( updated_context ) print ( f"Successfully created {file_path.name} rule file at {file_path.parent}" )
short_docstring: Create a new rule file.
short_docstring_tokens: Create a new rule file .
comment: """Create a new rule file."""