Skip to content

Commit

Permalink
wip pep8 pylinting
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMaullin committed Jul 20, 2023
2 parents e4dfd72 + 4b40fb1 commit ec9d595
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pylint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
6 changes: 4 additions & 2 deletions blm/blm_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ def _main(argv=None):
help='Path to inputs yaml file')

# Parse the arguments
args = parser.parse_args()
if argv is None:
args = parser.parse_args()
else:
args = parser.parse_args(argv)

# If the argument is just a filename without a directory,
# prepend the current working directory
if os.path.dirname(args.inputs_yml) == '':
args.inputs_yml = os.path.join(os.getcwd(), args.inputs_yml)
Expand Down
9 changes: 4 additions & 5 deletions test/blm_cluster_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
from cleanup import cleanup
from generate_test_data import *
import os
import numpy
import pandas
import dask
import subprocess
from scipy import ndimage
from dask.distributed import Client, as_completed
<<<<<<< HEAD
from dask.distributed import performance_report
import nibabel as nib
import sys
=======
import sys
>>>>>>> 4b40fb10a03c65cca1f0f6f335327690dc2b8d05

# Get the directory containing the script
test_dir = os.path.dirname(__file__)
Expand Down

0 comments on commit ec9d595

Please sign in to comment.