Skip to content

Commit

Permalink
Merge pull request #99 from con/lint
Browse files Browse the repository at this point in the history
Address lint warnings and drop Python 3.8
  • Loading branch information
yarikoptic authored Nov 19, 2024
2 parents 8d832a0 + 770170d commit bff8446
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- ubuntu-latest
- windows-latest
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
Expand All @@ -28,10 +27,10 @@ jobs:
- py
include:
- os: ubuntu-latest
python-version: '3.8'
python-version: '3.9'
toxenv: py-dev
- os: ubuntu-latest
python-version: '3.8'
python-version: '3.9'
toxenv: lint
steps:
- name: Check out repository
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ classifiers =
#Development Status :: 5 - Production/Stable
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Expand All @@ -39,7 +38,7 @@ project_urls =
packages = find:
package_dir =
=src
python_requires = >=3.8
python_requires = >=3.9
install_requires =
joblib ~= 1.1
platformdirs
Expand Down
1 change: 1 addition & 0 deletions src/fscacher/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def xor_bytes(b1: bytes, b2: bytes) -> bytes:
i2 = int.from_bytes(b2, sys.byteorder)
return (i1 ^ i2).to_bytes(length, sys.byteorder)


def elapsed_since(t: float) -> float:
t_now = time.time()
dt = t_now - t
Expand Down
5 changes: 3 additions & 2 deletions src/fscacher/tests/test_cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from dataclasses import dataclass
import logging
import os
import os.path as op
from pathlib import Path
Expand All @@ -15,7 +16,6 @@
on_windows = platform_system == "windows"
on_pypy = platform.python_implementation().lower() == "pypy"

import logging
lgr = logging.getLogger(__name__)


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

0 comments on commit bff8446

Please sign in to comment.