Skip to content

Commit

Permalink
Fix isort hook and apply changes
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Jan 21, 2025
1 parent 9cd360f commit 14edfef
Show file tree
Hide file tree
Showing 165 changed files with 285 additions and 139 deletions.
11 changes: 3 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ repos:
hooks:
- id: codespell
entry: codespell --ignore-words=.codespell-whitelist --exclude-file=examples/cn0549/ml_fan_example.ipynb --skip="*.pyc,*.xml"
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.20
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
additional_dependencies: ["toml"]
#- repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.720
# hooks:
# - id: mypy
# args: [--no-strict-optional, --ignore-missing-imports]
name: isort (python)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions adi/ad4020.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.context_manager import context_manager
from adi.rx_tx import rx

Expand Down
1 change: 1 addition & 0 deletions adi/ad405x.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad4110.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad4130.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad4170.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad4630.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad469x.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad4858.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad5686.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager

Expand Down
1 change: 1 addition & 0 deletions adi/ad7124.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad7134.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad717x.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad719x.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad738x.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad7606.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad7689.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad7768.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.context_manager import context_manager
from adi.rx_tx import rx

Expand Down
1 change: 1 addition & 0 deletions adi/ad777x.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ad9094.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.context_manager import context_manager
from adi.rx_tx import rx
from adi.sync_start import sync_start
Expand Down
1 change: 1 addition & 0 deletions adi/adaq8092.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.context_manager import context_manager
from adi.rx_tx import rx

Expand Down
1 change: 1 addition & 0 deletions adi/adis16460.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.context_manager import context_manager
from adi.rx_tx import rx

Expand Down
1 change: 1 addition & 0 deletions adi/adis16507.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.context_manager import context_manager
from adi.rx_tx import rx

Expand Down
1 change: 1 addition & 0 deletions adi/adxl313.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/adxl345.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/adxl355.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from decimal import Decimal

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/adxrs290.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/cn0511.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# SPDX short identifier: ADIBSD
import numpy as np

from adi.ad9166 import ad9166 as ad9166_adi # pyadi-iio library
from adi.context_manager import context_manager

Expand Down
1 change: 1 addition & 0 deletions adi/cn0540.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import time

import numpy as np

from adi.context_manager import context_manager
from adi.rx_tx import rx

Expand Down
1 change: 1 addition & 0 deletions adi/cn0565.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Author: Ivan Gil Mercano <[email protected]>

import numpy as np

from adi.ad5940 import ad5940
from adi.adg2128 import adg2128
from adi.context_manager import context_manager
Expand Down
3 changes: 2 additions & 1 deletion adi/cn0566.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import pickle
from time import sleep

import adi
import numpy as np

import adi
from adi.adar1000 import adar1000_array
from adi.adf4159 import adf4159

Expand Down
1 change: 0 additions & 1 deletion adi/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from typing import List, Union

import iio

import numpy as np


Expand Down
1 change: 1 addition & 0 deletions adi/dds.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.attribute import attribute


Expand Down
1 change: 1 addition & 0 deletions adi/fmc_vna.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.ad9083 import ad9083
from adi.adf5610 import adf5610
from adi.adl5960 import adl5960
Expand Down
1 change: 1 addition & 0 deletions adi/fmclidar1.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.ad5627 import ad5627
from adi.ad9094 import ad9094
from adi.rx_tx import phy
Expand Down
2 changes: 1 addition & 1 deletion adi/jesd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""JESD Shim import to handle JESD as optional dependency"""

try:
from .sshfs import sshfs
from .jesd_internal import jesd
from .sshfs import sshfs
except ImportError:
jesd = None
1 change: 1 addition & 0 deletions adi/ltc2387.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.context_manager import context_manager
from adi.rx_tx import rx

Expand Down
1 change: 1 addition & 0 deletions adi/ltc2499.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from collections import OrderedDict

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/ltc2983.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from collections.abc import Iterable

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/max11205.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/max14001.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/max31855.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX short identifier: ADIBSD

import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
1 change: 1 addition & 0 deletions adi/max31865.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# SPDX short identifier: ADIBSD
import numpy as np

from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.rx_tx import rx
Expand Down
2 changes: 1 addition & 1 deletion adi/rx_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from typing import List, Union

import iio
import numpy as np

import adi.compat as cl
import numpy as np
from adi.attribute import attribute
from adi.context_manager import context_manager
from adi.dds import dds
Expand Down
3 changes: 2 additions & 1 deletion examples/QuadMxFE_dual_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
import time
from datetime import datetime

import adi
import matplotlib.pyplot as plt
import numpy as np
from scipy import signal

import adi


def measure_phase_and_delay(chan0, chan1, window=None):
assert len(chan0) == len(chan1)
Expand Down
3 changes: 2 additions & 1 deletion examples/QuadMxFE_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
import time
from datetime import datetime

import adi
import matplotlib.pyplot as plt
import numpy as np
from scipy import signal

import adi


def measure_phase_and_delay(chan0, chan1, window=None):
assert len(chan0) == len(chan1)
Expand Down
Loading

0 comments on commit 14edfef

Please sign in to comment.