diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 58cada26..c73fb154 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,15 +12,15 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.10.0 + rev: 24.2.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort exclude: ^(nobrainer/_version\.py|versioneer\.py)$ diff --git a/nobrainer/io.py b/nobrainer/io.py index e9f64c6a..7bfcf7b0 100644 --- a/nobrainer/io.py +++ b/nobrainer/io.py @@ -1,4 +1,5 @@ """Input/output methods.""" + import csv import functools import multiprocessing diff --git a/nobrainer/models/autoencoder.py b/nobrainer/models/autoencoder.py index 779f4b17..5288466b 100644 --- a/nobrainer/models/autoencoder.py +++ b/nobrainer/models/autoencoder.py @@ -1,5 +1,6 @@ """Model definition for Autoencoder. """ + import math from tensorflow.keras import layers, models diff --git a/nobrainer/models/dcgan.py b/nobrainer/models/dcgan.py index 2b5f3698..0e4a94d3 100644 --- a/nobrainer/models/dcgan.py +++ b/nobrainer/models/dcgan.py @@ -1,5 +1,6 @@ """Model definition for DCGAN. """ + import math from tensorflow.keras import layers, models diff --git a/nobrainer/models/progressiveae.py b/nobrainer/models/progressiveae.py index a2ed1551..23c62d21 100644 --- a/nobrainer/models/progressiveae.py +++ b/nobrainer/models/progressiveae.py @@ -1,5 +1,6 @@ """Model definition for ProgressiveAE. """ + import tensorflow as tf from tensorflow.keras import layers, models diff --git a/nobrainer/processing/segmentation.py b/nobrainer/processing/segmentation.py index 66e1768d..7ceaf821 100644 --- a/nobrainer/processing/segmentation.py +++ b/nobrainer/processing/segmentation.py @@ -90,9 +90,9 @@ def _compile(): epochs=epochs, steps_per_epoch=dataset_train.get_steps_per_epoch(), validation_data=dataset_validate.dataset if dataset_validate else None, - validation_steps=dataset_validate.get_steps_per_epoch() - if dataset_validate - else None, + validation_steps=( + dataset_validate.get_steps_per_epoch() if dataset_validate else None + ), callbacks=callbacks, ) diff --git a/setup.py b/setup.py index 84d34993..d2d2c60a 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,7 @@ To install, run `python3 setup.py install`. """ + import os import sys