Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pylint fixes #13

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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