Skip to content

Commit bff8446

Browse files
authored
Merge pull request #99 from con/lint
Address lint warnings and drop Python 3.8
2 parents 8d832a0 + 770170d commit bff8446

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

Diff for: .github/workflows/benchmark.yml

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
python-version:
13-
- '3.8'
1413
- '3.9'
1514
- '3.10'
1615
- '3.11'

Diff for: .github/workflows/test.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
- ubuntu-latest
1818
- windows-latest
1919
python-version:
20-
- '3.8'
2120
- '3.9'
2221
- '3.10'
2322
- '3.11'
@@ -28,10 +27,10 @@ jobs:
2827
- py
2928
include:
3029
- os: ubuntu-latest
31-
python-version: '3.8'
30+
python-version: '3.9'
3231
toxenv: py-dev
3332
- os: ubuntu-latest
34-
python-version: '3.8'
33+
python-version: '3.9'
3534
toxenv: lint
3635
steps:
3736
- name: Check out repository

Diff for: setup.cfg

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ classifiers =
2020
#Development Status :: 5 - Production/Stable
2121
Programming Language :: Python :: 3 :: Only
2222
Programming Language :: Python :: 3
23-
Programming Language :: Python :: 3.8
2423
Programming Language :: Python :: 3.9
2524
Programming Language :: Python :: 3.10
2625
Programming Language :: Python :: 3.11
@@ -39,7 +38,7 @@ project_urls =
3938
packages = find:
4039
package_dir =
4140
=src
42-
python_requires = >=3.8
41+
python_requires = >=3.9
4342
install_requires =
4443
joblib ~= 1.1
4544
platformdirs

Diff for: src/fscacher/cache.py

+1
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ def xor_bytes(b1: bytes, b2: bytes) -> bytes:
251251
i2 = int.from_bytes(b2, sys.byteorder)
252252
return (i1 ^ i2).to_bytes(length, sys.byteorder)
253253

254+
254255
def elapsed_since(t: float) -> float:
255256
t_now = time.time()
256257
dt = t_now - t

Diff for: src/fscacher/tests/test_cache.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from dataclasses import dataclass
2+
import logging
23
import os
34
import os.path as op
45
from pathlib import Path
@@ -15,7 +16,6 @@
1516
on_windows = platform_system == "windows"
1617
on_pypy = platform.python_implementation().lower() == "pypy"
1718

18-
import logging
1919
lgr = logging.getLogger(__name__)
2020

2121

@@ -213,7 +213,8 @@ def check_new_memoread(arg, content, expect_new=False):
213213
t_now = time.time()
214214
if t_now - t0 < cache._min_dtime:
215215
# Log more information to troubleshoot
216-
lgr.error(f"Failing test with t0={t0}, t_now={t_now}, dt={t_now - t0}, min_dtime={cache._min_dtime}")
216+
lgr.error(f"Failing test with t0={t0}, t_now={t_now}, "
217+
f"dt={t_now - t0}, min_dtime={cache._min_dtime}")
217218
for p in ("a.txt", "b.txt"):
218219
lgr.error(f" {p}: {op.getmtime(path / p)}")
219220
raise # if we were quick but still failed -- legit

0 commit comments

Comments
 (0)