Skip to content

Commit

Permalink
Fix typos and replace deprecated function (#865)
Browse files Browse the repository at this point in the history
* Fix typos and ignore false positives found by codespell
* Deprecated pydicom function: read_file → dcmread
* Reformat with black
  • Loading branch information
DimitriPapadopoulos authored Oct 8, 2023
1 parent 2aa9ed7 commit ca798a7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Check code formatting
run: black . --check
- name: Check spelling
run: codespell -L halp,ot,pres,requestor,requestors -d pynetdicom
run: codespell -L ddress,halp,ot,pres,requestor,requestors -d pynetdicom
- name: Check for syntax errors
run: python -m flake8 --select=E901,E999,F822,F823 ${{ steps.pydiff.outputs.pyfiles }} --ignore F821
- name: Check for style warnings
Expand Down
2 changes: 1 addition & 1 deletion docs/apps/movescu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ SOP Classes
+----------------------------------+------------------------------------------+
| 1.2.840.10008.5.1.4.1.1.481.10 | RT Physician Intent Storage |
+----------------------------------+------------------------------------------+
| 1.2.840.10008.5.1.4.1.1.481.11 | RT Segmentation Annotation Storge |
| 1.2.840.10008.5.1.4.1.1.481.11 | RT Segmentation Annotation Storage |
+----------------------------------+------------------------------------------+
| 1.2.840.10008.5.1.4.1.1.481.12 | RT Radiation Set Storage |
+----------------------------------+------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion pynetdicom/_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3509,7 +3509,7 @@ def doc_handle_n_get(event: "Event", *args: Sequence[Any]) -> UserReturnType:
* :dcm:`Media Creation Management<part04/chapter_S.html>`
* :dcm:`Unified Procedure Step<part04/chapter_CC.html>`
* :dcm:`RT Machine Verification<part04/chapter_DD.html>`
* :dcm:`Dispaly System Management<part04/chapter_EE.html>`
* :dcm:`Display System Management<part04/chapter_EE.html>`
**Status**
Expand Down
2 changes: 1 addition & 1 deletion pynetdicom/apps/findscu/findscu.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def main(args=None):

# Create query (identifier) dataset
try:
# If you're looking at this to see how QR Find works then `identifer`
# If you're looking at this to see how QR Find works then `identifier`
# is a pydicom Dataset instance with your query keys, e.g.:
# identifier = Dataset()
# identifier.QueryRetrieveLevel = 'PATIENT'
Expand Down
2 changes: 1 addition & 1 deletion pynetdicom/apps/getscu/getscu.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def main(args=None):

# Create query (identifier) dataset
try:
# If you're looking at this to see how QR Get works then `identifer`
# If you're looking at this to see how QR Get works then `identifier`
# is a pydicom Dataset instance with your query keys, e.g.:
# identifier = Dataset()
# identifier.QueryRetrieveLevel = 'PATIENT'
Expand Down
2 changes: 1 addition & 1 deletion pynetdicom/apps/movescu/movescu.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def main(args=None):

# Create query (identifier) dataset
try:
# If you're looking at this to see how QR Move works then `identifer`
# If you're looking at this to see how QR Move works then `identifier`
# is a pydicom Dataset instance with your query keys, e.g.:
# identifier = Dataset()
# identifier.QueryRetrieveLevel = 'PATIENT'
Expand Down
8 changes: 3 additions & 5 deletions pynetdicom/tests/test_ae.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import pytest

from pydicom import read_file, config as PYD_CONFIG
from pydicom import dcmread, config as PYD_CONFIG
from pydicom.dataset import Dataset
from pydicom.uid import UID, ImplicitVRLittleEndian

Expand Down Expand Up @@ -37,10 +37,8 @@


TEST_DS_DIR = os.path.join(os.path.dirname(__file__), "dicom_files")
DATASET = read_file(os.path.join(TEST_DS_DIR, "RTImageStorage.dcm"))
COMP_DATASET = read_file(
os.path.join(TEST_DS_DIR, "MRImageStorage_JPG2000_Lossless.dcm")
)
DATASET = dcmread(os.path.join(TEST_DS_DIR, "RTImageStorage.dcm"))
COMP_DATASET = dcmread(os.path.join(TEST_DS_DIR, "MRImageStorage_JPG2000_Lossless.dcm"))


def test_blocking_handler():
Expand Down

0 comments on commit ca798a7

Please sign in to comment.