Skip to content
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

[plist2html] Add type hints #3214

Merged

Conversation

csordasmarton
Copy link
Contributor

  • Add type hints to plist-to-html tool.
  • Add mypy static type checker to the requirements
  • Create new targets to check the code with mypy.

@csordasmarton csordasmarton added test ☑️ Adding or refactoring tests refactoring 😡 ➡️ 🙂 Refactoring code. tools 🛠️ Meta-tag for all the additional tools supplied with CodeChecker: plist2html, tu_collector, etc. labels Feb 25, 2021
@csordasmarton csordasmarton added this to the release 6.16.0 milestone Feb 25, 2021
"""
def twodim_to_table(
lines: List[List[str]],
separate_head=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
separate_head=True,
separate_head: bool =True,

def twodim_to_table(
lines: List[List[str]],
separate_head=True,
separate_footer=False
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
separate_footer=False
separate_footer: bool =False

@@ -123,7 +139,7 @@ def __init__(self, layout_dir, severity_map=None):
self._tag_contents[tag] = get_file_content(
self._layout_tag_files[tag])

def create(self, output_path, report_data):
def create(self, output_path: str, report_data):
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the type of report_data?

- Add type hints to `plist-to-html` tool.
- Add `mypy` static type checker to the requirements
- Create new targets to check the code with mypy.
@csordasmarton csordasmarton force-pushed the plist_to_html_type_hints branch from 0a6bf44 to 1fa63cb Compare April 7, 2021 10:16
@csordasmarton csordasmarton requested a review from zomen2 April 7, 2021 10:16
@csordasmarton csordasmarton merged commit afaf876 into Ericsson:master Apr 8, 2021
@csordasmarton csordasmarton deleted the plist_to_html_type_hints branch January 28, 2022 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring 😡 ➡️ 🙂 Refactoring code. test ☑️ Adding or refactoring tests tools 🛠️ Meta-tag for all the additional tools supplied with CodeChecker: plist2html, tu_collector, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants