-
Notifications
You must be signed in to change notification settings - Fork 1.4k
import .gitattributes from CPython #6939
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,5 +4,65 @@ Cargo.lock linguist-generated | |
| vm/src/stdlib/ast/gen.rs linguist-generated -merge | ||
| Lib/*.py text working-tree-encoding=UTF-8 eol=LF | ||
| **/*.rs text working-tree-encoding=UTF-8 eol=LF | ||
| *.pck binary | ||
| crates/rustpython_doc_db/src/*.inc.rs linguist-generated=true | ||
|
|
||
| # Binary data types | ||
| *.aif binary | ||
| *.aifc binary | ||
| *.aiff binary | ||
| *.au binary | ||
| *.bmp binary | ||
| *.exe binary | ||
| *.icns binary | ||
| *.gif binary | ||
| *.ico binary | ||
| *.jpg binary | ||
| *.pck binary | ||
| *.pdf binary | ||
| *.png binary | ||
| *.psd binary | ||
| *.tar binary | ||
| *.wav binary | ||
| *.whl binary | ||
| *.zip binary | ||
|
|
||
| # Text files that should not be subject to eol conversion | ||
| [attr]noeol -text | ||
|
|
||
| Lib/test/cjkencodings/* noeol | ||
| Lib/test/tokenizedata/coding20731.py noeol | ||
| Lib/test/decimaltestdata/*.decTest noeol | ||
| Lib/test/test_email/data/*.txt noeol | ||
| Lib/test/xmltestdata/* noeol | ||
|
|
||
| # Shell scripts should have LF even on Windows because of Cygwin | ||
| Lib/venv/scripts/common/activate text eol=lf | ||
| Lib/venv/scripts/posix/* text eol=lf | ||
|
|
||
| # CRLF files | ||
| [attr]dos text eol=crlf | ||
|
|
||
| # Language aware diff headers | ||
| # https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more | ||
| # https://gist.github.com/tekin/12500956bd56784728e490d8cef9cb81 | ||
| *.css diff=css | ||
| *.html diff=html | ||
| *.py diff=python | ||
| *.md diff=markdown | ||
|
|
||
| # Generated files | ||
| # https://github.com/github/linguist/blob/master/docs/overrides.md | ||
| # | ||
| # To always hide generated files in local diffs, mark them as binary: | ||
| # $ git config diff.generated.binary true | ||
| # | ||
| [attr]generated linguist-generated=true diff=generated | ||
|
|
||
| Lib/_opcode_metadata.py generated | ||
| Lib/keyword.py generated | ||
| Lib/idlelib/help.html generated | ||
| Lib/test/certdata/*.pem generated | ||
| Lib/test/certdata/*.0 generated | ||
| Lib/test/levenshtein_examples.json generated | ||
| Lib/test/test_stable_abi_ctypes.py generated | ||
| Lib/token.py generated | ||
|
Comment on lines
+53
to
+68
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check if the listed files exist in RustPython
echo "=== Checking individual generated Python files ==="
for file in Lib/_opcode_metadata.py Lib/keyword.py Lib/token.py; do
if test -f "$file"; then
echo "✓ $file exists ($(wc -l < "$file") lines)"
else
echo "✗ $file not found"
fi
done
echo -e "\n=== Checking IDLE help ==="
if test -f Lib/idlelib/help.html; then
echo "✓ Lib/idlelib/help.html exists"
else
echo "✗ Lib/idlelib/help.html not found"
fi
echo -e "\n=== Checking test data directory ==="
if test -d Lib/test/certdata; then
file_count=$(find Lib/test/certdata -type f 2>/dev/null | wc -l)
echo "✓ Lib/test/certdata/ exists with $file_count files"
else
echo "✗ Lib/test/certdata/ not found"
fi
echo -e "\n=== Checking levenshtein and stable ABI test files ==="
for file in Lib/test/levenshtein_examples.json Lib/test/test_stable_abi_ctypes.py; do
if test -f "$file"; then
echo "✓ $file exists"
else
echo "✗ $file not found"
fi
done
echo -e "\n=== Checking repository structure ==="
echo "Repository root structure:"
ls -la | grep -E "^d" | head -20Repository: RustPython/RustPython Length of output: 1805 🏁 Script executed: #!/bin/bash
# Check if these files are referenced in build configs or if they're CPython-specific
echo "=== Searching for help.html references ==="
rg "help\.html" --type py --type rust --type toml --type md 2>/dev/null | head -20
echo -e "\n=== Searching for levenshtein_examples references ==="
rg "levenshtein_examples" --type py --type rust --type toml 2>/dev/null | head -20
echo -e "\n=== Searching for test_stable_abi_ctypes references ==="
rg "test_stable_abi_ctypes" --type py --type rust --type toml 2>/dev/null | head -20
echo -e "\n=== Checking if these are CPython standard files ==="
echo "CPython stdlib would have help.html (IDLE help)"
echo "CPython stdlib would have levenshtein_examples.json (test data)"
echo "CPython stdlib would have test_stable_abi_ctypes.py (ctypes stable ABI test)"
echo -e "\n=== Checking .gitattributes history ==="
git log --oneline .gitattributes 2>/dev/null | head -5
echo -e "\n=== Checking if certdata is truly generated ==="
ls -la Lib/test/certdata/ | head -10Repository: RustPython/RustPython Length of output: 1528 Remove or verify entries for non-existent files marked as generated. The 🤖 Prompt for AI Agents |
||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 708
Remove the non-existent
Lib/test/cjkencodings/path from .gitattributes (line 35).The directory
Lib/test/cjkencodings/does not exist in RustPython's repository, unlike the other test data directories referenced in this section (tokenizedata, decimaltestdata, test_email, xmltestdata). Remove this line to keep the configuration accurate.🤖 Prompt for AI Agents