From 5f21c51ff285715a99899b1853367c473bdcff36 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Thu, 10 Oct 2024 14:22:44 -0800 Subject: [PATCH] Fix ruff linting errors --- cookiecutter.json | 2 +- .../src/{{cookiecutter.__package_name}}/__main__.py | 10 +++------- .../src/{{cookiecutter.__package_name}}/process.py | 10 ++++------ 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/cookiecutter.json b/cookiecutter.json index 166a212..23a4a3e 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -2,7 +2,7 @@ "github_username": "username_for_github_actions", "github_email": "email_for@github_actions.com", "process_type": "RTC", - "short_description": "HyP3 plugin for {{cookiecutter.process_type}} processing", + "short_description": "HyP3 plugin for {{cookiecutter.process_type}} processing.", "public_url": "https://github.com/ASFHyP3/hyp3-{{cookiecutter.process_type}}", "copyright_year": "{% now 'utc', '%Y' %}", "__project_name": "hyp3-{{cookiecutter.process_type | lower}}", diff --git a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__main__.py b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__main__.py index 6589e4f..436131e 100644 --- a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__main__.py +++ b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/__main__.py @@ -1,6 +1,4 @@ -""" -{{cookiecutter.process_type}} processing for HyP3 -""" +"""{{cookiecutter.process_type}} processing for HyP3.""" import logging from argparse import ArgumentParser @@ -11,10 +9,8 @@ from {{cookiecutter.__package_name}}.process import {{cookiecutter.__process_name}} -def main(): - """ - HyP3 entrypoint for {{cookiecutter.__package_name}} - """ +def main() -> None: + """HyP3 entrypoint for {{cookiecutter.__package_name}}.""" parser = ArgumentParser() parser.add_argument('--bucket', help='AWS S3 bucket HyP3 for upload the final product(s)') parser.add_argument('--bucket-prefix', default='', help='Add a bucket prefix to product(s)') diff --git a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/process.py b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/process.py index f7a65ca..eb9b86a 100644 --- a/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/process.py +++ b/{{cookiecutter.__project_name}}/src/{{cookiecutter.__package_name}}/process.py @@ -1,6 +1,4 @@ -""" -{{cookiecutter.process_type}} processing -""" +"""{{cookiecutter.process_type}} processing.""" import argparse import logging @@ -12,7 +10,7 @@ def {{cookiecutter.__process_name}}(greeting: str = 'Hello world!') -> Path: - """Create a greeting product + """Create a greeting product. Args: greeting: Write this greeting to a product file (Default: "Hello world!" ) @@ -23,8 +21,8 @@ def {{cookiecutter.__process_name}}(greeting: str = 'Hello world!') -> Path: return product_file -def main(): - """{{cookiecutter.__process_name}} entrypoint""" +def main() -> None: + """{{cookiecutter.__process_name}} entrypoint.""" parser = argparse.ArgumentParser( prog='{{cookiecutter.__process_name}}', description=__doc__,