Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Acceptdatetime.timedelta Input inBot Method Parameters#4651

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 8 commits intomasterfromfeature/#4575-timedelta-method-input
Feb 2, 2025

Conversation

Bibo-Joshi
Copy link
Member

Adresses part one of#4575

@Bibo-JoshiBibo-Joshi added the 🔌 enhancementpr description: enhancement labelJan 15, 2025
@codecovCodecov
Copy link

codecovbot commentedJan 15, 2025
edited
Loading

❌ 1 Tests Failed:

Tests completedFailedPassedSkipped
658316582552
View the top 1 failed tests by shortest run time
tests.test_bot.TestBotWithRequest::test_send_close_date_default_tz[UTC-ZoneInfo]
Stack Traces | 5.18s run time
self=<tests.test_bot.TestBotWithRequestobjectat0x000001CB66A25ED0>tz_bot=PytestExtBot[token=690091347:AAFLmR5pAB5Ycpe_mOh7zM4JFBOh0z3T0To]super_group_id='-1001279600026'asyncdeftest_send_close_date_default_tz(self,tz_bot,super_group_id):question="Is this a test?"answers= ["Yes","No","Maybe"]reply_markup=InlineKeyboardMarkup.from_button(InlineKeyboardButton(text="text",callback_data="data")        )aware_close_date=dtm.datetime.now(tz=tz_bot.defaults.tzinfo)+dtm.timedelta(seconds=5)close_date=aware_close_date.replace(tzinfo=None)msg=awaittz_bot.send_poll(# The timezone returned from this is always converted to UTCchat_id=super_group_id,question=question,options=answers,close_date=close_date,read_timeout=60,        )msg.poll._unfreeze()# Sometimes there can be a few seconds delay, so don't let the test fail due to that->msg.poll.close_date=msg.poll.close_date.astimezone(aware_close_date.tzinfo)EAttributeError:'NoneType'objecthasnoattribute'astimezone'tests\test_bot.py:2775:AttributeError

To view more test analytics, go to theTest Analytics Dashboard
📢 Thoughts on this report?Let us know!

Copy link
Member

@harshil21harshil21 left a comment

Choose a reason for hiding this comment

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

lgtm

# Conflicts:#telegram/_bot.py#telegram/_utils/types.py#telegram/ext/_extbot.py
@Bibo-JoshiBibo-Joshi merged commita2150b3 intomasterFeb 2, 2025
26 checks passed
@Bibo-JoshiBibo-Joshi deleted the feature/#4575-timedelta-method-input branchFebruary 2, 2025 08:31
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 10, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@harshil21harshil21harshil21 approved these changes

@PoolitzerPoolitzerAwaiting requested review from Poolitzer

Assignees
No one assigned
Labels
🔌 enhancementpr description: enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Bibo-Joshi@harshil21

[8]ページ先頭

©2009-2025 Movatter.jp