Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linter warnings since pylint 3.2.0 #1406

Open
Bastian-Krause opened this issue May 16, 2024 · 0 comments
Open

linter warnings since pylint 3.2.0 #1406

Bastian-Krause opened this issue May 16, 2024 · 0 comments

Comments

@Bastian-Krause
Copy link
Member

Bastian-Krause commented May 16, 2024

Since pylint version 3.2.0 was released, our CI fails with these errors in the linting step (warnings emitted on current master 9e0562e):

************* Module labgrid.util.yaml
labgrid/util/yaml.py:87:18: E0606: Possibly using variable 'items' before assignment (possibly-used-before-assignment)

We should probably raise a TypeError in an else clause.

************* Module labgrid.util.dict
labgrid/util/dict.py:39:33: E1133: Non-iterable value attr.fields(cls) is used in an iterating context (not-an-iterable)

Seems to be related to pylint-dev/pylint#9626 (attr's pyi). Should be fixed in the next pylint release.

************* Module labgrid.util.agents.network_interface
labgrid/util/agents/network_interface.py:98:23: E0606: Possibly using variable 'nm' before assignment (possibly-used-before-assignment)

Probably caused by..

if getattr(NM.Client, '__gtype__', None):
# hide this from sphinx autodoc
bl = BackgroundLoop()
bl.start()
nm = bl.block_on(NM.Client.new, None)

@jluebbe How should we fix this?

************* Module labgrid.remote.common
labgrid/remote/common.py:178:24: E1135: Value 'fields' doesn't support membership test (unsupported-membership-test)

Might also be related to pylint-dev/pylint#9626 ?

************* Module labgrid.remote.client
labgrid/remote/client.py:1215:27: E0606: Possibly using variable 'data' before assignment (possibly-used-before-assignment)

I guess we should add an else clause raising an exception here as well?

labgrid/remote/client.py:1327:29: E0606: Possibly using variable 'data' before assignment (possibly-used-before-assignment)

Same here.

************* Module labgrid.driver.mqtt
labgrid/driver/mqtt.py:46:23: E0606: Possibly using variable 'status' before assignment (possibly-used-before-assignment)

Same here.

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

No branches or pull requests

1 participant