Skip to content

Add ical_value property to vTime#1372

Open
xxiaoxiong wants to merge 1 commit into
collective:mainfrom
xxiaoxiong:add-ical-value-vtime
Open

Add ical_value property to vTime#1372
xxiaoxiong wants to merge 1 commit into
collective:mainfrom
xxiaoxiong:add-ical-value-vtime

Conversation

@xxiaoxiong
Copy link
Copy Markdown

This PR adds the ical_value property to vTime, contributing to Issue #876.

Changes

  • Added ical_value property to vTime (src/icalendar/prop/dt/time.py)
    • Returns: datetime.time - The underlying Python time object
    • Type hint: time
    • RFC reference: :rfc:5545#section-3.3.12
    • Includes comprehensive docstring with examples

Tests

  • Created test_vTime.py with 3 comprehensive test cases:
    • test_ical_value_local_time - Tests local time without timezone
    • test_ical_value_utc_time - Tests UTC time with timezone
    • test_ical_value_from_ical - Tests with parsed ical strings
  • All tests pass: 3 passed

Quality Checks

  • Add type hint
  • Add docstring with RFC reference
  • Add tests for all code paths
  • Pass ruff format check
  • Pass ruff lint check
  • All tests pass

Relates to #876

- Add ical_value property with type hints and docstring
- Returns the underlying datetime.time object
- Add comprehensive tests for ical_value (3 test cases)
- All tests pass
- Code formatted with ruff

Relates to collective#876
@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 icalendar | 🛠️ Build #32599653 | 📁 Comparing f2bfc01 against latest (7357cec)

  🔍 Preview build  

5 files changed · ± 5 modified

± Modified

@angatha
Copy link
Copy Markdown
Collaborator

angatha commented May 9, 2026

Question from #1368 remains: Are you familiar with our contributing guidelines especially the part about artifical Intelligence?

@SashankBhamidi
Copy link
Copy Markdown
Member

Question from #1368 remains: Are you familiar with our contributing guidelines especially the part about artifical Intelligence?

I'm not comfortable reviewing a bunch of spam PRs opened right after one another.

@stevepiercy
Copy link
Copy Markdown
Member

@xxiaoxiong would you fix the test and add a change log entry? We'll close PRs after they've been open a week without addressing the failing checks. This applies for all PRs that you opened almost a week ago. Thank you!

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.

4 participants