mirror of
git://repo.or.cz/docutils.git
synced 2025-10-06 00:32:41 +02:00
Prefer Unix style line endings
I had inadvertently committed two files with Windows style 'CRLF' (``\r\n``) line endings. This commit changes ``docutils/test/conftest.py`` and ``.gitattributes`` to use Unix style 'LF' (``\n``) endings. We additionally specify that Unix style line endings are only enforced in the ``docutils`` directory, as there are around 20 files in the sandbox that use Windows style line endings, and I don't want to change these at the moment. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@9334 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
This commit is contained in:
114
.gitattributes
vendored
114
.gitattributes
vendored
@@ -1,57 +1,57 @@
|
||||
# Binary data types
|
||||
*.mp4 binary
|
||||
*.odt binary
|
||||
*.pdf binary
|
||||
*.png binary
|
||||
*.swf binary
|
||||
|
||||
# Unix-style line endings
|
||||
[attr]unix text eol=lf
|
||||
|
||||
*.cfg unix
|
||||
*.conf unix
|
||||
*.css unix
|
||||
*.csv unix
|
||||
*.dtd unix
|
||||
*.el unix
|
||||
*.html unix
|
||||
*.in unix
|
||||
*.ini unix
|
||||
*.js unix
|
||||
*.man unix
|
||||
*.md unix
|
||||
*.py unix
|
||||
*.rst unix
|
||||
*.sty unix
|
||||
*.tex unix
|
||||
*.toml unix
|
||||
*.txt unix
|
||||
*.xml unix
|
||||
|
||||
# Language aware diff headers
|
||||
*.css diff=css
|
||||
*.html diff=html
|
||||
*.md diff=markdown
|
||||
*.py diff=python
|
||||
# *.rst diff=reStructuredText
|
||||
*.tex diff=tex
|
||||
# *.txt diff=reStructuredText
|
||||
|
||||
# Non UTF-8 encodings
|
||||
docutils/test/data/latin1.txt encoding=latin1
|
||||
docutils/test/data/latin2.txt encoding=latin1
|
||||
docutils/test/data/utf-8-sig.txt encoding=UTF-8-BOM
|
||||
docutils/test/data/utf-16-le-sig.txt encoding=UTF-16LE-BOM
|
||||
docutils/test/test_parsers/test_rst/test_directives/utf-16.csv encoding=UTF-16BE
|
||||
sandbox/dkuhlman/docutils/test/test_writers/test_python_latex.py encoding=latin1
|
||||
sandbox/docbook/test/data/utf16.rst encoding=utf-16le
|
||||
sandbox/manpage-writer/expected/*.latin1 encoding=latin1
|
||||
sandbox/mly/restblog/date_index.py encoding=latin1
|
||||
sandbox/mly/restblog/main_index.py encoding=latin1
|
||||
sandbox/mly/restblog/Makefile encoding=latin1
|
||||
sandbox/mly/restblog/restblog.py encoding=latin1
|
||||
sandbox/wilk/french/quickstart-fr.txt encoding=latin1
|
||||
sandbox/xml2rst/tests/real/original/Technik.rst encoding=latin1
|
||||
|
||||
# Classify ``.txt`` as reStructuredText for syntax highlighting
|
||||
*.txt linguist-language=reStructuredText
|
||||
# Binary data types
|
||||
*.mp4 binary
|
||||
*.odt binary
|
||||
*.pdf binary
|
||||
*.png binary
|
||||
*.swf binary
|
||||
|
||||
# Unix-style line endings
|
||||
[attr]unix text eol=lf
|
||||
|
||||
docutils/*.cfg unix
|
||||
docutils/*.conf unix
|
||||
docutils/*.css unix
|
||||
docutils/*.csv unix
|
||||
docutils/*.dtd unix
|
||||
docutils/*.el unix
|
||||
docutils/*.html unix
|
||||
docutils/*.in unix
|
||||
docutils/*.ini unix
|
||||
docutils/*.js unix
|
||||
docutils/*.man unix
|
||||
docutils/*.md unix
|
||||
docutils/*.py unix
|
||||
docutils/*.rst unix
|
||||
docutils/*.sty unix
|
||||
docutils/*.tex unix
|
||||
docutils/*.toml unix
|
||||
docutils/*.txt unix
|
||||
docutils/*.xml unix
|
||||
|
||||
# Language aware diff headers
|
||||
*.css diff=css
|
||||
*.html diff=html
|
||||
*.md diff=markdown
|
||||
*.py diff=python
|
||||
# *.rst diff=reStructuredText
|
||||
*.tex diff=tex
|
||||
# *.txt diff=reStructuredText
|
||||
|
||||
# Non UTF-8 encodings
|
||||
docutils/test/data/latin1.txt encoding=latin1
|
||||
docutils/test/data/latin2.txt encoding=latin1
|
||||
docutils/test/data/utf-8-sig.txt encoding=UTF-8-BOM
|
||||
docutils/test/data/utf-16-le-sig.txt encoding=UTF-16LE-BOM
|
||||
docutils/test/test_parsers/test_rst/test_directives/utf-16.csv encoding=UTF-16BE
|
||||
sandbox/dkuhlman/docutils/test/test_writers/test_python_latex.py encoding=latin1
|
||||
sandbox/docbook/test/data/utf16.rst encoding=utf-16le
|
||||
sandbox/manpage-writer/expected/*.latin1 encoding=latin1
|
||||
sandbox/mly/restblog/date_index.py encoding=latin1
|
||||
sandbox/mly/restblog/main_index.py encoding=latin1
|
||||
sandbox/mly/restblog/Makefile encoding=latin1
|
||||
sandbox/mly/restblog/restblog.py encoding=latin1
|
||||
sandbox/wilk/french/quickstart-fr.txt encoding=latin1
|
||||
sandbox/xml2rst/tests/real/original/Technik.rst encoding=latin1
|
||||
|
||||
# Classify ``.txt`` as reStructuredText for syntax highlighting
|
||||
*.txt linguist-language=reStructuredText
|
||||
|
@@ -1,28 +1,28 @@
|
||||
def pytest_report_header(config):
|
||||
import os
|
||||
import pathlib
|
||||
import platform
|
||||
import sys
|
||||
import time
|
||||
|
||||
# get metadata of the local `docutils` package
|
||||
docutils_root = pathlib.Path(__file__).resolve().parents[1] / 'docutils'
|
||||
namespace = {}
|
||||
exec((docutils_root/'__init__.py').read_text(encoding='utf-8'), namespace)
|
||||
|
||||
return '\n'.join((
|
||||
'',
|
||||
f'Testing Docutils {namespace["__version__"]} '
|
||||
f'with Python {sys.version.split()[0]} '
|
||||
f'on {time.strftime("%Y-%m-%d at %H:%M:%S")}',
|
||||
f'OS: {platform.system()} {platform.release()} {platform.version()} '
|
||||
f'({sys.platform}, {platform.platform()})',
|
||||
f'Working directory: {os.getcwd()}',
|
||||
f'Docutils package: {docutils_root}',
|
||||
'',
|
||||
))
|
||||
|
||||
|
||||
# self-test
|
||||
if __name__ == '__main__':
|
||||
print(pytest_report_header(None))
|
||||
def pytest_report_header(config):
|
||||
import os
|
||||
import pathlib
|
||||
import platform
|
||||
import sys
|
||||
import time
|
||||
|
||||
# get metadata of the local `docutils` package
|
||||
docutils_root = pathlib.Path(__file__).resolve().parents[1] / 'docutils'
|
||||
namespace = {}
|
||||
exec((docutils_root/'__init__.py').read_text(encoding='utf-8'), namespace)
|
||||
|
||||
return '\n'.join((
|
||||
'',
|
||||
f'Testing Docutils {namespace["__version__"]} '
|
||||
f'with Python {sys.version.split()[0]} '
|
||||
f'on {time.strftime("%Y-%m-%d at %H:%M:%S")}',
|
||||
f'OS: {platform.system()} {platform.release()} {platform.version()} '
|
||||
f'({sys.platform}, {platform.platform()})',
|
||||
f'Working directory: {os.getcwd()}',
|
||||
f'Docutils package: {docutils_root}',
|
||||
'',
|
||||
))
|
||||
|
||||
|
||||
# self-test
|
||||
if __name__ == '__main__':
|
||||
print(pytest_report_header(None))
|
||||
|
Reference in New Issue
Block a user