Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

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
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

Sourcery refactored master branch#1

Open
sourcery-ai wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromsourcery/master

Conversation

sourcery-ai[bot]
Copy link

Branchmaster refactored bySourcery.

If you're happy with these changes, merge this Pull Request using theSquash and merge strategy.

See our documentationhere.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on themaster branch, then run:

git fetch origin sourcery/mastergit merge --ff-only FETCH_HEADgit reset HEAD^

Help usimprove this pull request!

@sourcery-aisourcery-aibot requested a review fromWybxcMay 20, 2022 08:07
Comment on lines -9 to +11
print('>>>' +msg)
print(f'>>>{msg}')
if msg[:4] == '####':
yiri.send_message('msg={}, title={}, sender={}'.format(msg, title, sender))
yiri.send_message(f'msg={msg}, title={title}, sender={sender}')
Copy link
Author

Choose a reason for hiding this comment

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

Functionon_message refactored with the following changes:

Comment on lines -30 to -39
if txt[4:] == '请使用最新版手机QQ查看。':
return '', 'Unknown'
else:
return txt, 'Text'
# 回复消息
return ('', 'Unknown') if txt[4:] == '请使用最新版手机QQ查看。' else (txt, 'Text')
elif layout_type == 'android.widget.LinearLayout':
txt = chat_item_content_layout.child(
'com.tencent.qqlite:id/chat_item_content_text').get_text().strip()
return txt, 'Text'
# 图片、语音或多媒体信息
Copy link
Author

Choose a reason for hiding this comment

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

Function_analyze_message_type refactored with the following changes:

This removes the following comments (why? ):

# 回复消息# 图片、语音或多媒体信息

Comment on lines -85 to +83
message_list = self.get_message_list()
if message_list:
if message_list := self.get_message_list():
self.latest_message = message_list[-1]
self.title = self.get_title()
logger_yiri.info('Session set up. Title: {}'.format(self.title))
logger_yiri.info(f'Session set up. Title: {self.title}')
Copy link
Author

Choose a reason for hiding this comment

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

FunctionSession.init_latest_message refactored with the following changes:

@sourcery-ai
Copy link
Author

Sourcery Code Quality Report

✅  Merging this PR willincrease code quality in the affected files by0.06%.

Quality metricsBeforeAfterChange
Complexity4.63 ⭐4.50 ⭐-0.13 👍
Method Length37.22 ⭐37.39 ⭐0.17 👎
Working memory5.89 ⭐5.93 ⭐0.04 👎
Quality80.78%80.84%0.06% 👍
Other metricsBeforeAfterChange
Lines164158-6
Changed filesQuality BeforeQuality AfterQuality Change
demo.py84.87% ⭐81.70% ⭐-3.17% 👎
YiriAir/driver.py80.65% ⭐80.82% ⭐0.17% 👍

Here are some functions in these files that still need a tune-up:

FileFunctionComplexityLengthWorking MemoryQualityRecommendation
YiriAir/driver.pySession._get_message_list_iter9 🙂93 🙂10 😞61.19% 🙂Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentationhere for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help usimprove this quality report!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@WybxcWybxcAwaiting requested review from Wybxc

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

0 participants

[8]ページ先頭

©2009-2025 Movatter.jp