Skip to content

Commit

Permalink
Slight linting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
illusional committed Sep 14, 2023
1 parent 76467a0 commit 534319a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
run: |
pip install -r requirements-dev.txt
pip install .
# test to see if this is happier
mkdir .mypy_cache
- name: pre-commit
run: pre-commit run --all-files
4 changes: 2 additions & 2 deletions scripts/parse_ped.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
""" A really simple script to import a pedigree file """

import click

from cloudpathlib import CloudPath

from metamist.apis import (
Expand All @@ -17,7 +16,8 @@ def main(ped_file_path: str, project: str):

fapi = FamilyApi()

with CloudPath(ped_file_path).open() as ped_file:
# pylint: disable=no-member
with CloudPath(ped_file_path).open() as ped_file: # type: ignore
fapi.import_pedigree(
file=ped_file,
has_header=True,
Expand Down
7 changes: 5 additions & 2 deletions test/test_generic_auditor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import namedtuple
import unittest
from collections import namedtuple
from unittest.mock import MagicMock, patch

from metamist.audit.generic_auditor import GenericAuditor

# pylint: disable=dangerous-default-value
Expand Down Expand Up @@ -569,7 +570,9 @@ def test_analyses_for_sgs_without_crams(self, mock_query):
}

with self.assertLogs(level='WARNING') as log:
_ = auditor.analyses_for_sgs_without_crams(sgs_without_crams)
# catch the warning logs from here and check below
auditor.analyses_for_sgs_without_crams(sgs_without_crams)

self.assertEqual(len(log.output), 8) # 8 analysis types checked
self.assertEqual(len(log.records), 8)
self.assertIn(
Expand Down

0 comments on commit 534319a

Please sign in to comment.