diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7875c87..876e3fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ ci: autoupdate_schedule: 'quarterly' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v5.0.0 hooks: - id: check-docstring-first - id: end-of-file-fixer @@ -10,33 +10,33 @@ repos: - id: mixed-line-ending - id: check-merge-conflict - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.17.0 + rev: v2.7.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/PyCQA/flake8 - rev: 3.9.2 + rev: 7.1.1 hooks: - id: flake8 additional_dependencies: [flake8-typing-imports==1.7.0] - - repo: https://github.com/myint/autoflake - rev: v1.4 + - repo: https://github.com/PyCQA/autoflake + rev: v2.3.1 hooks: - id: autoflake args: ["--in-place", "--remove-all-unused-imports", "--ignore-init-module-imports", "--remove-unused-variables"] - repo: https://github.com/PyCQA/isort - rev: 5.8.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black - rev: 21.5b2 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v2.19.0 + rev: v3.19.1 hooks: - id: pyupgrade args: [--py37-plus] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.812 + rev: v1.14.1 hooks: - id: mypy diff --git a/setup.cfg b/setup.cfg index bb5e0f2..0ef7101 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ url = https://github.com/Hekstra-Lab/napari-labeller author = Ian Hunt-Isaak, John Russell author_email = ianhuntisaak@gmail.com johncrussell25@gmail.com license = BSD-3-Clause -license_file = LICENSE +license_files = LICENSE classifiers = Development Status :: 2 - Pre-Alpha Framework :: napari @@ -17,9 +17,6 @@ classifiers = Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 Topic :: Software Development :: Testing project_urls = Bug Tracker = https://github.com/Hekstra-Lab/napari-labeller/issues @@ -34,7 +31,7 @@ install_requires = netcdf4 numpy xarray -python_requires = >=3.7 +python_requires = >=3.9 include_package_data = True package_dir = =src diff --git a/src/napari_labeller/_dock_widget.py b/src/napari_labeller/_dock_widget.py index 741a68f..6d35f8c 100644 --- a/src/napari_labeller/_dock_widget.py +++ b/src/napari_labeller/_dock_widget.py @@ -6,6 +6,7 @@ Replace code below according to your needs. """ + from pathlib import Path from typing import Optional, Union diff --git a/src/napari_labeller/_function.py b/src/napari_labeller/_function.py index 731e92c..071ac3f 100644 --- a/src/napari_labeller/_function.py +++ b/src/napari_labeller/_function.py @@ -6,6 +6,7 @@ Replace code below according to your needs. """ + from enum import Enum from typing import TYPE_CHECKING @@ -38,6 +39,7 @@ def threshold( # 2. Second example, a function that adds, subtracts, # multiplies, or divides two layers + # using Enums is a good way to get a dropdown menu. # Used here to select from np functions class Operation(Enum):