Sourcery Starbot ⭐ refactored wkunzhi/Python3-Spider#28
Sourcery Starbot ⭐ refactored wkunzhi/Python3-Spider#28SourceryAI wants to merge 1 commit intowkunzhi:masterfrom
Conversation
SourceryAI
left a comment
There was a problem hiding this comment.
Due to GitHub API limits, only the first 60 comments can be shown.
There was a problem hiding this comment.
Function LoginBli.is_pixel_similar refactored with the following changes:
- Lift code into else after jump in control flow (
reintroduce-else) - Replace if statement with if expression (
assign-if-exp) - Simplify boolean if expression (
boolean-if-exp-identity) - Remove unnecessary casts to int, str, float or bool (
remove-unnecessary-cast)
There was a problem hiding this comment.
Function LoginBli.get_track refactored with the following changes:
- Replace if statement with if expression (
assign-if-exp)
This removes the following comments ( why? ):
# 加速度为正2
# 加速度为负3
There was a problem hiding this comment.
Function DownVideo.get_cid_list refactored with the following changes:
- Use f-string instead of string concatenation [×3] (
use-fstring-for-concatenation)
There was a problem hiding this comment.
Function DownVideo.get_play_list refactored with the following changes:
- Replace interpolated string formatting with f-string [×2] (
replace-interpolation-with-fstring) - Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function DownVideo.schedule_cmd refactored with the following changes:
- Replace interpolated string formatting with f-string (
replace-interpolation-with-fstring)
There was a problem hiding this comment.
Function DianPing.get_css_offset refactored with the following changes:
- Convert for loop into dictionary comprehension (
dict-comprehension) - Inline variable that is only used once [×3] (
inline-variable) - Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function DianPing.get_svg_url_dict refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation)
There was a problem hiding this comment.
Function DianPing.get_comment_num refactored with the following changes:
- Replace call to format with f-string (
use-fstring-for-formatting)
There was a problem hiding this comment.
Function ParseFontClass.parse_ttf refactored with the following changes:
- Use f-string instead of string concatenation [×2] (
use-fstring-for-concatenation)
There was a problem hiding this comment.
Function ParseFontClass.install_ttf refactored with the following changes:
- Use f-string instead of string concatenation [×4] (
use-fstring-for-concatenation)
This removes the following comments ( why? ):
# 下载写入
# 用完了删掉,节省资源占用
There was a problem hiding this comment.
Lines 18-18 refactored with the following changes:
- Replace list(), dict() or set() with comprehension (
collection-builtin-to-comprehension) - Replace unneeded comprehension with generator (
comprehension-to-generator)
This removes the following comments ( why? ):
# 对应关系数量转换
There was a problem hiding this comment.
Function ParseVideo.__init__ refactored with the following changes:
- Use f-string instead of string concatenation [×2] (
use-fstring-for-concatenation)
There was a problem hiding this comment.
Function ParseVideo.go_location refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function ParseVideo.go_message refactored with the following changes:
- Use f-string instead of string concatenation [×3] (
use-fstring-for-concatenation)
There was a problem hiding this comment.
Function TripleDesUtils.decrypt refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function UseRSA.check_sign refactored with the following changes:
- Ensure constant in comparison is on the right (
flip-comparison) - Use x is None rather than x == None (
none-compare)
There was a problem hiding this comment.
Function UseDES.encrypt refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function UseDES3.encrypt refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function UseDES3.decrypt refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function use_sha refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function main refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function ZGC.login refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function ZGC.make_md5 refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation) - Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function login refactored with the following changes:
- Use f-string instead of string concatenation [×11] (
use-fstring-for-concatenation)
There was a problem hiding this comment.
Function MakeParam.get_key_vi refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Function YX.make_data refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
There was a problem hiding this comment.
Lines 17-17 refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation)
There was a problem hiding this comment.
Function BaiDu.make_dv refactored with the following changes:
- Use f-string instead of string concatenation [×2] (
use-fstring-for-concatenation) - Remove unnecessary calls to
str()from formatted values in f-strings (remove-str-from-fstring)
There was a problem hiding this comment.
Function BaiDu.get_img refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation)
There was a problem hiding this comment.
Function BaiDu.get_phone refactored with the following changes:
- Use f-string instead of string concatenation [×2] (
use-fstring-for-concatenation)
Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨
Here's your pull request refactoring your most popular Python repo.
If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.
Review changes via command line
To manually merge these changes, make sure you're on the
masterbranch, then run: