Conversation
|
refeed
left a comment
There was a problem hiding this comment.
Hi @kushal9897 , thanks for the PR! Could you fix the linting error here: https://github.com/StackGuardian/tirith/actions/runs/11490949035/job/32158068030?pr=201
Thanks
There was a problem hiding this comment.
Pull Request Overview
This PR primarily updates type annotations in several provider handlers and fixes documentation typos across multiple files. Key changes include:
- Adding and refining type annotations in provider handler modules.
- Updating documentation descriptions to correct typos and improve clarity.
- Standardizing text formatting in documentation files.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/tirith/providers/json/handler.py | Added explicit type annotations; potential missing assignment for SUPPORTED_OPS. |
| src/tirith/providers/sg_workflow/handler.py | Updated type annotations for functions to improve clarity. |
| src/tirith/providers/infracost/handler.py | Added explicit type annotations for clarity and consistency. |
| documentation/docs/*.md | Corrected descriptive typos and standardized documentation text. |
Comments suppressed due to low confidence (1)
src/tirith/providers/infracost/handler.py:80
- [nitpick] For consistency with other modules, consider using 'Dict[str, Any]' instead of the built-in 'dict' for the provider_args and input_data parameters.
def provide(provider_args: dict, input_data: dict) -> List[Dict[str, Any]]:
| SUPPORTED_OPS: Dict[str, Callable[[Dict[str, Any], Dict[str, Any]], List[Dict[str, Any]]]] | ||
|
|
||
|
|
There was a problem hiding this comment.
The updated SUPPORTED_OPS declaration is missing an assignment operator to bind the dictionary literal. Please add '= {"get_value": get_value}' or the appropriate dictionary value to complete the statement.
| SUPPORTED_OPS: Dict[str, Callable[[Dict[str, Any], Dict[str, Any]], List[Dict[str, Any]]]] | |
| SUPPORTED_OPS: Dict[str, Callable[[Dict[str, Any], Dict[str, Any]], List[Dict[str, Any]]]] = { | |
| "get_value": get_value | |
| } |
|
|
||
|
|
||
| def __getValue(key, data): | ||
| def __getValue(key: str, data: Dict[str, any]) -> Union[str, List[str]]: |
There was a problem hiding this comment.
The type annotation for 'data' uses 'any' instead of the correctly imported 'Any'. Please replace 'any' with 'Any' for consistency and correctness.
| def __getValue(key: str, data: Dict[str, any]) -> Union[str, List[str]]: | |
| def __getValue(key: str, data: Dict[str, Any]) -> Union[str, List[str]]: |




Pull Request Template
Description
What changes are being made?
Why are these changes necessary?
Which issues or tickets does this PR close or relate to?
Type of Change
Checklist
Screenshots or Recordings (if applicable)
Additional Information