News for hackers. Stuff that matters.
Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by micimize on Friday January 07, 2022 @01:15PM (#29842587)
For those looking to avoid this specific problem, there is a flake8 rule: https://pypi.org/project/flake8-no-implicit-concat.

More broadly, the https://codereview.doctors makers are making the point that their tool caught an easy-to-miss issue that most wouldn't think to add a rule for. A bit of an open question to me how many of those there really are at the language level, but still seems like a neat project.

Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by oblvious-earth on Friday January 07, 2022 @01:33PM (#29842849)
Also all but 1 of the issues they found relates to test code, it seems people are a little less careful compared to functional code.

Also in terms of mistakes codereviewdoctor twice linked to the same issue in their blog https://github.com/tensorflow/tensorflow/issues/53636 and raised the PR to the wrong project https://github.com/tensorflow/tensorflow/pull/53637 (I guess Tensorflow vendors Keras, easy mistake)

Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by thrdbndndn on Friday January 07, 2022 @04:42PM (#29845214)
https://github.com/tensorflow/tensorflow/tree/0d8705c82c64df...

    STOP!
    This folder contains the legacy Keras code which is stale and about to be deleted. The current Keras code lives in github/keras-team/keras.

    Please do not use the code from this folder.
Yeah, not the most obvious notice.

The fact they didn't find the same mistake(s) in keras-team/keras (I assume they scanned, it's one of the most popular Python repo) makes me believe these issues have been fixed/removed in up-to-date karas repo.

Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by rikatee on Friday January 07, 2022 @05:13PM (#29845566)
once tensorflow pointed to keras-team this happened

https://github.com/keras-team/keras/issues/15854

resulting in

https://github.com/keras-team/keras/pull/15876

Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by mdda on Saturday January 08, 2022 @02:49AM (#29849599)
The automatic bug report generation tool produces the following:

"Absent comma results in unwatned string concatenation on line 330"

Bug-ception!

Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by sundarurfriend on Friday January 07, 2022 @04:10PM (#29844873)
> all but 1 of the issues they found relates to test code, it seems people are a little less careful compared to functional code.

Also a factor that bugs in functional code are more visible, both during development and to users once shipped. So there may have been an equal number or more such bugs in the non-test code, that just didn't remain in the code base for this long.

Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by pfisherman on Friday January 07, 2022 @01:50PM (#29843070)
Ime, Black will add parenthesis to clearly and explicitly indicate a tuple where there is trailing comma. Figured this out when I made the trailing comma mistake and wondered why Black kept reformatting my code.
Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by trulyme on Friday January 07, 2022 @05:11PM (#29845537)
Black rules. I love it that I don't need to have a discussion about style with anyone when Black is used on the project.
Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by rockwotj on Friday January 07, 2022 @07:35PM (#29847127)
TBH I think every language should have a longer like this and teams should just apply it and never need a discussion about formatting.
Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by tedmiston on Friday January 07, 2022 @02:55PM (#29843896)
The URL in this comment has an incorrect TLD: it should be `doctor` (singular).

https://codereview.doctor/

Re:5% of 666 Python repos had comma typo bugs (inc V8, Tenso... by rikatee on Friday January 07, 2022 @01:57PM (#29843194)
there is also https://pypi.org/project/flake8-tuple/

typo in the url (or in HN's markup) btw: it's https://codereview.doctor