Skip to content

Commit c6ef589

Browse files
committed
Added isort to pre-commit config , and ran it
1 parent 708d669 commit c6ef589

File tree

3 files changed

+26
-24
lines changed

3 files changed

+26
-24
lines changed

.pre-commit-config.yaml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.3.0
4-
hooks:
5-
- id: check-yaml
6-
- id: trailing-whitespace
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: trailing-whitespace
7+
- repo: https://github.com/pycqa/isort
8+
rev: 5.13.2
9+
hooks:
10+
- id: isort
11+
name: isort (python)
712
- repo: https://github.com/astral-sh/ruff-pre-commit
813
rev: v0.6.4
914
hooks:
1015
- id: ruff
1116
args: [ --fix ]
1217
- id: ruff-format
13-
- repo: https://github.com/pre-commit/mirrors-mypy
14-
rev: v1.11.2
15-
hooks:
16-
- id: mypy
17-
name: mypy
18-
entry: dmypy
19-
files: \.py$
20-
language: python
21-
require_serial: true
22-
args: ["run", "--", "--implicit-reexport", "--warn-unused-ignores", "--cache-fine-grained", "--ignore-missing-imports"]
23-
additional_dependencies: [tokenize-rt==6.0.0]
18+
- repo: https://github.com/pre-commit/mirrors-mypy
19+
rev: v1.11.2
20+
hooks:
21+
- id: mypy
22+
name: mypy
23+
entry: dmypy
24+
files: \.py$
25+
language: python
26+
require_serial: true
27+
args: ["run", "--", "--implicit-reexport", "--warn-unused-ignores", "--cache-fine-grained", "--ignore-missing-imports"]
28+
additional_dependencies: [tokenize-rt==6.0.0]

shapefile.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,20 @@
99
__version__ = "3.0.0-alpha"
1010

1111
import array
12-
from datetime import date
1312
import io
1413
import logging
1514
import os
16-
from struct import pack, unpack, calcsize, error, Struct
1715
import sys
1816
import tempfile
1917
import time
2018
import zipfile
21-
19+
from collections.abc import Sequence
20+
from datetime import date
21+
from struct import Struct, calcsize, error, pack, unpack
22+
from typing import Any, ByteString, Union
2223
from urllib.error import HTTPError
2324
from urllib.parse import urlparse, urlunparse
24-
from urllib.request import urlopen, Request
25-
26-
from typing import Any, Union, ByteString
27-
from collections.abc import Sequence
25+
from urllib.request import Request, urlopen
2826

2927
# Create named logger
3028
logger = logging.getLogger(__name__)

test_shapefile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# our imports
1515
import shapefile
1616

17-
1817
# define various test shape tuples of (type, points, parts indexes, and expected geo interface output)
1918
geo_interface_tests = [
2019
(

0 commit comments

Comments
 (0)