◐ Shell
clean mode source ↗

fix: emit pass for empty generated classes by kellen-miller · Pull Request #100 · sqlc-dev/sqlc-gen-python

Summary

  • emit pass for empty generated classes
  • add printer coverage for empty class bodies
  • add a zero-parameter query_parameter_limit: 0 regression fixture

Root cause

When query_parameter_limit: 0 is enabled, zero-parameter queries still emit a params class. If that class has no fields, the generated Python class body is empty, which produces invalid syntax.

Validation

  • go test ./internal/printer
  • built the plugin locally and reproduced the zero-parameter query case in a temp directory, confirming CountBarsParams now emits pass

Closes #99.