INNER CODE UNIT · Python

last_match

googleapis/mcp-toolbox · .ci/update_docs_versions.py:81

            last_match = matches[-1]
            start, end = last_match.span()
            before = updated_content[:start]
            after = updated_content[end:]
            
            before = before.rstrip() + '\n\n'
            after = after.lstrip()
            
            updated_content = before + after
            print(f"Removed the oldest version block from {os.path.basename(file_path)}.")

    with open(file_path, 'w') as f:
        f.write(updated_content)
    print(f"Successfully updated {os.path.basename(file_path)}.")

if __name__ == '__main__':
    main()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…