Whole file

kayak/pypika

The author described this change as fix `Field.__init__` (#742). It counts as a record because the check below fails on the code as it stood at f1552da36 and passes on 822140eb8, with nothing else changed between the two runs.

Fix saved2024-04-17
Sharing licenceApache-2.0 · LICENSE.txt
Change size+4 0

What the code was meant to do, written into the code itself as a save note

fix `Field.__init__` (#742)

The change

548548 ) -> None:
549549 super().__init__(alias=alias)
550550 self.name = name
551+ if isinstance(table, str):
552+ # avoid circular import at load time
553+ from pypika.queries import Table
554+ table = Table(table)
551555 self.table = table
552556
553557 def nodes_(self) -> Iterator[NodeT]:

The check that tells the two apart

failpass·pypika/tests/test_terms.py::FieldInitTests::test_init_with_str_table

Check file pypika/tests/test_terms.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before itf1552da3663af0bcc3eac78ce8a34c08fad1a858
Broken version dated2024-04-17
Modulepypika.terms
Units changedField
Fingerprint0d4945c6dd0a9df3
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in kayak/pypika