From 69492f3cd7473586fd1036a333ca823f52370ea8 Mon Sep 17 00:00:00 2001 From: gpetrochenkov-usgs <gpetrochenkov@usgs.gov> Date: Mon, 23 Mar 2020 21:46:09 -0400 Subject: [PATCH] Codacy fixes except L and $ imports --- .../scripts/networks/network-data-selector.js | 2 +- assets/src/scripts/store/index.js | 6 +- .../src/styles/components/_network-map.scss | 119 +++++++++--------- assets/src/styles/less/vendor.less | 8 +- assets/src/styles/main.scss | 2 +- wdfn-server/waterdata/views.py | 2 +- 6 files changed, 69 insertions(+), 70 deletions(-) diff --git a/assets/src/scripts/networks/network-data-selector.js b/assets/src/scripts/networks/network-data-selector.js index 2319043fc..7605fe5ee 100644 --- a/assets/src/scripts/networks/network-data-selector.js +++ b/assets/src/scripts/networks/network-data-selector.js @@ -9,5 +9,5 @@ export const hasNetworkData = createSelector( getNetworkSites, (networkSites) => - networkSites.length > 0, + networkSites.length > 0 ); \ No newline at end of file diff --git a/assets/src/scripts/store/index.js b/assets/src/scripts/store/index.js index 1300d454d..719e5ffed 100644 --- a/assets/src/scripts/store/index.js +++ b/assets/src/scripts/store/index.js @@ -24,14 +24,14 @@ export const configureReduxStore = function(initialState, reducers) { const store = createStore(createReducer(reducers), initialState, enhancers); // Add a dictionary to keep track of the registered async reducers - store.asyncReducers = {} + store.asyncReducers = {}; // Create an inject reducer function // This function adds the async reducer, and creates a new combined reducer store.injectReducer = (key, asyncReducer) => { - store.asyncReducers[key] = asyncReducer + store.asyncReducers[key] = asyncReducer; store.replaceReducer(createReducer(store.asyncReducers)); - } + }; // Return the modified store return store; diff --git a/assets/src/styles/components/_network-map.scss b/assets/src/styles/components/_network-map.scss index 6c3f7b50e..81f02c311 100644 --- a/assets/src/styles/components/_network-map.scss +++ b/assets/src/styles/components/_network-map.scss @@ -1,74 +1,73 @@ - #network-map { - height: 350px; - margin: 1em 0; +#network-map { + height: 350px; + margin: 1em 0; - .legend { + .legend { padding: 2px; background-color: white; - .legend-expand-container { - font-size: 14px; - font-weight: bold; + .legend-expand-container { + font-size: 14px; + font-weight: bold; - span { - padding-right: 2px; - } + span { + padding-right: 2px; + } - .legend-expand { - width: auto; - float: right; - padding: 0; - margin: 0; - color: black; - border: none; - border-radius: 0; - box-shadow: none; + .legend-expand { + width: auto; + float: right; + padding: 0; + margin: 0; + color: black; + border: none; + border-radius: 0; + box-shadow: none; - i { - padding: 2px; - background-color: color('base-lighter'); - } - } - } + i { + padding: 2px; + background-color: color('base-lighter'); + } + } + } - .legend-list-container { - #network-legend-list { - span { - margin-left: 2px; - } + .legend-list-container { + #network-legend-list { + span { + margin-left: 2px; + } - img { - padding-top: 2px; - width: 15px; - } - } + img { + padding-top: 2px; + width: 15px; + } + } - #fim-legend-list { - span { - margin-left: 2px; - } + #fim-legend-list { + span { + margin-left: 2px; + } - img { - padding-top: 2px; - width: 15px; - height: 13px; - } - } - } + img { + padding-top: 2px; + width: 15px; + height: 13px; + } + } + } - } + } - .leaflet-control-layers-selector { - left: 0; - position: relative; - display: inline; - height: auto; - width: auto; - outline-style: none; - } - - label { - margin: auto; - } - } + .leaflet-control-layers-selector { + left: 0; + position: relative; + display: inline; + height: auto; + width: auto; + outline-style: none; + } + label { + margin: auto; + } +} \ No newline at end of file diff --git a/assets/src/styles/less/vendor.less b/assets/src/styles/less/vendor.less index c0ca28912..3300dd816 100644 --- a/assets/src/styles/less/vendor.less +++ b/assets/src/styles/less/vendor.less @@ -1,4 +1,4 @@ -@import (inline) "../../../node_modules/leaflet/dist/leaflet.css"; -@import (inline) "../../../node_modules/leaflet.markercluster/dist/MarkerCluster.css"; -@import (inline) "../../../node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css"; -@import (inline) "../../../node_modules/datatables/media/css/jquery.dataTables.css"; +@import (inline) '../../../node_modules/leaflet/dist/leaflet.css'; +@import (inline) '../../../node_modules/leaflet.markercluster/dist/MarkerCluster.css'; +@import (inline) '../../../node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css'; +@import (inline) '../../../node_modules/datatables/media/css/jquery.dataTables.css'; diff --git a/assets/src/styles/main.scss b/assets/src/styles/main.scss index 49b052ea9..0543d8990 100644 --- a/assets/src/styles/main.scss +++ b/assets/src/styles/main.scss @@ -30,7 +30,7 @@ $fa-font-path: './fonts' !default; margin-bottom: 1em; } - &[data-component='network-map']{ + &[data-component='network-map'] { @import 'network'; margin-bottom: 1em; } diff --git a/wdfn-server/waterdata/views.py b/wdfn-server/waterdata/views.py index 73d3823f6..ba519e7ca 100644 --- a/wdfn-server/waterdata/views.py +++ b/wdfn-server/waterdata/views.py @@ -219,7 +219,7 @@ def networks(network_cd): http_code=http_code, network_cd=network_cd, collection=collection, - extent = extent + extent=extent ), http_code -- GitLab