@@ -458,7 +458,9 @@ Scale <- ggproto("Scale", NULL,
458458 # ' as described in e.g. [`?continuous_scale`][continuous_scale].
459459 # ' Note that `limits` is expected in transformed space.
460460 aesthetics = character (),
461- palette = function () cli :: cli_abort(" Not implemented." ),
461+ palette = function () {
462+ cli :: cli_abort(" Not implemented." )
463+ },
462464
463465 limits = NULL ,
464466 na.value = NA ,
@@ -998,7 +1000,9 @@ ScaleContinuous <- ggproto("ScaleContinuous", Scale,
9981000 n.breaks = NULL ,
9991001 trans = transform_identity(),
10001002
1001- is_discrete = function () FALSE ,
1003+ is_discrete = function () {
1004+ FALSE
1005+ },
10021006
10031007 train = function (self , x ) {
10041008 if (length(x ) == 0 ) {
@@ -1257,7 +1261,9 @@ ScaleDiscrete <- ggproto("ScaleDiscrete", Scale,
12571261 n.breaks.cache = NULL ,
12581262 palette.cache = NULL ,
12591263
1260- is_discrete = function () TRUE ,
1264+ is_discrete = function () {
1265+ TRUE
1266+ },
12611267
12621268 train = function (self , x ) {
12631269 if (length(x ) == 0 ) {
@@ -1271,7 +1277,9 @@ ScaleDiscrete <- ggproto("ScaleDiscrete", Scale,
12711277 )
12721278 },
12731279
1274- transform = identity ,
1280+ transform = function (self , x ) {
1281+ x
1282+ },
12751283
12761284 map = function (self , x , limits = self $ get_limits()) {
12771285 limits <- vec_slice(limits , ! is.na(limits ))
@@ -1483,7 +1491,9 @@ ScaleBinned <- ggproto("ScaleBinned", Scale,
14831491 after.stat = FALSE ,
14841492 show.limits = FALSE ,
14851493
1486- is_discrete = function () FALSE ,
1494+ is_discrete = function () {
1495+ FALSE
1496+ },
14871497
14881498 train = function (self , x ) {
14891499 if (length(x ) == 0 ) {
@@ -1644,7 +1654,9 @@ ScaleBinned <- ggproto("ScaleBinned", Scale,
16441654 transformation $ transform(breaks )
16451655 },
16461656
1647- get_breaks_minor = function (... ) NULL ,
1657+ get_breaks_minor = function (... ) {
1658+ NULL
1659+ },
16481660
16491661 get_labels = function (self , breaks = self $ get_breaks()) {
16501662 if (is.null(breaks )) return (NULL )
0 commit comments