Closed pixeebot[bot] closed 6 months ago
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information
Check out the playback for this Pull Request here.
Processing PR updates...
Unable to locate .performanceTestingBot config file
Thanks @pixeebot[bot] for opening this PR!
For COLLABORATOR only :
To add labels, comment on the issue
/label add label1,label2,label3
To remove labels, comment on the issue
/label remove label1,label2,label3
[!IMPORTANT]
Review skipped
Bot user detected.
To trigger a single review, invoke the
@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
PR Details of @pixeebot[bot] in huawei-noah-Pretrained-Language-Model : | OPEN | CLOSED | TOTAL |
---|---|---|---|
1 | 10 | 11 |
Hello @pixeebot[bot]! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
AutoTinyBERT/generate_data.py
:Line 88:80: E501 line too long (101 > 79 characters) Line 92:80: E501 line too long (130 > 79 characters)
AutoTinyBERT/latency_predictor.py
:Line 72:80: E501 line too long (92 > 79 characters)
AutoTinyBERT/pre_training.py
:Line 80:80: E501 line too long (94 > 79 characters)
AutoTinyBERT/searcher.py
:Line 387:80: E501 line too long (82 > 79 characters) Line 392:80: E501 line too long (87 > 79 characters)
AutoTinyBERT/utils.py
:Line 31:80: E501 line too long (81 > 79 characters) Line 50:80: E501 line too long (81 > 79 characters)
BinaryBERT/helper.py
:Line 22:3: E111 indentation is not a multiple of four Line 22:80: E501 line too long (86 > 79 characters)
Line 557:80: E501 line too long (81 > 79 characters)
JABER-PyTorch/generate_data.py
:Line 1:80: E501 line too long (101 > 79 characters) Line 7:11: E401 multiple imports on one line Line 10:18: E231 missing whitespace after ',' Line 11:1: E402 module level import not at top of file Line 11:16: E401 multiple imports on one line Line 12:1: E402 module level import not at top of file Line 14:1: E402 module level import not at top of file Line 15:1: E402 module level import not at top of file Line 16:1: E402 module level import not at top of file Line 17:1: E402 module level import not at top of file Line 19:1: E402 module level import not at top of file Line 20:1: E402 module level import not at top of file Line 23:1: E402 module level import not at top of file Line 24:1: E402 module level import not at top of file Line 25:1: E402 module level import not at top of file Line 26:1: E402 module level import not at top of file Line 27:1: E402 module level import not at top of file Line 29:1: E402 module level import not at top of file Line 29:80: E501 line too long (89 > 79 characters) Line 41:1: E266 too many leading '#' for block comment Line 45:1: E302 expected 2 blank lines, found 1 Line 46:80: E501 line too long (92 > 79 characters) Line 48:80: E501 line too long (101 > 79 characters) Line 56:29: E701 multiple statements on one line (colon) Line 64:80: E501 line too long (86 > 79 characters) Line 66:49: W605 invalid escape sequence '\?' Line 82:1: E266 too many leading '#' for block comment Line 84:1: E305 expected 2 blank lines after class or function definition, found 1 Line 138:80: E501 line too long (80 > 79 characters) Line 139:80: E501 line too long (123 > 79 characters) Line 140:80: E501 line too long (125 > 79 characters) Line 141:80: E501 line too long (123 > 79 characters) Line 142:80: E501 line too long (125 > 79 characters) Line 143:80: E501 line too long (117 > 79 characters) Line 148:80: E501 line too long (123 > 79 characters) Line 150:80: E501 line too long (123 > 79 characters) Line 151:80: E501 line too long (95 > 79 characters) Line 153:80: E501 line too long (84 > 79 characters) Line 154:80: E501 line too long (132 > 79 characters) Line 154:85: E261 at least two spaces before inline comment Line 157:80: E501 line too long (87 > 79 characters) Line 158:80: E501 line too long (190 > 79 characters) Line 162:80: E501 line too long (105 > 79 characters) Line 163:80: E501 line too long (118 > 79 characters) Line 165:80: E501 line too long (153 > 79 characters) Line 166:80: E501 line too long (143 > 79 characters) Line 167:80: E501 line too long (115 > 79 characters) Line 168:17: E128 continuation line under-indented for visual indent Line 168:80: E501 line too long (172 > 79 characters) Line 169:80: E501 line too long (150 > 79 characters) Line 170:80: E501 line too long (153 > 79 characters) Line 171:80: E501 line too long (107 > 79 characters) Line 172:17: E128 continuation line under-indented for visual indent Line 173:17: E128 continuation line under-indented for visual indent Line 173:80: E501 line too long (106 > 79 characters) Line 177:80: E501 line too long (134 > 79 characters) Line 186:80: E501 line too long (93 > 79 characters) Line 189:80: E501 line too long (108 > 79 characters) Line 191:80: E501 line too long (97 > 79 characters) Line 193:80: E501 line too long (83 > 79 characters) Line 199:80: E501 line too long (80 > 79 characters) Line 204:80: E501 line too long (91 > 79 characters) Line 207:80: E501 line too long (106 > 79 characters) Line 209:80: E501 line too long (94 > 79 characters) Line 211:80: E501 line too long (81 > 79 characters) Line 219:80: E501 line too long (93 > 79 characters) Line 220:80: E501 line too long (93 > 79 characters) Line 221:80: E501 line too long (83 > 79 characters) Line 224:80: E501 line too long (115 > 79 characters) Line 227:80: E501 line too long (98 > 79 characters) Line 229:80: E501 line too long (93 > 79 characters) Line 230:80: E501 line too long (101 > 79 characters) Line 232:80: E501 line too long (86 > 79 characters) Line 233:80: E501 line too long (105 > 79 characters) Line 234:80: E501 line too long (80 > 79 characters) Line 241:60: E202 whitespace before '}' Line 245:18: E124 closing bracket does not match visual indentation Line 252:80: E501 line too long (101 > 79 characters) Line 253:80: E501 line too long (105 > 79 characters) Line 260:80: E501 line too long (112 > 79 characters) Line 261:80: E501 line too long (125 > 79 characters) Line 262:46: E231 missing whitespace after ',' Line 264:6: E131 continuation line unaligned for hanging indent Line 269:80: E501 line too long (84 > 79 characters) Line 279:80: E501 line too long (107 > 79 characters) Line 280:80: E501 line too long (117 > 79 characters) Line 282:80: E501 line too long (114 > 79 characters) Line 285:80: E501 line too long (102 > 79 characters) Line 297:80: E501 line too long (84 > 79 characters) Line 298:80: E501 line too long (99 > 79 characters) Line 310:80: E501 line too long (118 > 79 characters) Line 312:38: E225 missing whitespace around operator Line 313:80: E501 line too long (84 > 79 characters) Line 322:80: E501 line too long (108 > 79 characters) Line 336:80: E501 line too long (81 > 79 characters) Line 351:80: E501 line too long (106 > 79 characters) Line 359:80: E501 line too long (108 > 79 characters) Line 362:80: E501 line too long (96 > 79 characters) Line 373:80: E501 line too long (97 > 79 characters) Line 377:80: E501 line too long (117 > 79 characters) Line 378:80: E501 line too long (101 > 79 characters) Line 380:80: E501 line too long (98 > 79 characters) Line 386:80: E501 line too long (116 > 79 characters) Line 389:80: E501 line too long (118 > 79 characters) Line 391:80: E501 line too long (89 > 79 characters) Line 393:48: E231 missing whitespace after ',' Line 393:80: E501 line too long (99 > 79 characters) Line 396:80: E501 line too long (108 > 79 characters) Line 397:80: E501 line too long (111 > 79 characters) Line 398:80: E501 line too long (104 > 79 characters) Line 400:48: E231 missing whitespace after ',' Line 400:80: E501 line too long (97 > 79 characters) Line 403:80: E501 line too long (104 > 79 characters) Line 404:80: E501 line too long (89 > 79 characters) Line 406:80: E501 line too long (100 > 79 characters) Line 410:80: E501 line too long (100 > 79 characters) Line 411:80: E501 line too long (93 > 79 characters) Line 414:80: E501 line too long (103 > 79 characters) Line 418:80: E501 line too long (114 > 79 characters) Line 424:25: E211 whitespace before '(' Line 432:1: E266 too many leading '#' for block comment Line 434:1: E302 expected 2 blank lines, found 1 Line 448:49: E271 multiple spaces after keyword Line 448:80: E501 line too long (89 > 79 characters) Line 454:80: E501 line too long (96 > 79 characters) Line 479:80: E501 line too long (81 > 79 characters) Line 482:55: E701 multiple statements on one line (colon) Line 483:39: E701 multiple statements on one line (colon) Line 489:1: E266 too many leading '#' for block comment Line 491:1: E302 expected 2 blank lines, found 1 Line 494:80: E501 line too long (84 > 79 characters) Line 496:42: E741 ambiguous variable name 'l' Line 496:80: E501 line too long (112 > 79 characters) Line 500:46: E741 ambiguous variable name 'l' Line 500:80: E501 line too long (102 > 79 characters) Line 501:55: E701 multiple statements on one line (colon) Line 519:80: E501 line too long (104 > 79 characters) Line 550:80: E501 line too long (80 > 79 characters) Line 564:80: E501 line too long (102 > 79 characters) Line 572:80: E501 line too long (99 > 79 characters) Line 587:80: E501 line too long (84 > 79 characters) Line 588:80: E501 line too long (81 > 79 characters) Line 595:80: E501 line too long (93 > 79 characters) Line 620:1: E266 too many leading '#' for block comment Line 622:1: E302 expected 2 blank lines, found 1 Line 623:56: W605 invalid escape sequence '\d' Line 623:73: W605 invalid escape sequence '.' Line 623:80: E501 line too long (104 > 79 characters) Line 647:1: E302 expected 2 blank lines, found 1 Line 660:52: E701 multiple statements on one line (colon) Line 661:29: E701 multiple statements on one line (colon) Line 664:5: E303 too many blank lines (2) Line 666:80: E501 line too long (104 > 79 characters) Line 666:98: E701 multiple statements on one line (colon) Line 671:80: E501 line too long (104 > 79 characters) Line 671:98: E701 multiple statements on one line (colon) Line 691:1: E302 expected 2 blank lines, found 1 Line 696:80: E501 line too long (95 > 79 characters) Line 700:80: E501 line too long (80 > 79 characters) Line 711:80: E501 line too long (108 > 79 characters) Line 719:37: E225 missing whitespace around operator Line 720:13: E741 ambiguous variable name 'l' Line 726:80: E501 line too long (83 > 79 characters) Line 731:1: E302 expected 2 blank lines, found 1 Line 731:80: E501 line too long (105 > 79 characters) Line 745:80: E501 line too long (86 > 79 characters) Line 746:80: E501 line too long (81 > 79 characters) Line 752:80: E501 line too long (109 > 79 characters) Line 762:80: E501 line too long (93 > 79 characters) Line 763:80: E501 line too long (90 > 79 characters) Line 776:33: E251 unexpected spaces around keyword / parameter equals Line 776:42: E231 missing whitespace after ':' Line 801:1: E266 too many leading '#' for block comment Line 820:80: E501 line too long (84 > 79 characters) Line 823:27: E701 multiple statements on one line (colon) Line 824:80: E501 line too long (104 > 79 characters) Line 863:80: E501 line too long (102 > 79 characters) Line 865:80: E501 line too long (100 > 79 characters) Line 875:80: E501 line too long (88 > 79 characters) Line 881:80: E501 line too long (81 > 79 characters) Line 884:80: E501 line too long (96 > 79 characters) Line 889:80: E501 line too long (104 > 79 characters) Line 891:31: E701 multiple statements on one line (colon) Line 911:43: E701 multiple statements on one line (colon) Line 920:80: E501 line too long (84 > 79 characters) Line 935:35: E701 multiple statements on one line (colon) Line 938:80: E501 line too long (80 > 79 characters) Line 939:80: E501 line too long (97 > 79 characters) Line 949:23: E701 multiple statements on one line (colon) Line 950:80: E501 line too long (84 > 79 characters) Line 952:13: E265 block comment should start with '# ' Line 953:52: E701 multiple statements on one line (colon) Line 953:80: E501 line too long (101 > 79 characters) Line 954:80: E501 line too long (81 > 79 characters) Line 959:80: E501 line too long (97 > 79 characters) Line 964:24: E741 ambiguous variable name 'l' Line 969:45: E261 at least two spaces before inline comment Line 975:80: E501 line too long (86 > 79 characters) Line 985:52: E701 multiple statements on one line (colon) Line 991:52: E701 multiple statements on one line (colon) Line 996:80: E501 line too long (88 > 79 characters) Line 1008:80: E501 line too long (86 > 79 characters) Line 1017:80: E501 line too long (89 > 79 characters) Line 1020:33: E701 multiple statements on one line (colon) Line 1029:18: E701 multiple statements on one line (colon) Line 1035:80: E501 line too long (83 > 79 characters) Line 1054:1: E303 too many blank lines (3) Line 1055:18: E701 multiple statements on one line (colon) Line 1058:20: E701 multiple statements on one line (colon) Line 1067:1: E302 expected 2 blank lines, found 1 Line 1078:24: E701 multiple statements on one line (colon) Line 1079:34: E701 multiple statements on one line (colon) Line 1087:1: E266 too many leading '#' for block comment Line 1090:1: E302 expected 2 blank lines, found 1 Line 1096:29: E261 at least two spaces before inline comment Line 1096:30: E262 inline comment should start with '# ' Line 1099:80: E501 line too long (85 > 79 characters) Line 1101:80: E501 line too long (95 > 79 characters) Line 1102:80: E501 line too long (106 > 79 characters) Line 1105:80: E501 line too long (86 > 79 characters) Line 1106:80: E501 line too long (96 > 79 characters) Line 1110:80: E501 line too long (103 > 79 characters) Line 1119:80: E501 line too long (105 > 79 characters) Line 1134:80: E501 line too long (93 > 79 characters) Line 1138:80: E501 line too long (94 > 79 characters) Line 1151:80: E501 line too long (88 > 79 characters) Line 1153:80: E501 line too long (88 > 79 characters) Line 1155:80: E501 line too long (88 > 79 characters) Line 1158:80: E501 line too long (87 > 79 characters) Line 1169:80: E501 line too long (90 > 79 characters) Line 1173:61: E701 multiple statements on one line (colon) Line 1174:41: E701 multiple statements on one line (colon) Line 1184:80: E501 line too long (98 > 79 characters) Line 1190:80: E501 line too long (90 > 79 characters) Line 1194:80: E501 line too long (89 > 79 characters) Line 1196:80: E501 line too long (93 > 79 characters) Line 1197:80: E501 line too long (93 > 79 characters) Line 1198:80: E501 line too long (92 > 79 characters) Line 1204:80: E501 line too long (112 > 79 characters) Line 1207:80: E501 line too long (99 > 79 characters) Line 1214:80: E501 line too long (109 > 79 characters) Line 1218:80: E501 line too long (103 > 79 characters) Line 1220:80: E501 line too long (86 > 79 characters) Line 1223:40: E701 multiple statements on one line (colon) Line 1226:39: E701 multiple statements on one line (colon) Line 1229:39: E701 multiple statements on one line (colon) Line 1230:80: E501 line too long (91 > 79 characters) Line 1232:80: E501 line too long (115 > 79 characters) Line 1262:80: E501 line too long (113 > 79 characters) Line 1264:80: E501 line too long (84 > 79 characters) Line 1282:80: E501 line too long (106 > 79 characters) Line 1283:80: E501 line too long (106 > 79 characters) Line 1296:80: E501 line too long (81 > 79 characters) Line 1299:80: E501 line too long (88 > 79 characters) Line 1324:80: E501 line too long (105 > 79 characters) Line 1331:80: E501 line too long (81 > 79 characters) Line 1334:80: E501 line too long (104 > 79 characters) Line 1338:80: E501 line too long (83 > 79 characters) Line 1345:80: E501 line too long (106 > 79 characters) Line 1355:80: E501 line too long (96 > 79 characters) Line 1359:26: E701 multiple statements on one line (colon) Line 1363:33: E701 multiple statements on one line (colon) Line 1367:80: E501 line too long (97 > 79 characters) Line 1375:80: E501 line too long (99 > 79 characters) Line 1386:5: E303 too many blank lines (3) Line 1391:80: E501 line too long (99 > 79 characters) Line 1394:48: E741 ambiguous variable name 'l' Line 1401:80: E501 line too long (97 > 79 characters) Line 1418:80: E501 line too long (106 > 79 characters) Line 1419:80: E501 line too long (106 > 79 characters) Line 1442:80: E501 line too long (84 > 79 characters) Line 1447:80: E501 line too long (84 > 79 characters) Line 1451:80: E501 line too long (86 > 79 characters) Line 1459:80: E501 line too long (83 > 79 characters) Line 1460:80: E501 line too long (90 > 79 characters) Line 1462:35: E701 multiple statements on one line (colon) Line 1463:35: E701 multiple statements on one line (colon) Line 1464:35: E701 multiple statements on one line (colon) Line 1491:80: E501 line too long (92 > 79 characters) Line 1492:80: E501 line too long (99 > 79 characters) Line 1522:9: E303 too many blank lines (2) Line 1554:20: E701 multiple statements on one line (colon) Line 1576:80: E501 line too long (87 > 79 characters) Line 1578:80: E501 line too long (106 > 79 characters) Line 1579:80: E501 line too long (84 > 79 characters) Line 1580:80: E501 line too long (94 > 79 characters) Line 1588:30: E701 multiple statements on one line (colon) Line 1590:30: E701 multiple statements on one line (colon) Line 1606:80: E501 line too long (104 > 79 characters) Line 1613:32: E713 test for membership should be 'not in' Line 1614:80: E501 line too long (113 > 79 characters) Line 1619:80: E501 line too long (97 > 79 characters) Line 1621:80: E501 line too long (106 > 79 characters) Line 1627:80: E501 line too long (98 > 79 characters) Line 1629:80: E501 line too long (91 > 79 characters) Line 1648:80: E501 line too long (80 > 79 characters) Line 1649:80: E501 line too long (109 > 79 characters) Line 1657:80: E501 line too long (92 > 79 characters) Line 1663:80: E501 line too long (109 > 79 characters) Line 1673:80: E501 line too long (84 > 79 characters) Line 1679:80: E501 line too long (80 > 79 characters) Line 1680:80: E501 line too long (105 > 79 characters) Line 1680:105: E261 at least two spaces before inline comment Line 1687:80: E501 line too long (109 > 79 characters) Line 1703:80: E501 line too long (85 > 79 characters) Line 1704:80: E501 line too long (92 > 79 characters) Line 1710:80: E501 line too long (107 > 79 characters) Line 1714:80: E501 line too long (110 > 79 characters) Line 1716:80: E501 line too long (91 > 79 characters) Line 1720:47: E251 unexpected spaces around keyword / parameter equals Line 1720:56: E231 missing whitespace after ':' Line 1720:80: E501 line too long (92 > 79 characters) Line 1721:80: E501 line too long (106 > 79 characters) Line 1721:105: E261 at least two spaces before inline comment Line 1733:80: E501 line too long (97 > 79 characters) Line 1737:80: E501 line too long (87 > 79 characters) Line 1745:80: E501 line too long (112 > 79 characters) Line 1753:80: E501 line too long (95 > 79 characters) Line 1755:80: E501 line too long (98 > 79 characters) Line 1760:80: E501 line too long (94 > 79 characters) Line 1761:38: E741 ambiguous variable name 'l' Line 1768:80: E501 line too long (101 > 79 characters) Line 1786:80: E501 line too long (88 > 79 characters) Line 1794:80: E501 line too long (114 > 79 characters) Line 1814:80: E501 line too long (112 > 79 characters) Line 1816:80: E501 line too long (87 > 79 characters) Line 1831:1: E266 too many leading '#' for block comment Line 1835:80: E501 line too long (99 > 79 characters) Line 1840:80: E501 line too long (105 > 79 characters) Line 1860:43: E251 unexpected spaces around keyword / parameter equals Line 1860:52: E231 missing whitespace after ':' Line 1884:41: E701 multiple statements on one line (colon) Line 1931:80: E501 line too long (83 > 79 characters) Line 1932:74: E701 multiple statements on one line (colon) Line 1932:80: E501 line too long (83 > 79 characters) Line 1933:64: E701 multiple statements on one line (colon) Line 1934:80: E501 line too long (106 > 79 characters) Line 1934:97: E701 multiple statements on one line (colon) Line 1935:70: E701 multiple statements on one line (colon) Line 1938:80: E501 line too long (116 > 79 characters) Line 1941:80: E501 line too long (85 > 79 characters) Line 1943:1: E305 expected 2 blank lines after class or function definition, found 1
NEZHA-TensorFlow/modeling_test.py
:Line 150:7: E111 indentation is not a multiple of four
NEZHA-TensorFlow/utils/create_pretraining_data.py
:Line 423:3: E111 indentation is not a multiple of four
PMLM/create_pretraining_data.py
:Line 451:3: E111 indentation is not a multiple of four Line 470:3: E111 indentation is not a multiple of four
Line 1356:7: E111 indentation is not a multiple of four
TinyBERT/pregenerate_training_data.py
:Line 88:80: E501 line too long (101 > 79 characters) Line 92:80: E501 line too long (130 > 79 characters) Line 245:80: E501 line too long (83 > 79 characters) Line 254:80: E501 line too long (99 > 79 characters) Line 254:98: E203 whitespace before ':' Line 261:80: E501 line too long (92 > 79 characters)
This codemod replaces all instances of functions in the
random
module (e.g.random.random()
with their, much more secure, equivalents from thesecrets
module (e.g.secrets.SystemRandom().random()
).There is significant algorithmic complexity in getting computers to generate genuinely unguessable random bits. The
random.random()
function uses a method of pseudo-random number generation that unfortunately emits fairly predictable numbers.If the numbers it emits are predictable, then it's obviously not safe to use in cryptographic operations, file name creation, token construction, password generation, and anything else that's related to security. In fact, it may affect security even if it's not directly obvious.
Switching to a more secure version is simple and the changes look something like this:
More reading
* [https://owasp.org/www-community/vulnerabilities/Insecure_Randomness](https://owasp.org/www-community/vulnerabilities/Insecure_Randomness) * [https://docs.python.org/3/library/random.html](https://docs.python.org/3/library/random.html)I have additional improvements ready for this repo! If you want to see them, leave the comment:
... and I will open a new PR right away!
🧚🤖 Powered by Pixeebot
💬Feedback | 👥Community | 📚Docs | Codemod ID: pixee:python/secure-random