Skip to content

Commit 1e37954

Browse files
committed
Add cli dependency
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 2861e42 commit 1e37954

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

aboutcode/federatedcode/cli.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@
99
#
1010

1111
import click
12+
1213
from aboutcode.federatedcode.client import get_package_scan
1314

15+
1416
@click.command()
15-
@click.argument('purl')
17+
@click.argument("purl")
1618
def handler(purl):
1719
"""
1820
Get package scan for PURL from FederatedCode git repository.
19-
21+
2022
PURL: PURL to fetch scan result
2123
"""
2224
click.echo(get_package_scan(purl=purl))
2325

24-
if __name__ == '__main__':
26+
27+
if __name__ == "__main__":
2528
handler()

aboutcode/federatedcode/client/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818

1919
load_dotenv()
2020

21-
FEDERATEDCODE_GIT_RAW_URL = os.getenv("FEDERATEDCODE_GIT_RAW_URL", "https://raw.githubusercontent.com/aboutcode-org/")
21+
FEDERATEDCODE_GIT_RAW_URL = os.getenv(
22+
"FEDERATEDCODE_GIT_RAW_URL",
23+
"https://raw.githubusercontent.com/aboutcode-org/",
24+
)
2225

2326

2427
class ScanNotAvailableError(Exception):

pyproject-aboutcode.federatedcode.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ dependencies = [
3838
"packageurl_python >= 0.15.6",
3939
"aboutcode.hashid>=0.1.0",
4040
"python-dotenv>=1.0.1",
41+
"click>=8.1.7",
42+
"requests>=2.32.3",
4143
]
4244

4345
urls = { Homepage = "https://github.com/aboutcode-org/federatedcode" }

0 commit comments

Comments
 (0)