Skip to content

Commit 4e622d7

Browse files
committed
Refactor function signatures in env_cleaner.py to remove unused parameters and improve docstring formatting
1 parent 90af4e9 commit 4e622d7

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

env_cleaner.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
--min-age=<min_age> (NOT IMPLEMENTED) Minimum age in seconds
2020
--respect-prs Don't undeploy if there's a PR open for it
2121
"""
22+
2223
import re
2324
import requests
2425
from typing import Optional, Set
2526
from docopt import docopt
2627
from apigee_client import ApigeeClient
2728

28-
2929
SPEC_MATCHER = re.compile("(personal-demographics|identity-service|hello-world)-.+")
3030
PROXY_MATCHER = re.compile(
3131
"(personal-demographics|identity-service|hello-world)-internal-dev-.+"
@@ -49,7 +49,7 @@ def canonicalize(name: str) -> str:
4949

5050
class GithubClient:
5151
def get_open_prs(self, env: str) -> Set[str]:
52-
""" Returns names of open pull requests """
52+
"""Returns names of open pull requests"""
5353
canonical_prs = set()
5454
for repo_name in REPO_NAMES.keys():
5555
prs = requests.get(
@@ -65,7 +65,7 @@ def get_open_prs(self, env: str) -> Set[str]:
6565
return canonical_prs
6666

6767

68-
def clean_specs(client: ApigeeClient, env: str, dry_run: bool = False):
68+
def clean_specs(client: ApigeeClient, dry_run: bool = False):
6969
specs = client.list_specs()
7070
spec_names = [spec["name"] for spec in specs["contents"]]
7171

@@ -85,7 +85,6 @@ def clean_proxies(
8585
env: str,
8686
dry_run: bool = False,
8787
sandboxes_only: bool = False,
88-
min_age: Optional[int] = None,
8988
undeploy_only: bool = False,
9089
respect_prs: bool = False,
9190
):
@@ -135,7 +134,7 @@ def clean_proxies(
135134
client.delete_proxy(proxy)
136135

137136

138-
def clean_products(client: ApigeeClient, env: str, dry_run: bool = False):
137+
def clean_products(client: ApigeeClient, dry_run: bool = False):
139138
products = client.list_products()
140139
pr_products = [product for product in products if PRODUCT_MATCHER.match(product)]
141140

0 commit comments

Comments
 (0)