Skip to content

Commit d762add

Browse files
committed
Enhance type hinting and improve code clarity in PyZaplinePlus
- Updated type hints across multiple files, including `core.py`, `noise_detection.py`, and `__init__.py`, to improve code readability and maintainability. - Adjusted the license reference in `pyproject.toml` for consistency. - Improved documentation links in `index.md` to ensure proper navigation. These changes contribute to a more robust codebase and enhance the overall user experience.
1 parent c007c93 commit d762add

5 files changed

Lines changed: 94 additions & 59 deletions

File tree

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[![PyPI - Version](https://img.shields.io/pypi/v/pyzaplineplus.svg)](https://pypi.org/project/pyzaplineplus/)
66
[![Python Versions](https://img.shields.io/pypi/pyversions/pyzaplineplus.svg)](https://pypi.org/project/pyzaplineplus/)
7-
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](../about/license.md)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](about/license.md)
88
[![CI](https://github.com/snesmaeili/PyZapline_plus/actions/workflows/ci.yml/badge.svg)](https://github.com/snesmaeili/PyZapline_plus/actions)
99

1010
---

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "pyzaplineplus"
77
description = "Adaptive removal of spectral line-noise in EEG via DSS (Zapline-plus reimplementation)."
88
readme = { file = "README.md", content-type = "text/markdown" }
99
requires-python = ">=3.8"
10-
license = { text = "MIT" }
10+
license = { file = "LICENSE" }
1111
authors = [
1212
{ name = "Sina Esmaeili", email = "[email protected]" }
1313
]
@@ -142,3 +142,13 @@ exclude_lines = [
142142
"class .*\bProtocol\\):",
143143
"@(abc\\.)?abstractmethod",
144144
]
145+
146+
[tool.mypy]
147+
python_version = "3.9"
148+
packages = ["pyzaplineplus"]
149+
ignore_missing_imports = true
150+
warn_redundant_casts = true
151+
warn_unused_ignores = true
152+
warn_return_any = false
153+
no_implicit_optional = true
154+
check_untyped_defs = true

pyzaplineplus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
try:
2525
# Prefer version from package metadata (setuptools-scm)
26-
from importlib.metadata import version as _pkg_version # type: ignore
26+
from importlib.metadata import version as _pkg_version
2727

2828
__version__ = _pkg_version("pyzaplineplus")
2929
except Exception: # pragma: no cover - fallback for editable installs without metadata

0 commit comments

Comments
 (0)