mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-14 05:14:45 +00:00
test/pyxtest: use int.bit_count() for virtual mods
Replace bin(n).count("1") with bit_count() (ruff FURB161).
Assisted-by: AI
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2265>
This commit is contained in:
parent
c310ccc3e0
commit
91db43fe7c
1 changed files with 1 additions and 1 deletions
|
|
@ -264,7 +264,7 @@ class GetMapReply:
|
|||
|
||||
# 5. Virtual mods (skip)
|
||||
if virtual_mods:
|
||||
n_vmods = bin(virtual_mods).count("1")
|
||||
n_vmods = virtual_mods.bit_count()
|
||||
offset += (n_vmods + 3) & ~3
|
||||
|
||||
# 6. Explicit components
|
||||
|
|
|
|||
Loading…
Reference in a new issue