Skip to content

Doc typo #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Doc typo #201

wants to merge 4 commits into from

Conversation

kushal9897
Copy link

Pull Request Template

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • [* ] Documentation update
  • Other (please specify):

Checklist

  • Code has been linted.
  • Documentation has been updated (if needed).
  • Tests have been added or updated (if needed).
  • Any breaking changes have been communicated to the team.

Screenshots or Recordings (if applicable)

Additional Information

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Copy link
Member

@refeed refeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@arunim2405 arunim2405 requested a review from Copilot March 21, 2025 12:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]]:

Comment on lines +51 to 53
SUPPORTED_OPS: Dict[str, Callable[[Dict[str, Any], Dict[str, Any]], List[Dict[str, Any]]]]


Copy link
Preview

Copilot AI Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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
}

Copilot uses AI. Check for mistakes.



logger = logging.getLogger(__name__)


def __getValue(key, data):
def __getValue(key: str, data: Dict[str, any]) -> Union[str, List[str]]:
Copy link
Preview

Copilot AI Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type annotation for 'data' uses 'any' instead of the correctly imported 'Any'. Please replace 'any' with 'Any' for consistency and correctness.

Suggested change
def __getValue(key: str, data: Dict[str, any]) -> Union[str, List[str]]:
def __getValue(key: str, data: Dict[str, Any]) -> Union[str, List[str]]:

Copilot uses AI. Check for mistakes.

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