MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / update_version_in_examples

Function update_version_in_examples

diffusers/utils/release.py:48–58  ·  view source on GitHub ↗

Update the version in all examples files.

(version)

Source from the content-addressed store, hash-verified

46
47
48def update_version_in_examples(version):
49 """Update the version in all examples files."""
50 for folder, directories, fnames in os.walk(PATH_TO_EXAMPLES):
51 # Removing some of the folders with non-actively maintained examples from the walk
52 if "research_projects" in directories:
53 directories.remove("research_projects")
54 if "legacy" in directories:
55 directories.remove("legacy")
56 for fname in fnames:
57 if fname.endswith(".py"):
58 update_version_in_file(os.path.join(folder, fname), version, pattern="examples")
59
60
61def global_version_update(version, patch=False):

Callers 1

global_version_updateFunction · 0.85

Calls 2

update_version_in_fileFunction · 0.85
walkMethod · 0.80

Tested by

no test coverage detected