Skip to content

Commit

Permalink
Added isort to pre-commit config , and ran it
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesParrott committed Sep 17, 2024
1 parent 708d669 commit c6ef589
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
37 changes: 21 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
name: mypy
entry: dmypy
files: \.py$
language: python
require_serial: true
args: ["run", "--", "--implicit-reexport", "--warn-unused-ignores", "--cache-fine-grained", "--ignore-missing-imports"]
additional_dependencies: [tokenize-rt==6.0.0]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
name: mypy
entry: dmypy
files: \.py$
language: python
require_serial: true
args: ["run", "--", "--implicit-reexport", "--warn-unused-ignores", "--cache-fine-grained", "--ignore-missing-imports"]
additional_dependencies: [tokenize-rt==6.0.0]
12 changes: 5 additions & 7 deletions shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,20 @@
__version__ = "3.0.0-alpha"

import array
from datetime import date
import io
import logging
import os
from struct import pack, unpack, calcsize, error, Struct
import sys
import tempfile
import time
import zipfile

from collections.abc import Sequence
from datetime import date
from struct import Struct, calcsize, error, pack, unpack
from typing import Any, ByteString, Union
from urllib.error import HTTPError
from urllib.parse import urlparse, urlunparse
from urllib.request import urlopen, Request

from typing import Any, Union, ByteString
from collections.abc import Sequence
from urllib.request import Request, urlopen

# Create named logger
logger = logging.getLogger(__name__)
Expand Down
1 change: 0 additions & 1 deletion test_shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# our imports
import shapefile


# define various test shape tuples of (type, points, parts indexes, and expected geo interface output)
geo_interface_tests = [
(
Expand Down

0 comments on commit c6ef589

Please sign in to comment.