Skip to content

Conversation

@bernhardkaindl
Copy link

No description provided.

bernhardkaindl and others added 12 commits August 16, 2025 00:06
.pre-commit-config.yaml:
- Use the tox hook to run pylint and pytype
- Update hook versions and mypy dependencies

Also remove the obsolete typing stub stubs/pytest_httpserver.pyi

Signed-off-by: Bernhard Kaindl <[email protected]>
tox:
- Fix running pytype static analysis from tox
- Require minium tox version: Replace obsolete tox version workarounds
- pytype_runner.py: Create the output directory if needed
- Cleanup test extras (dependencies) for obsolete python versions
  move DMV common code to python-libs because RPU plugin calls
  these functions as well

Signed-off-by: Chunjie Zhu <[email protected]>
x
Signed-off-by: Bernhard Kaindl <[email protected]>
@bernhardkaindl bernhardkaindl force-pushed the chunjiez/master branch 3 times, most recently from 2f73acb to 66b930e Compare August 16, 2025 04:34
loaded = oldone["loaded modules"] + newone["loaded modules"]
json_formatted["loaded modules"] = loaded

self.dmv_list["drivers"][oldone["info"]] = json_formatted
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Unsupported target for indexed assignment ("object") [index]

self.dmv_list["drivers"][oldone["info"]] = json_formatted

def process_dmv_data(self, json_data, json_formatted):
if not json_data["name"] in self.dmv_list["drivers"]:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Unsupported right operand type for in ("object") [operator]


def process_dmv_data(self, json_data, json_formatted):
if not json_data["name"] in self.dmv_list["drivers"]:
self.dmv_list["drivers"][json_data["name"]] = json_formatted
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Unsupported target for indexed assignment ("object") [index]

def process_dmv_data(self, json_data, json_formatted):
if not json_data["name"] in self.dmv_list["drivers"]:
self.dmv_list["drivers"][json_data["name"]] = json_formatted
elif self.dmv_list["drivers"][json_data["name"]] is None:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Value of type "object" is not indexable [index]

if not json_data["name"] in self.dmv_list["drivers"]:
self.dmv_list["drivers"][json_data["name"]] = json_formatted
elif self.dmv_list["drivers"][json_data["name"]] is None:
self.dmv_list["drivers"][json_data["name"]] = json_formatted
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Unsupported target for indexed assignment ("object") [index]

elif self.dmv_list["drivers"][json_data["name"]] is None:
self.dmv_list["drivers"][json_data["name"]] = json_formatted
else:
self.merge_jsondata(self.dmv_list["drivers"][json_data["name"]], json_formatted)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Value of type "object" is not indexable [index]

@bernhardkaindl bernhardkaindl force-pushed the chunjiez/master branch 5 times, most recently from 250c00d to 7027486 Compare August 16, 2025 05:55
xcp/dmv.py Outdated
for _, updates_dir, dmv_dir in get_all_kabi_dirs():
if not os.path.isdir(dmv_dir):
continue

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0303: Trailing whitespace (trailing-whitespace)

xcp/dmv.py Outdated
return True
return id1 == id2

'''
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
W0105: String statement has no effect (pointless-string-statement)

import re
import struct
import subprocess
from typing import Any, Dict
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
W0611: Unused Any imported from typing (unused-import)

import re
import struct
import subprocess
from typing import Any, Dict
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
W0611: Unused Dict imported from typing (unused-import)

Signed-off-by: Bernhard Kaindl <[email protected]>
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.

3 participants