Skip to content

Commit 614a456

Browse files
committed
remove unused code
1 parent e9f8471 commit 614a456

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

scripts/configure_state_yaml/configure_state_yaml.py

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,10 @@
2828
GAPIC_METADATA_JSON = "gapic_metadata.json"
2929

3030

31-
def configure_state_yaml(package_dirs: List[Path]) -> None:
31+
def configure_state_yaml() -> None:
3232
"""
3333
This method updates the `state.yaml` file in the directory
3434
`.librarian`.
35-
36-
Args:
37-
package_dirs(List[pathlib.Path]): A list of Paths, one for each package in the
38-
`packages/` folder whose entry will be updated in the `state.yaml`.
39-
40-
Returns:
41-
None
4235
"""
4336

4437
state_dict = {}
@@ -83,22 +76,5 @@ def configure_state_yaml(package_dirs: List[Path]) -> None:
8376
yaml.dump(state_dict, f)
8477

8578

86-
def get_all_packages(packages_dir: Path = PACKAGES_DIR) -> List[Path]:
87-
"""
88-
Walks through all API packages in the specified `packages_dir` path.
89-
90-
Args:
91-
packages_dir(pathlib.Path): Path to the directory which contains packages.
92-
93-
Returns:
94-
List[pathlib.Path] where each entry corresponds to a package within the
95-
specified `packages_dir`.
96-
"""
97-
if not Path(packages_dir).exists():
98-
raise FileNotFoundError(f"Directory {packages_dir} not found")
99-
return [obj.parents[0].resolve() for obj in packages_dir.rglob("**/.OwlBot.yaml")]
100-
101-
10279
if __name__ == "__main__":
103-
package_dirs = get_all_packages()
104-
configure_state_yaml(package_dirs)
80+
configure_state_yaml()

0 commit comments

Comments
 (0)