Whole file

kayak/pypika

The author described this change as fix field with alias. It counts as a record because the check below fails on the code as it stood at 8a398afb7 and passes on 95f3d61c4, with nothing else changed between the two runs.

Fix saved2020-10-23
Sharing licenceApache-2.0 · LICENSE.txt
Change size+2 2

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

fix field with alias

The change

314314 class JSON(Term):
315315 table = None
316316
317- def __init__(self, value: Any, alias: Optional[str] = None) -> None:
317+ def __init__(self, value: Any = None, alias: Optional[str] = None) -> None:
318318 super().__init__(alias)
319319 self.value = value
320320
458458 def __init__(
459459 self, name: str, alias: Optional[str] = None, table: Optional[Union[str, "Selectable"]] = None
460460 ) -> None:
461- super().__init__(alias)
461+ super().__init__(alias=alias)
462462 self.name = name
463463 self.table = table
464464

The check that tells the two apart

failpass·pypika/tests/test_terms.py::FieldAliasTests::test_when_alias_specified

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 it8a398afb7d1e29e5191f2d7f801fc4fa59fb7d8a
Broken version dated2020-10-08
Modulepypika.terms
Units changedField, JSON
Fingerprint2e37c0b8f18d3a8f
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