Skip to content

Commit 47e3094

Browse files
committed
fix(treewide): fix analyzer issues
Signed-off-by: Sphericalkat <[email protected]>
1 parent 99d282b commit 47e3094

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

lib/algorithms/token_set.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ class TokenSet {
1515

1616
var sortedInter = (intersection.toList()..sort()).join(' ').trim();
1717
var sorted1to2 =
18-
(sortedInter + ' ' + (diff1to2.toList()..sort()).join(' ')).trim();
18+
('$sortedInter ${(diff1to2.toList()..sort()).join(' ')}').trim();
1919
var sorted2to1 =
20-
(sortedInter + ' ' + (diff2to1.toList()..sort()).join(' ')).trim();
20+
('$sortedInter ${(diff2to1.toList()..sort()).join(' ')}').trim();
2121

2222
var results = <int>[];
2323

lib/algorithms/weighted_ratio.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import '../applicable.dart';
44
import '../fuzzywuzzy.dart';
55

66
class WeightedRatio implements Applicable {
7-
static const UNBASE_SCALE = 0.95;
8-
static const PARTIAL_SCALE = 0.90;
9-
static const TRY_PARTIALS = true;
7+
static const unbaseScaleConst = 0.95;
8+
static const partialScaleConst = 0.90;
9+
static const tryPartialsConst = true;
1010

1111
const WeightedRatio();
1212

@@ -19,9 +19,9 @@ class WeightedRatio implements Applicable {
1919
return 0;
2020
}
2121

22-
var tryPartials = TRY_PARTIALS;
23-
var unbaseScale = UNBASE_SCALE;
24-
var partialScale = PARTIAL_SCALE;
22+
var tryPartials = tryPartialsConst;
23+
var unbaseScale = unbaseScaleConst;
24+
var partialScale = partialScaleConst;
2525

2626
var base = ratio(s1, s2);
2727
var lenRatio = max(len1, len2) / min(len1, len2);

lib/diffutils/diff_utils.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class DiffUtils {
122122

123123
pos--;
124124
ops[pos] = eop;
125-
eop.type = EditType.INSERT;
125+
eop.type = EditType.insert;
126126
eop.spos = i + o1;
127127
eop.dpos = --j + o2;
128128
ptr--;
@@ -135,7 +135,7 @@ class DiffUtils {
135135

136136
pos--;
137137
ops[pos] = eop;
138-
eop.type = EditType.DELETE;
138+
eop.type = EditType.delete;
139139
eop.spos = --i + o1;
140140
eop.dpos = j + o2;
141141
ptr -= len2;
@@ -149,7 +149,7 @@ class DiffUtils {
149149
var eop = EditOp();
150150
ops[pos] = eop;
151151

152-
eop.type = EditType.REPLACE;
152+
eop.type = EditType.replace;
153153
eop.spos = --i + o1;
154154
eop.dpos = --j + o2;
155155

@@ -162,7 +162,7 @@ class DiffUtils {
162162
pos--;
163163
var eop = EditOp();
164164
ops[pos] = eop;
165-
eop.type = EditType.INSERT;
165+
eop.type = EditType.insert;
166166
eop.spos = i + o1;
167167
eop.dpos = --j + o2;
168168
ptr--;
@@ -176,7 +176,7 @@ class DiffUtils {
176176
var eop = EditOp();
177177
ops[pos] = eop;
178178

179-
eop.type = EditType.DELETE;
179+
eop.type = EditType.delete;
180180
eop.spos = --i + o1;
181181
eop.dpos = j + o2;
182182
ptr -= len2;
@@ -271,7 +271,7 @@ class DiffUtils {
271271
EditType type;
272272

273273
for (i = n; i != 0;) {
274-
while (ops[o].type == EditType.KEEP && --i != 0) {
274+
while (ops[o].type == EditType.keep && --i != 0) {
275275
o++;
276276
}
277277

@@ -286,7 +286,7 @@ class DiffUtils {
286286
type = ops[o].type!;
287287

288288
switch (type) {
289-
case EditType.REPLACE:
289+
case EditType.replace:
290290
do {
291291
spos++;
292292
dpos++;
@@ -298,7 +298,7 @@ class DiffUtils {
298298
dpos == ops[o].dpos);
299299
break;
300300

301-
case EditType.DELETE:
301+
case EditType.delete:
302302
do {
303303
spos++;
304304
i--;
@@ -309,7 +309,7 @@ class DiffUtils {
309309
dpos == ops[o].dpos);
310310
break;
311311

312-
case EditType.INSERT:
312+
case EditType.insert:
313313
do {
314314
dpos++;
315315
i--;
@@ -337,7 +337,7 @@ class DiffUtils {
337337
var mbIndex = 0;
338338

339339
for (i = n; i != 0;) {
340-
while (ops[o].type == EditType.KEEP && --i != 0) {
340+
while (ops[o].type == EditType.keep && --i != 0) {
341341
o++;
342342
}
343343

@@ -358,7 +358,7 @@ class DiffUtils {
358358
type = ops[o].type!;
359359

360360
switch (type) {
361-
case EditType.REPLACE:
361+
case EditType.replace:
362362
do {
363363
spos++;
364364
dpos++;
@@ -370,7 +370,7 @@ class DiffUtils {
370370
dpos == ops[o].dpos);
371371
break;
372372

373-
case EditType.DELETE:
373+
case EditType.delete:
374374
do {
375375
spos++;
376376
i--;
@@ -381,7 +381,7 @@ class DiffUtils {
381381
dpos == ops[o].dpos);
382382
break;
383383

384-
case EditType.INSERT:
384+
case EditType.insert:
385385
do {
386386
dpos++;
387387
i--;

lib/diffutils/structs/edit_type.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
enum EditType { DELETE, EQUAL, INSERT, REPLACE, KEEP }
1+
enum EditType { delete, equal, insert, replace, keep }

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: "fuzzywuzzy"
2-
version: "1.1.3"
2+
version: "1.1.4"
33
homepage: "https://github.com/sphericalkat/dart-fuzzywuzzy"
44
description: An implementation of the popular fuzzywuzzy package in Dart, to suit all your fuzzy string matching/searching needs!
55
repository: "https://github.com/sphericalkat/dart-fuzzywuzzy"
66

77
environment:
8-
sdk: ">=3.0.0"
8+
sdk: ">=3.0.0 <4.0.0"
99

1010
dependencies:
1111
collection: ^1.16.0

0 commit comments

Comments
 (0)