Skip to content

Fix pylint issues#188

Merged
derobins merged 2 commits intodevelopfrom
derobins/fix-pylint-issues
Feb 18, 2026
Merged

Fix pylint issues#188
derobins merged 2 commits intodevelopfrom
derobins/fix-pylint-issues

Conversation

@derobins
Copy link
Collaborator

@derobins derobins commented Feb 18, 2026

These are trivial changes, but get us to a perfect pylint score. We are already fine for formatting via black.

  • Missing encoding with open()
  • Missing a docstring
  • Suppress warning that ais-check isn't in snake_case via a .pylintrc file

* Missing encoding with open
* Missing a docstring
* Suppress warning that `ais-check` isn't in snake_case
  via a .pylintrc file
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses pylint warnings in the ais-check tool by adding an encoding parameter to a file open operation, adding a docstring to the main function, and creating a .pylintrc configuration file to suppress naming convention warnings for the hyphenated filename (which aligns with the project's style guide that mandates hyphens over underscores in file names).

Changes:

  • Added encoding="utf-8" parameter to the open() call for /proc/kallsyms to satisfy pylint's missing encoding warning
  • Added a docstring to the main() function to satisfy pylint's missing docstring requirement
  • Created a .pylintrc file with an ignore-patterns directive to suppress pylint warnings about the hyphenated filename

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tools/ais-check/ais-check Added encoding parameter to file open operation and added docstring to main() function
tools/ais-check/.pylintrc New configuration file to suppress pylint warnings for the hyphenated filename

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 18, 2026 17:30
@derobins derobins merged commit 2a5ccb4 into develop Feb 18, 2026
34 checks passed
@derobins derobins deleted the derobins/fix-pylint-issues branch February 18, 2026 17:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 101 to +105
def main(args):
"""
Parse command-line arguments, check AIS support in HIP Runtime and
amdgpu, optionally print the results, and return an exit code indicating
whether all required components support AIS.
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

main(args) never uses the args parameter and then reassigns args = parser.parse_args(), which makes the parameter misleading and can trigger pylint warnings (unused-argument / redefined-argument-from-local). Either remove the parameter and call parse_args() directly, or parse the provided argv (e.g., parse_args(args[1:])) and avoid shadowing by using a different local name.

Copilot uses AI. Check for mistakes.
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

Comments