Sourcery Starbot ⭐ refactored CdtDelta/YOP#1
Sourcery Starbot ⭐ refactored CdtDelta/YOP#1SourceryAI wants to merge 1 commit intoCdtDelta:masterfrom
Conversation
| pwdSize = 4 | ||
| key_attempt = ''.join((random.choice(chars)) for x in range(pwdSize)) | ||
| return key_attempt | ||
| return ''.join((random.choice(chars)) for x in range(pwdSize)) |
There was a problem hiding this comment.
Function fvde_key refactored with the following changes:
- Inline variable that is only used once
| bit_values = BitArray(parse_data) | ||
| binary_values = bit_values.bin | ||
| return binary_values | ||
| return bit_values.bin |
There was a problem hiding this comment.
Function hash_data_parse refactored with the following changes:
- Inline variable that is only used once
| pwdSize = 4 | ||
| key_attempt = ''.join((random.choice(chars)) for x in range(pwdSize)) | ||
| return key_attempt | ||
| return ''.join((random.choice(chars)) for x in range(pwdSize)) |
There was a problem hiding this comment.
Function fvde_key refactored with the following changes:
- Inline variable that is only used once
| } | ||
| desc_db_state = dict_db_state[db_state] | ||
| return desc_db_state | ||
| return dict_db_state[db_state] |
There was a problem hiding this comment.
Function trans_db_state refactored with the following changes:
- Inline variable that is only used once
|
|
||
|
|
||
| # Licensed under the GPL | ||
| # http://www.gnu.org/copyleft/gpl.html | ||
| # | ||
| # Version 1.0 | ||
| # Tom Yarrish | ||
|
|
||
| import sys | ||
| import dns.resolver | ||
| import dns.reversename | ||
|
|
||
| ip_count = dict() | ||
| ip_top_count = list() | ||
| ip_count = {} | ||
| ip_top_count = [] |
There was a problem hiding this comment.
Lines 9-15 refactored with the following changes:
- Replace list() with []
- Replace dict() with {}
| def devide(x, y): | ||
| answer = x / y | ||
| return answer | ||
| return x / y |
There was a problem hiding this comment.
Function devide refactored with the following changes:
- Inline variable that is only used once
| answer = x * y | ||
| return answer | ||
| return x * y |
There was a problem hiding this comment.
Function multeply refactored with the following changes:
- Inline variable that is only used once
| "?" : "Unknown"} | ||
| opcode = dns_opcode[opcode] | ||
| return opcode | ||
| return dns_opcode[opcode] |
There was a problem hiding this comment.
Function dns_opcode_parse refactored with the following changes:
- Inline variable that is only used once
| flag_values = [] | ||
| for flag_letter in flaglist: | ||
| flag_values.append(dns_flags[flag_letter]) | ||
| return flag_values | ||
| return [dns_flags[flag_letter] for flag_letter in flaglist] |
There was a problem hiding this comment.
Function dns_flags_parse refactored with the following changes:
- Convert for loop into list comprehension
- Inline variable that is only used once
| def ie_sig_ver_parse(decoder): | ||
| ie_sig_ver_func = decoder[0:28] | ||
| return ie_sig_ver_func | ||
| return decoder[0:28] |
There was a problem hiding this comment.
Function ie_sig_ver_parse refactored with the following changes:
- Inline variable that is only used once
| "?" : "Unknown"} | ||
| opcode = dns_opcode[opcode] | ||
| return opcode | ||
| return dns_opcode[opcode] |
There was a problem hiding this comment.
Function dns_opcode_parse refactored with the following changes:
- Inline variable that is only used once
| flag_values = [] | ||
| for flag_letter in flaglist: | ||
| flag_values.append(dns_flags[flag_letter]) | ||
| return flag_values | ||
| return [dns_flags[flag_letter] for flag_letter in flaglist] |
There was a problem hiding this comment.
Function dns_flags_parse refactored with the following changes:
- Convert for loop into list comprehension
- Inline variable that is only used once
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: