Skip to content

Commit

Permalink
ci(pre-commit.ci): autoupdate (#124)
Browse files Browse the repository at this point in the history
* ci(pre-commit.ci): autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.166 → v0.0.243](astral-sh/ruff-pre-commit@v0.0.166...v0.0.243)
- [github.com/psf/black: 22.10.0 → 23.1.0](psf/black@22.10.0...23.1.0)
- [github.com/abravalheri/validate-pyproject: v0.10.1 → v0.12.1](abravalheri/validate-pyproject@v0.10.1...v0.12.1)

* style(pre-commit.ci): auto fixes [...]

* style: fix pre-commit

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Talley Lambert <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and tlambert03 authored Feb 24, 2023
1 parent 134636a commit fcca7f5
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.166
rev: v0.0.243
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.10.1
rev: v0.12.1
hooks:
- id: validate-pyproject

Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,9 @@ extend-select = [
"E", # style errors
"F", # flakes
"D", # pydocstyle
"I", # isort
"U", # pyupgrade
# "N", # pep8-naming
"S", # bandit
"I", # isort
"UP", # pyupgrade
"S", # bandit
"C", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
Expand All @@ -131,14 +130,15 @@ extend-ignore = [
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D400", # First line should end with a period
"D401", # First line should be in imperative mood
"D413", # Missing blank line after last section
"D416", # Section name should end with a colon
"C901", # Function is too complex
]

[tool.ruff.per-file-ignores]
"tests/*.py" = ["D", "S"]
"scripts/*.py" = ["D"]
"scripts/*.py" = ["D", "S"]

# https://docs.pytest.org/en/6.2.x/customize.html
[tool.pytest.ini_options]
Expand Down
1 change: 0 additions & 1 deletion scripts/gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def get_pims_stats(file) -> dict:


if __name__ == "__main__":

D = {}
for _f in Path("tests/data").glob("*.nd2"):
f = str(_f)
Expand Down
2 changes: 2 additions & 0 deletions src/nd2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""nd2: A Python library for reading and writing ND2 files."""

try:
from ._version import version as __version__
except ImportError:
Expand Down
1 change: 0 additions & 1 deletion src/nd2/_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ def _scan_vimd(self):
return (zs, xys, ts, cs)

def voxel_size(self) -> VoxelSize:

z: Optional[float] = None
d = self.text_info().get("description") or ""
_z = re.search(r"Z Stack Loop: 5\s+-\s+Step\s+([.\d]+)", d)
Expand Down
1 change: 0 additions & 1 deletion src/nd2/_nd2decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def decode_metadata(data: bytes, strip_prefix=True, _count: int = 1) -> Dict[str

stream = io.BytesIO(data)
for _ in range(_count):

curs = stream.tell()
header = stream.read(2)
if not header:
Expand Down
1 change: 1 addition & 0 deletions src/nd2/_sdk/latest.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ from pathlib import Path
from typing import Any, Sequence

import numpy as np

from nd2 import structures

class ND2Reader:
Expand Down

0 comments on commit fcca7f5

Please sign in to comment.