-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[https://nvbugs/6411931][fix] Append ,fo to the ignore-words-list in pyproject.toml…
#15924
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
Open
trtllm-agent
wants to merge
1
commit into
NVIDIA:main
Choose a base branch
from
tensorrt-cicd:repair-bot-bug6411931
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1
−1
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: NVIDIA/TensorRT-LLM
Length of output: 2315
🌐 Web query:
codespell pyproject.toml configuration pre-commit --ignore-words-list command line -L does codespell read pyproject automatically💡 Result:
Yes, codespell automatically detects and reads a pyproject.toml file if it is located in the current working directory [1][2]. Configuration To use pyproject.toml, place your settings under the [tool.codespell] section [1][2]. For the ignore-words-list option, specify a comma-separated string of words [3]. For example: [tool.codespell] ignore-words-list = "word1,word2,word3" Prerequisites For this functionality to work, the tomli library must be available [1][2]. - Python 3.11 and later includes tomli support in the standard library, so no extra setup is required [4]. - For Python versions prior to 3.11, you must install the tomli package [1][2]. Pre-commit When using codespell with pre-commit, you must ensure that tomli is available to the hook's environment [4]. You can do this by adding it to the additional_dependencies list in your.pre-commit-config.yaml [3][4]: - repo: https://github.com/codespell-project/codespell rev: v2.4.2 hooks: - id: codespell additional_dependencies: - tomli If your configuration is not being picked up, confirm that the file is in the root directory (where the codespell command is executed) or specify the path explicitly using the --toml command-line argument [1][2]. Note that command-line arguments will override settings found in configuration files [1][2].
Citations:
check-filenamesandignore-words-listintopyproject.tomlcodespell-project/codespell#2839🌐 Web query:
codespell command line -L overrides pyproject ignore-words-list precedence merge behavior💡 Result:
When using codespell, options provided via the command line, including the -L (or --ignore-words-list) flag, override any corresponding settings defined in a pyproject.toml configuration file [1][2][3]. Codespell does not merge the ignore-words-list from the command line with those defined in your configuration file; instead, the command line argument completely replaces the configuration file's value [1][4]. If you specify -L on the command line, only the words provided in that argument will be ignored by codespell during that execution, effectively ignoring any additional words you may have configured in pyproject.toml [1][4]. To ensure both sets of words are ignored, you must manually include all desired words in the command line argument, or rely solely on a configuration file if you prefer a persistent, unified list [1][3]. Configuration files are read in a specific order (with pyproject.toml typically checked first), and while multiple config files can be processed, command line arguments act as the final authority that overrides all config-based settings [1][4].
Citations:
🌐 Web query:
codespell -L ignore words list with pyproject.toml precedence documentation💡 Result:
To configure codespell with an ignore words list in a pyproject.toml file, use the [tool.codespell] section with the ignore-words-list key [1][2]. The value must be a string containing a comma-separated list of words [3][4]. Example configuration: [tool.codespell] ignore-words-list = "word1,word2,word3" Regarding precedence and configuration: 1. Precedence: Options specified on the command line override those defined in configuration files [1][2][5]. If multiple configuration files are present, they are read in a specific order, and the most recently read file overwrites previously specified configurations [1][2]. 2. Configuration Order: Codespell checks for configuration files in the following order [1][5]: - pyproject.toml (requires the tomli package for Python versions prior to 3.11) [1][6] - setup.cfg -.codespellrc - Any additional file explicitly supplied via the --config command line argument [1][5]. 3. Implementation Note: Because codespell maps configuration file entries to command line arguments, ensure your ignore words are lowercase if they are meant to match lowercase dictionary entries [3][4]. For boolean flags in pyproject.toml (e.g., check-hidden), setting the value to an empty string (e.g., check-hidden = "") is often the standard way to toggle them on [3][7].
Citations:
check-filenamesandignore-words-listintopyproject.tomlcodespell-project/codespell#2839ignore-words-listin pyproject.toml codespell-project/codespell#3248🌐 Web query:
codespell README -L option pyproject.toml ignore-words-list precedence combine💡 Result:
In codespell, the
ignore-words-listoption is used to define a comma-separated list of words to be ignored [1][2][3]. When configuring this viapyproject.toml, you must provide the list as a string within the[tool.codespell]section [1][4][5]. Configuration Example: [tool.codespell] ignore-words-list = "word1,word2,word3" Regarding precedence and usage: 1. Precedence: Options specified directly on the command line will always override options defined in configuration files (such aspyproject.toml,setup.cfg, or.codespellrc) [4][5][3]. 2. Case Sensitivity: Theignore-words-listis case-sensitive and must match the word exactly as it appears in the codespell dictionary file [1][6]. If a word is not being ignored as expected, ensure it is written in lowercase (or the exact casing required by the dictionary) [1][6][7]. 3. Configuration Files: Codespell reads multiple configuration files if present, with the most recently read file overwriting previous settings [4][5][3]. The standard search order for configuration files includespyproject.toml,setup.cfg, and.codespellrc[4][5]. For command-line usage, the-Lflag is equivalent to--ignore-words-list[2][3][8]. If you need to ignore many words, using a separate file with the-I(or--ignore-words) option may be preferable [4][5][3].Citations:
check-filenamesandignore-words-listintopyproject.tomlcodespell-project/codespell#2839ignore-words-listseems to have no effect codespell-project/codespell#2375Add
foto the codespell hook too..pre-commit-config.yamlhard-codes its own-Llist, so the newpyproject.tomlentry is ignored by pre-commit/CI.🤖 Prompt for AI Agents