Cleanup for Codacy
This commit is contained in:
parent
637e69db9d
commit
7989aacc58
@ -4,7 +4,6 @@ import java.io.IOException;
|
|||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -53,7 +52,6 @@ import com.google.refine.model.Cell;
|
|||||||
import com.google.refine.model.Column;
|
import com.google.refine.model.Column;
|
||||||
import com.google.refine.model.Project;
|
import com.google.refine.model.Project;
|
||||||
import com.google.refine.model.Recon;
|
import com.google.refine.model.Recon;
|
||||||
import com.google.refine.model.ReconCandidate;
|
|
||||||
import com.google.refine.model.ReconStats;
|
import com.google.refine.model.ReconStats;
|
||||||
import com.google.refine.model.recon.StandardReconConfig.ColumnDetail;
|
import com.google.refine.model.recon.StandardReconConfig.ColumnDetail;
|
||||||
import com.google.refine.util.JSONUtilities;
|
import com.google.refine.util.JSONUtilities;
|
||||||
|
@ -216,16 +216,4 @@ public class WikitextImporterTests extends ImporterTest {
|
|||||||
whenGetIntegerOption("headerLines", options, 1);
|
whenGetIntegerOption("headerLines", options, 1);
|
||||||
whenGetStringOption("reconService", options, "https://tools.wmflabs.org/openrefine-wikidata/en/api");
|
whenGetStringOption("reconService", options, "https://tools.wmflabs.org/openrefine-wikidata/en/api");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void verifyOptions() {
|
|
||||||
try {
|
|
||||||
verify(options, times(1)).getInt("limit");
|
|
||||||
verify(options, times(1)).getBoolean("guessCellValueTypes");
|
|
||||||
verify(options, times(1)).getBoolean("storeBlankCellsAsNulls");
|
|
||||||
verify(options, times(1)).getBoolean("blankSpanningCells");
|
|
||||||
} catch (JSONException e) {
|
|
||||||
Assert.fail("JSON exception",e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ Refine.WikitextParserUI.prototype._updatePreview = function() {
|
|||||||
this._progressContainer.show();
|
this._progressContainer.show();
|
||||||
|
|
||||||
this._controller.updateFormatAndOptions(this.getOptions(), function(result) {
|
this._controller.updateFormatAndOptions(this.getOptions(), function(result) {
|
||||||
if (result.status == "ok") {
|
if (result.status === "ok") {
|
||||||
self._controller.getPreviewData(function(projectData) {
|
self._controller.getPreviewData(function(projectData) {
|
||||||
self._progressContainer.hide();
|
self._progressContainer.hide();
|
||||||
var container = self._dataContainer.unbind().empty();
|
var container = self._dataContainer.unbind().empty();
|
||||||
|
@ -132,7 +132,7 @@ ReconciliationManager.getOrRegisterServiceFromUrl = function(url, f) {
|
|||||||
if (service == null) {
|
if (service == null) {
|
||||||
ReconciliationManager.registerStandardService(url, function(idx) {
|
ReconciliationManager.registerStandardService(url, function(idx) {
|
||||||
ReconciliationManager.save(function() {
|
ReconciliationManager.save(function() {
|
||||||
f(ReconciliationManager.standardServices[i]);
|
f(ReconciliationManager.standardServices[idx]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -141,10 +141,9 @@ ReconciliationManager.getOrRegisterServiceFromUrl = function(url, f) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ReconciliationManager.ensureDefaultServicePresent = function() {
|
ReconciliationManager.ensureDefaultServicePresent = function() {
|
||||||
console.log('ensureDefaultServicePresent');
|
|
||||||
var lang = $.i18n._('core-recon')["wd-recon-lang"];
|
var lang = $.i18n._('core-recon')["wd-recon-lang"];
|
||||||
var url = "https://tools.wmflabs.org/openrefine-wikidata/"+lang+"/api";
|
var url = "https://tools.wmflabs.org/openrefine-wikidata/"+lang+"/api";
|
||||||
ReconciliationManager.getOrRegisterServiceFromUrl(url, function(service) { ; });
|
ReconciliationManager.getOrRegisterServiceFromUrl(url, function(service) { });
|
||||||
return url;
|
return url;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user