From c0457f02044980ed8dcb5e61f486195e00545d1a Mon Sep 17 00:00:00 2001 From: thomashii Date: Sun, 12 Sep 2021 22:12:18 +0800 Subject: [PATCH] Fixed warnings --- packages/container/angel_container_generator/pubspec.yaml | 1 - packages/eventsource/pubspec.yaml | 1 - packages/framework/example/main.dart | 2 -- packages/framework/example/view.dart | 2 -- packages/framework/lib/src/core/response_context.dart | 4 +++- packages/framework/test/pretty_log.dart | 4 +++- packages/framework/test/server_test.dart | 2 +- packages/orm/angel_orm_test/lib/src/has_map_test.dart | 1 - 8 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/container/angel_container_generator/pubspec.yaml b/packages/container/angel_container_generator/pubspec.yaml index 7e8dc788..7813b67b 100644 --- a/packages/container/angel_container_generator/pubspec.yaml +++ b/packages/container/angel_container_generator/pubspec.yaml @@ -1,6 +1,5 @@ name: angel_container_generator version: 2.0.0 -author: Tobe O description: Codegen support for using pkg:reflectable with pkg:angel_container. homepage: https://github.com/angel-dart/container.git publish_to: none diff --git a/packages/eventsource/pubspec.yaml b/packages/eventsource/pubspec.yaml index 78ed7476..d13748e2 100644 --- a/packages/eventsource/pubspec.yaml +++ b/packages/eventsource/pubspec.yaml @@ -2,7 +2,6 @@ name: angel_eventsource version: 2.0.0 description: Server-sent Events (SSE) plugin for Angel. homepage: https://github.com/angel-dart/eventsource -author: Tobe O publish_to: none environment: sdk: ">=2.10.0 <3.0.0" diff --git a/packages/framework/example/main.dart b/packages/framework/example/main.dart index f0f7f3e2..8a43dca9 100644 --- a/packages/framework/example/main.dart +++ b/packages/framework/example/main.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:angel3_container/mirrors.dart'; import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_framework/http.dart'; diff --git a/packages/framework/example/view.dart b/packages/framework/example/view.dart index dfac7d06..ea933b9d 100644 --- a/packages/framework/example/view.dart +++ b/packages/framework/example/view.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:angel3_container/mirrors.dart'; import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_framework/http.dart'; diff --git a/packages/framework/lib/src/core/response_context.dart b/packages/framework/lib/src/core/response_context.dart index 850c3037..04c4f314 100644 --- a/packages/framework/lib/src/core/response_context.dart +++ b/packages/framework/lib/src/core/response_context.dart @@ -243,7 +243,9 @@ abstract class ResponseContext final m = _findRoute(route.router); if (m != null) return m; - } else if (route.name == name) return route; + } else if (route.name == name) { + return route; + } } return null; diff --git a/packages/framework/test/pretty_log.dart b/packages/framework/test/pretty_log.dart index 83427f07..30296e30 100644 --- a/packages/framework/test/pretty_log.dart +++ b/packages/framework/test/pretty_log.dart @@ -31,6 +31,8 @@ AnsiCode chooseLogColor(Level level) { } else if (level == Level.CONFIG || level == Level.FINE || level == Level.FINER || - level == Level.FINEST) return lightGray; + level == Level.FINEST) { + return lightGray; + } return resetAll; } diff --git a/packages/framework/test/server_test.dart b/packages/framework/test/server_test.dart index ed14183b..de3175a3 100644 --- a/packages/framework/test/server_test.dart +++ b/packages/framework/test/server_test.dart @@ -220,5 +220,5 @@ class CustomCloseService extends Service { @Expose('/foo') class FooController extends Controller { @Expose('/bar') - bar() async => 'baz'; + Future bar() async => 'baz'; } diff --git a/packages/orm/angel_orm_test/lib/src/has_map_test.dart b/packages/orm/angel_orm_test/lib/src/has_map_test.dart index 858c4d2c..97ff210b 100644 --- a/packages/orm/angel_orm_test/lib/src/has_map_test.dart +++ b/packages/orm/angel_orm_test/lib/src/has_map_test.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:convert'; import 'package:angel3_orm/angel3_orm.dart'; import 'package:test/test.dart'; import 'models/has_map.dart';