Skip to content

Py39 wrapup#121

Merged
timlnx merged 7 commits into
masterfrom
py39-wrapup
Apr 23, 2026
Merged

Py39 wrapup#121
timlnx merged 7 commits into
masterfrom
py39-wrapup

Conversation

@timlnx
Copy link
Copy Markdown
Owner

@timlnx timlnx commented Apr 23, 2026

Short description: wraps up just about all of of the python modernization work

Final passes at fully modernizing the code base to be python 3.9+ only. No functional changes. Just "Doing it the modern-ish python way" now.

timlnx added 7 commits April 21, 2026 20:46
…stdlib

Fix pyflakes F821 issues in bitmath/__init__.py

- Drop explicit (object) base from class Bitmath (modern Python syntax)
- Remove unnecessary global _FORMAT_REPR declaration (F823 unused global)
- Fix redundant single-type isinstance tuples: isinstance(s, (str)) → isinstance(s, str)

These changes modernize the code for Python 3 while maintaining all functionality.
All 292 tests pass with 100% coverage.

Convert % format strings to f-strings; update stale Py2 docs URL

Replace list([...]).index(True) with next(enumerate()) in parse_string

Fix fcntl.ioctl buffer: pass int size instead of str (Python 3 correctness)

Remove os_name() wrapper — use os.name directly, patch via bitmath.os.name in tests
@github-actions
Copy link
Copy Markdown

Coverage

Test Coverage Report
FileStmtsMissCoverMissing
__init__.py620199%311
TOTAL620199% 

@timlnx timlnx merged commit 8c5565f into master Apr 23, 2026
26 checks passed
@timlnx timlnx deleted the py39-wrapup branch April 23, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant