Skip to content

Finish refactor#15

Closed
deeheber wants to merge 9 commits intomainfrom
finish-refactor
Closed

Finish refactor#15
deeheber wants to merge 9 commits intomainfrom
finish-refactor

Conversation

@deeheber
Copy link
Owner

@deeheber deeheber commented Dec 14, 2025

Follow up on #14 because the kiro agent (in preview to be fair) is going off the walls a bit. I'd rather do it myself at this point. 😄

kiro-agent and others added 9 commits December 14, 2025 21:14
- Add type hints for function parameters and return values
- Import typing.Optional for better type annotations
- Improves code readability and IDE support for Python 3.13.5

Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com>
…iables

- Extract logging setup into setup_logging() function
- Extract authentication logic into authenticate_client() function
- Add proper main() function as entry point
- Pass dependencies as function parameters instead of using globals
- Use SystemExit with proper exit codes instead of bare exit()
- Add input validation for required environment variables

Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com>
- Define constants for default values and magic strings
- Use constants instead of hard-coded values throughout the code
- Add docstring to fetch_and_process function
- Improves maintainability and reduces duplication

Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com>
- Add validate_environment() function to check required env vars early
- Validate DAYS_AGO is a valid non-negative integer
- Add proper error handling for integer parsing
- Provide clear error messages for validation failures
- Simplify authenticate_client by removing redundant checks

Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com>
- Use f-string for client_method construction instead of concatenation
- Remove unnecessary parentheses in if condition
- Use 'not dry_run' instead of 'dry_run == False' for better readability
- Fix error message to be singular instead of plural
- Follows PEP 8 style guidelines and modern Python practices

Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com>
- Add detailed docstrings for all classes and functions
- Include parameter descriptions, return values, and exceptions
- Follow Google/NumPy docstring style conventions
- Improves code maintainability and IDE support

Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com>
- Add comprehensive module docstring describing the tool's purpose
- Document features, environment variables, and usage
- Include author information
- Follows Python documentation best practices

Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com>
- Convert 2-space indentation to 4-space (PEP 8 standard)
- Ensure consistent indentation throughout the file
- Improves code readability and follows Python style guidelines

Co-authored-by: Danielle Heberling <12616554+deeheber@users.noreply.github.com>
@deeheber
Copy link
Owner Author

closing in favor of #16 it did do the right thing ish...but took a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants