Skip to content

Conversation

@AnOctopus
Copy link
Contributor

Final widget implementations for testing framework!

@AnOctopus AnOctopus added the security-assessment-completed Security assessment has been completed for PR label Apr 17, 2023

@overload
def get(self, element_type: Literal["date_input"]) -> Sequence[DateInput]:
...

Check notice

Code scanning / CodeQL

Statement has no effect

This statement has no effect.
@tconkling tconkling self-requested a review April 18, 2023 18:08
Copy link
Contributor

@tconkling tconkling left a comment

Choose a reason for hiding this comment

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

Nice!

Comment on lines 1085 to 1089
def increment(self) -> TimeInput:
dt = datetime.combine(date.today(), self.value) + timedelta(seconds=self.step)
return self.set_value(dt.time())

def decrement(self) -> TimeInput:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add docstrings for these? How much do they increment by, and also - do they need to be synchronized with any frontend code? (Like, do we need to make sure that TimeInput.increment here matches the behavior of TimeInput.increment on the frontend, or is that not important?)

@AnOctopus AnOctopus merged commit b390adf into streamlit:develop Apr 19, 2023
@AnOctopus AnOctopus deleted the feat/date-and-time-test-classes branch April 19, 2023 21:57
tconkling added a commit to tconkling/streamlit that referenced this pull request Apr 20, 2023
* develop:
  Dont use constraints file in scheduled builds (streamlit#6470)
  Reorganize tests from streamlit_test.py (streamlit#6481)
  Date and Time test classes (streamlit#6501)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants