3 ms·
For those looking to avoid this specific problem, there is a flake8 rule: https://pypi.org/project/flake8-no-implicit-concat https://pypi.org/project/flake8-no-
by micimize 5y ago
For those looking to avoid this specific problem, there is a flake8 rule: https://pypi.org/project/flake8-no-implicit-concat https://pypi.org/project/flake8-no-implicit-concat.
More broadly, the https://codereview.doctors 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.
- rikatee 5y agothere is also https://pypi.org/project/flake8-tuple/ https://pypi.org/project/flake8-tuple/ typo in the url (or in HN's markup) btw: it's https://codereview.doctor https://codereview.doctor
- oblvious-earth 5y agoAlso 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 https://github.com/tensorflow/tensorflow/issues/53636 and raised the PR to the wrong project https://github.com/tensorflow/tensorflow/pull/53637 https://github.com/tensorflow/tensorflow/pull/53637 (I guess Tensorflow vendors Keras, easy mistake)
- sundarurfriend 5y ago> 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.
- thrdbndndn 5y agohttps://github.com/tensorflow/tensorflow/tree/0d8705c82c64dfb39c49e346de1a66182e5eabd1/tensorflow/python/keras#readme 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.
- rikatee 5y agoonce tensorflow pointed to keras-team this happened https://github.com/keras-team/keras/issues/15854 https://github.com/keras-team/keras/issues/15854 resulting in https://github.com/keras-team/keras/pull/15876 https://github.com/keras-team/keras/pull/15876
- mdda 5y agoThe automatic bug report generation tool produces the following: "Absent comma results in unwatned string concatenation on line 330" Bug-ception!
- pfisherman 5y agoIme, 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.
- tedmiston 5y agoThe URL in this comment has an incorrect TLD: it should be `doctor` (singular). https://codereview.doctor/ https://codereview.doctor/