Skip to content

Conversation

@sandrobonazzola
Copy link
Collaborator

  • Add return type annotations to header() and fetch() methods
  • Add type hints to CustomStats.init parameters
  • Import User type from did.base
  • Fix test assertion to properly call header() method

- Add return type annotations to header() and fetch() methods
- Add type hints to CustomStats.__init__ parameters
- Import User type from did.base
- Fix test assertion to properly call header() method

Signed-off-by: Sandro Bonazzola <[email protected]>
@sandrobonazzola sandrobonazzola self-assigned this Nov 20, 2025
@sandrobonazzola sandrobonazzola requested review from kwk and psss November 20, 2025 08:36
assert stats.stats[0].name == "Work on tasks"
assert stats.stats[0].stats == ['Task One', 'Task Two', 'Task Three']
assert stats.header() is None
stats.header()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why no assert?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

header doesn't return. So either we needed to change header() to return None or the assert here was not complying with typing. No personal preference, kept the call to header just for coverage sake.

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