mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-20 04:30:07 +01:00
test: rename a variable to shut up ruff with default args
We disable that warning in the CI and pre-commit but it's a simple
fix here that makes sense.
test/test_oeffis.py:185:9: E741 Ambiguous variable name: `l`
Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/319>
This commit is contained in:
parent
504afdea4a
commit
d4b60a7d0d
1 changed files with 6 additions and 6 deletions
|
|
@ -182,13 +182,13 @@ class Oeffis:
|
|||
"""
|
||||
|
||||
def __init__(self, userdata=None):
|
||||
l = LibOeffis.instance()
|
||||
self.ctx = l.oeffis_new(userdata) # type: ignore
|
||||
lib = LibOeffis.instance()
|
||||
self.ctx = lib.oeffis_new(userdata) # type: ignore
|
||||
|
||||
def wrapper(func):
|
||||
return lambda *args, **kwargs: func(self.ctx, *args, **kwargs)
|
||||
|
||||
for api in l._api_prototypes:
|
||||
for api in lib._api_prototypes:
|
||||
# skip some APIs that are not be exposed because they don't make sense
|
||||
# to have in python.
|
||||
if api.name not in (
|
||||
|
|
@ -197,11 +197,11 @@ class Oeffis:
|
|||
"oeffis_get_user_data",
|
||||
"oeffis_set_user_data",
|
||||
):
|
||||
func = getattr(l, api.name)
|
||||
func = getattr(lib, api.name)
|
||||
setattr(self, api.basename, wrapper(func))
|
||||
|
||||
for e in l._enums:
|
||||
val = getattr(l, e.name)
|
||||
for e in lib._enums:
|
||||
val = getattr(lib, e.name)
|
||||
setattr(self, e.basename, val)
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue