Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sunpy/package-template",
"commit": "2a6434a5c749ecde69d00b937a3fef27ecbad656",
"commit": "c7bfa729646a7e17ae0e7c50c331e5c489f98fe2",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down Expand Up @@ -36,7 +36,7 @@
".github/workflows/zizmor.yml"
],
"_template": "https://github.com/sunpy/package-template",
"_commit": "2a6434a5c749ecde69d00b937a3fef27ecbad656"
"_commit": "c7bfa729646a7e17ae0e7c50c331e5c489f98fe2"
}
},
"directory": null
Expand Down
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ repos:
- id: ruff-format
types: [python]
exclude: *exclude_dirs
- repo: https://github.com/PyCQA/isort
rev: 9.0.0a3
hooks:
- id: isort
types: [python]
exclude: *exclude_dirs
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
Expand Down
23 changes: 22 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ select = [
"W",
"UP",
"PT",
"I",
]
extend-ignore = [
# pycodestyle (E, W)
Expand All @@ -40,7 +41,8 @@ extend-ignore = [
"INP001", # File is part of an implicit namespace package.
]
"docs/conf.py" = [
"E402" # Module imports not at top of file
"E402", # Module imports not at top of file
"I", # isort
]
"docs/*.py" = [
"INP001", # File is part of an implicit namespace package.
Expand All @@ -54,10 +56,29 @@ extend-ignore = [
"F401", # Unused import
"F403", # from {name} import * used; unable to detect undefined names
"F405", # {name} may be undefined, or defined from star imports
"I", # isort
]
"test_*.py" = [
"E402", # Module level import not at top of cell
]

[lint.pydocstyle]
convention = "numpy"

[lint.isort]
default-section = "third-party"
section-order = [
"future",
"standard-library",
"third-party",
"astropy",
"sunpy",
"first-party",
"local-folder",
]
known-first-party = ["radiospectra"]
no-lines-before = ["local-folder"]

[lint.isort.sections]
"astropy" = ["astropy", "asdf", "gwcs", "reproject"]
"sunpy" = ["sunpy"]
2 changes: 1 addition & 1 deletion radiospectra/spectrogram/sources/tests/test_callisto.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from datetime import datetime
from pathlib import Path
from unittest import mock
from unittest.mock import MagicMock

Expand Down
2 changes: 1 addition & 1 deletion radiospectra/spectrogram/sources/tests/test_eovsa.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from datetime import datetime
from pathlib import Path
from unittest import mock

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion radiospectra/spectrogram/sources/tests/test_psp_rfs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from datetime import datetime
from pathlib import Path
from unittest import mock

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion radiospectra/spectrogram/sources/tests/test_rstn.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from datetime import datetime
from pathlib import Path
from unittest import mock

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion radiospectra/spectrogram/sources/tests/test_solo_rpw.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from datetime import datetime
from pathlib import Path
from unittest import mock

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion radiospectra/spectrogram/sources/tests/test_swaves.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from datetime import datetime
from pathlib import Path
from unittest import mock

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion radiospectra/spectrogram/sources/tests/test_waves.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from datetime import datetime
from pathlib import Path
from unittest import mock

import matplotlib.pyplot as plt
Expand Down
6 changes: 3 additions & 3 deletions radiospectra/spectrogram/spectrogram_factory.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import functools
import gzip
import struct
import pathlib
import struct
import warnings
import functools
from pathlib import Path
from collections import OrderedDict
from pathlib import Path
from urllib.request import Request

import cdflib
Expand Down
2 changes: 1 addition & 1 deletion radiospectra/tests/helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from functools import wraps
from pathlib import Path

import matplotlib as mpl
import matplotlib.pyplot as plt
Expand Down
Loading