Skip to content

Commit

Permalink
fix ruff to <0.3.0, and re-format files again
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Mar 2, 2024
1 parent 5fe83b9 commit a5097c0
Show file tree
Hide file tree
Showing 20 changed files with 9 additions and 31 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.0
rev: v0.2.2
hooks:
# Run the formatter.
- id: ruff-format
Expand All @@ -23,11 +23,11 @@ repos:
rev: v1.7.1
hooks:
- id: mypy
#- repo: https://github.com/asottile/reorder_python_imports
# rev: v3.8.2
# hooks:
# - id: reorder-python-imports
# args: [--application-directories, '.:src', --py36-plus]
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.8.2
hooks:
- id: reorder-python-imports
args: [--application-directories, '.:src', --py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pytest = ">=7.0.1"
pytest-cov = ">=3.0.0"
pytest-xdist = ">=2.5.0"
pytest-clarity = ">=1.0.1"
ruff = ">=0.1.7"
ruff = ">=0.1.7, <0.3.0"
mypy = ">=1.6.0"
types-pyyaml = ">=6.0.12.12"
types-requests = ">=2.31.0.9"
Expand Down
1 change: 0 additions & 1 deletion specsanalyzer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""SpecsAnalyzer class easy access APIs"""

# Easy access APIs
from .core import SpecsAnalyzer

Expand Down
1 change: 0 additions & 1 deletion specsanalyzer/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This module contains a config library for loading yaml/json files into dicts"""

from __future__ import annotations

import json
Expand Down
1 change: 0 additions & 1 deletion specsanalyzer/convert.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Specsanalyzer image conversion module"""

from __future__ import annotations

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion specsanalyzer/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This is the specsanalyzer core class"""

from __future__ import annotations

import os
Expand Down
1 change: 0 additions & 1 deletion specsanalyzer/img_tools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This module contains image manipulation tools for the specsanalyzer package"""

from __future__ import annotations

from typing import Sequence
Expand Down
1 change: 0 additions & 1 deletion specsanalyzer/io.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This module contains file input/output functions for the specsanalyzer module"""

from __future__ import annotations

from pathlib import Path
Expand Down
1 change: 0 additions & 1 deletion specsscan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""SpecsScan class easy access APIs"""

# Easy access APIs
from .core import SpecsScan

Expand Down
1 change: 0 additions & 1 deletion specsscan/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This is the SpecsScan core class"""

from __future__ import annotations

import copy
Expand Down
1 change: 0 additions & 1 deletion specsscan/helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This script contains helper functions used by the specscan class"""

from __future__ import annotations

import datetime as dt
Expand Down
1 change: 0 additions & 1 deletion tests/helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Helper functions for tests"""

import numpy as np
import xarray as xr

Expand Down
1 change: 0 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This is a code that performs several tests for the settings loader."""

import os
import tempfile
from importlib.util import find_spec
Expand Down
2 changes: 0 additions & 2 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# pylint: disable=duplicate-code
"""This is a code that performs several tests for the convert functions"""

import os

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""This script performs tests for the helper functions
in the core.py script to support the load_scan method.
"""

import os
from pathlib import Path

Expand Down
1 change: 0 additions & 1 deletion tests/test_img_tools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This is a code that performs several tests for the image tool module"""

import os

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion tests/test_io.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This is a code that performs several tests for the input/output functions"""

import os
import random
from pathlib import Path
Expand Down
1 change: 0 additions & 1 deletion tests/test_lens_modes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""This is a code that performs several tests for the convert functions"""

import os

import numpy as np
Expand Down
5 changes: 1 addition & 4 deletions tests/test_specsanalyzer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
"""This is a code that performs several tests for the SpecsAnalyzer
core class functions
"""

"""This is a code that performs several tests for the SpecsAnalyzer core class functions"""
import os
from importlib.util import find_spec

Expand Down
4 changes: 1 addition & 3 deletions tests/test_specsscan.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""This is a code that performs several tests for the SpecsScan
core class functions
"""This is a code that performs several tests for the SpecsScan core class functions
"""

import os

import numpy as np
Expand Down

0 comments on commit a5097c0

Please sign in to comment.