Skip to content

Unnecessary code#6009

Merged
wujingyue merged 1 commit intomainfrom
wjy/openmp
Feb 24, 2026
Merged

Unnecessary code#6009
wujingyue merged 1 commit intomainfrom
wjy/openmp

Conversation

@wujingyue
Copy link
Collaborator

No description provided.

@wujingyue
Copy link
Collaborator Author

!build

@github-actions
Copy link

Description

  • Refactor sysconfig import to use direct module call

  • Remove hardcoded OpenMP include path "/usr/lib/llvm-11/include/openmp"

  • Simplify get_python_include_dir() function implementation

  • Clean up unnecessary import alias for get_paths function

Changes walkthrough

Relevant files
Enhancement
clangtidy_linter.py
Refactor sysconfig imports and remove hardcoded OpenMP path

tools/linter/adapters/clangtidy_linter.py

  • Replace from sysconfig import get_paths as gp with direct import
    sysconfig
  • Update get_python_include_dir() to use
    sysconfig.get_paths()["include"] instead of gp()["include"]
  • Remove hardcoded OpenMP include path from include_dir list
  • +2/-3     

    PR Reviewer Guide

    Here are some key observations to aid the review process:

    🧪 No relevant tests
    ⚡ No major issues detected

    @greptile-apps
    Copy link
    Contributor

    greptile-apps bot commented Feb 24, 2026

    Greptile Summary

    Removes obsolete hardcoded LLVM-11 OpenMP include path and simplifies sysconfig import.

    • Removed /usr/lib/llvm-11/include/openmp from include directories - this hardcoded path is system-specific and unnecessary since clang_search_dirs() dynamically discovers compiler include paths
    • Changed import from from sysconfig import get_paths as gp to import sysconfig and updated usage to sysconfig.get_paths() for improved code clarity

    Confidence Score: 5/5

    • This PR is safe to merge with minimal risk - removes unnecessary hardcoded paths
    • The changes are straightforward cleanup: removing an obsolete hardcoded system path and improving import style. The clang_search_dirs() function already dynamically discovers compiler include paths, making the hardcoded LLVM-11 path redundant. The import change maintains identical functionality while improving readability.
    • No files require special attention

    Important Files Changed

    Filename Overview
    tools/linter/adapters/clangtidy_linter.py Removed hardcoded LLVM-11 OpenMP path and improved sysconfig import clarity

    Last reviewed commit: a9ceb08

    Copy link
    Contributor

    @greptile-apps greptile-apps bot left a comment

    Choose a reason for hiding this comment

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

    1 file reviewed, no comments

    Edit Code Review Agent Settings | Greptile

    @wujingyue wujingyue merged commit 3afd2be into main Feb 24, 2026
    19 checks passed
    @wujingyue wujingyue deleted the wjy/openmp branch February 24, 2026 20:41
    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.

    2 participants