News for hackers. Stuff that matters.
Re:A ChatGPT mistake cost us $10k by hamasho on Sunday June 09, 2024 @07:47PM (#40628579)
I wonder are there linters to detect those types of mistakes for SQLAlchemy. Even though I'm aware of such pitfalls, it's nice if linters can catch them cause I'm not confident to cache them all the time during code review.

Some linters like pyright can identify dangerous defaults in function call, like `def hello(x=[]): pass` (mutable values shouldn't be a default). Linter plugins for widely-used and critical libraries like SQLAlchemy are nice to have.

Re:A ChatGPT mistake cost us $10k by whakim on Sunday June 09, 2024 @09:32PM (#40629249)
The mutable-default-arguments issue is easy for a third-party to linter to catch because it doesn't require any specific knowledge about primary keys and databases. Are there static typing plugins for other common packages that would catch issues like this?
Re:A ChatGPT mistake cost us $10k by aragilar on Sunday June 09, 2024 @10:42PM (#40629628)
I personally use pylint, which I've found to be the most aggressive python linter.