Skip to content

Commit

Permalink
Merge pull request #13 from dagardner-nv/mdd_fix-23.07-linting-david
Browse files Browse the repository at this point in the history
pylint fixes
  • Loading branch information
mdemoret-nv authored Jul 22, 2023
2 parents 2eb0450 + c97fb0f commit 5f0784d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# pylint: disable=invalid-name
"""
Example Usage:
python sid-minibert-20230424-script.py \
Expand Down
1 change: 1 addition & 0 deletions morpheus/stages/postprocess/timeseries_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def _calc_outliers(self, action: _TimeSeriesAction):
idx = action.message.get_meta().index

# Find anomalies that are in the active message
# pylint: disable=singleton-comparison
paired_anomalies = anomalies[anomalies == True].index.intersection(idx) # noqa: E712

# Return the anomalies for priting. But only if the current message has anomalies that will get flagged
Expand Down
3 changes: 2 additions & 1 deletion tests/examples/ransomware_detection/test_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

@pytest.mark.use_python
class TestPreprocessingRWStage:
# pylint: disable=no-name-in-module

def test_constructor(self, config: Config, rwd_conf: dict):
from stages.preprocessing import PreprocessingRWStage
Expand Down Expand Up @@ -58,7 +59,7 @@ def test_sliding_window_non_consequtive(self, config: Config, rwd_conf: dict):

window = 3
ids = [17, 19, 21, 23, 31, 33]
assert stage._sliding_window_offsets(list(reversed(ids)), len(ids), window=window) == []
assert len(stage._sliding_window_offsets(list(reversed(ids)), len(ids), window=window)) == 0

def test_sliding_window_offsets_errors(self, config: Config, rwd_conf: dict):
from stages.preprocessing import PreprocessingRWStage
Expand Down

0 comments on commit 5f0784d

Please sign in to comment.