mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 04:00:28 +01:00
all: Add *FORMAT-OFF* in various places.
This string is recognised by uncrustify, to disable formatting in the region marked by these comments. This is necessary in the qstrdef*.h files to prevent modification of the strings within the Q(...). In other places it is used to prevent excessive reformatting that would make the code less readable.
This commit is contained in:
@@ -224,6 +224,8 @@ const mp_obj_type_t mp_type_BaseException = {
|
||||
.attr = mp_obj_exception_attr,
|
||||
};
|
||||
|
||||
// *FORMAT-OFF*
|
||||
|
||||
// List of all exceptions, arranged as in the table at:
|
||||
// http://docs.python.org/3/library/exceptions.html
|
||||
MP_DEFINE_EXCEPTION(SystemExit, BaseException)
|
||||
@@ -303,6 +305,8 @@ MP_DEFINE_EXCEPTION(Exception, BaseException)
|
||||
MP_DEFINE_EXCEPTION(ResourceWarning, Warning)
|
||||
*/
|
||||
|
||||
// *FORMAT-ON*
|
||||
|
||||
mp_obj_t mp_obj_new_exception(const mp_obj_type_t *exc_type) {
|
||||
assert(exc_type->make_new == mp_obj_exception_make_new);
|
||||
return mp_obj_exception_make_new(exc_type, 0, 0, NULL);
|
||||
|
||||
Reference in New Issue
Block a user