Skip to content

The code formatting of assignments and double-slash comments is not aligned #243

@tianpan2024

Description

@tianpan2024

The code formatting of assignments and double-slash comments is not aligned

Image

// Python4Delphi Demo
function PyPoint_getattr(obj: PPyObject; Key: PAnsiChar): PPyObject; cdecl;
begin
with GetPythonEngine, PPyPoint(obj)^ do begin
if Key = 'x' then
Result :=
PyLong_FromLong(po_x)
// code format error!
else if Key = 'y' then
Result := PyLong_FromLong(po_y)
else if Key = 'z' then
Result := PyLong_FromLong(po_z)
else begin
Result := PyObject_GenericGetAttr(obj, PyUnicodeFromString(Key));
if not Assigned(Result) then
PyErr_SetString(PyExc_AttributeError^, PAnsiChar(Utf8Encode(Format('Unknown attribute "%s"', [Key]))));
end;
end;
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions