Skip to content

Commit 629d641

Browse files
committed
global: sort imports and enable import linting
This is overdue.
1 parent 92a809f commit 629d641

14 files changed

+11
-15
lines changed

bench.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
import time
1818
import zlib
1919

20-
2120
import zstandard as zstd
2221

23-
2422
bio = io.BytesIO
2523

2624

ci/copy-conda-package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import shutil
3+
34
from conda_build.config import Config
45

56
build_dir = Config().bldpkgs_dir

make_cffi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
from __future__ import absolute_import
88

9-
import cffi
109
import distutils.ccompiler
1110
import distutils.sysconfig
1211
import os
1312
import re
1413
import subprocess
1514
import tempfile
1615

16+
import cffi
1717

1818
HERE = os.path.abspath(os.path.dirname(__file__))
1919

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ build-backend = "setuptools.build_meta:__legacy__"
1212

1313
[tool.ruff]
1414
line-length = 80
15+
16+
[tool.ruff.lint]
17+
select = ["E4", "E7", "E9", "F", "I"]

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77

88
from __future__ import print_function
99

10-
import platform
1110
import os
11+
import platform
1212
import sys
13+
1314
from setuptools import setup
1415

1516
# Python 3.12 dropped distutils from the stdlib. Try to access it via

setup_zstd.py

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

17-
1817
ext_includes = [
1918
"c-ext",
2019
]

tests/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import io
22
import os
3-
43
from typing import List # noqa: F401
54

65

tests/test_compressor_stream_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import zstandard as zstd
55

66
from .common import (
7-
NonClosingBytesIO,
87
CustomBytesIO,
8+
NonClosingBytesIO,
99
)
1010

1111

tests/test_compressor_stream_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import zstandard as zstd
99

1010
from .common import (
11-
NonClosingBytesIO,
1211
CustomBytesIO,
12+
NonClosingBytesIO,
1313
)
1414

1515

tests/test_data_structures_fuzzing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import zstandard as zstd
1111

12-
1312
s_windowlog = strategies.integers(
1413
min_value=zstd.WINDOWLOG_MIN, max_value=zstd.WINDOWLOG_MAX
1514
)

0 commit comments

Comments
 (0)