summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for release.Matthäus G. Chajdas2023-04-101-0/+1
| | | | | | * Update CHANGES. * Fix missing `versionadded` declarations. * Fix a few linter issues.
* Update copyright year to 2023.Matthäus G. Chajdas2023-03-2911-13/+13
|
* Improve the whitespace checker.Matthäus G. Chajdas2023-03-051-0/+4
| | | | | Check both ways now: If a token should be whitespace, but also if a token was incorrectly marked as whitespace.
* Replace Makefile with tox (#2331)Jean Abou-Samra2023-02-232-5/+6
| | | | | | | | | | | | | | | Porting notes: - tox handles Python environments automatically. Remove a bit of PYTHONPATH manipulation (that was using Python 2 code which always failed!) - No `clean` target: `git clean -xdf` should fit the bill. - No `reindent` target: the `reindent.py` script it was using does not exist (anymore?). - No equivalent of tox-test-coverage, which was an artifact of the past, using nose. Instead, the test-coverage target only is ported, which uses pytest, and works.
* Move metadata to pyproject.toml (#2342)Jean Abou-Samra2023-02-151-1/+1
|
* Fix some pyflakes lints in tests/ and scripts/ (#2333)Jean Abou-Samra2023-02-013-5/+3
|
* Fix various linter issues.Matthäus G. Chajdas2023-02-015-32/+34
|
* Fix lots of missing encoding="utf-8" parametersJean Abou Samra2023-01-312-2/+2
| | | | | Some of these are probably unnecessary (ASCII-only content), but it's easier not to think about it.
* Allow whitespace in comments.Matthäus G. Chajdas2022-12-111-0/+5
|
* Improve utility script.Matthäus G. Chajdas2022-12-051-0/+1
| | | | Skip the `---tokens---` line when parsing a snippet.
* Improve utility scripts.Matthäus G. Chajdas2022-12-042-16/+40
| | | | Scan snippet files in addition to token output streams.
* Make utility script file PEP8 compliant.Matthäus G. Chajdas2022-12-041-1/+3
|
* Add another check script for whitespace.Matthäus G. Chajdas2022-12-043-47/+108
| | | | | | Add a script which checks for whitespace tokens, similar to the script checking for repeated tokens. Also move some functionality shared between them into a utility file, and make check_repeated_token PEP8 compliant.
* Add World of Warcraft TOC file lexer (#2244)Tim Martin2022-09-211-1/+4
| | | Also fix a broken link and decode as UTF8 in count_token_references.py.
* gen_mapfiles.py: convert Path to str before adding to sys.path (#2223)Jean Abou-Samra2022-09-011-1/+1
| | | | pathlib.Path entries in sys.path are actually ignored. See https://github.com/python/cpython/issues/96482
* Merge mapping file generation scripts (#2152)Jean Abou-Samra2022-05-291-0/+53
| | | | | | | | | Use a unified script, to reduce code duplication and in preparation for doing a similar thing with styles and filters. The new script also uses a bit more modern Python APIs (e.g., pathlib). Unlike the previous scripts, it does not replace replace CRLF with LF because Git should do that itself.
* Add more CSS property names (fixes #2113).Matthäus G. Chajdas2022-04-241-0/+33
| | | | | This change also adds a script to regenerate the list of CSS properties from the W3C source if needed.
* Remove now redundant re.UNICODE and (?u) (#2058)Jean Abou-Samra2022-01-311-2/+2
|
* Add a "plugins" argument to get_all_lexersGeorg Brandl2022-01-251-8/+6
| | | | and use it in the "duplicate filenames" checker.
* Happy new year.Georg Brandl2022-01-257-8/+8
|
* Fix typos (#2030)Kian-Meng Ang2022-01-184-13/+13
|
* Update release-checklist.Matthäus G. Chajdas2021-12-301-1/+1
| | | | Use -m build instead of setup.py.
* Handle ' and " in the repeated token script.Matthäus G. Chajdas2021-11-131-2/+4
|
* Formatting fixes only.Matthäus G. Chajdas2021-11-061-1/+1
|
* Add a script to check for repeated tokens.Matthäus G. Chajdas2021-11-061-0/+103
|
* Prohibit contrast degradation for styles via test (#1919)Martin Fischer2021-11-011-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Web accessibility is important. Unfortunately currently many pygments styles have rules with poor contrasts. This commit introduces a test case that fails if the minimum contrast of a style gets worse, e.g: E AssertionError: contrast degradation for style 'borland' E The following rules have a contrast lower than the required 2.9: E E * 1.90 Token.Text.Whitespace E * 2.80 Token.Generic.Heading E * 2.30 Token.Generic.Subheading E E assert not 1.9 < 2.9 This is accomplished by storing the current minimum contrasts in ./tests/contrast/min_contrasts.json. When you improve a minimum contrast the test fails with: E AssertionError: congrats, you improved a contrast! please run ./scripts/update_contrasts.py E assert not 1.9 > 0.9 Running the script as instructed updates the JSON file, making the test pass. New styles are required to meet the WCAG AA contrast minimum of 4.5. First commit to address #1718.
* Improve checks. (#1884)Matthäus G. Chajdas2021-08-173-7/+13
| | | | | | | | | Improve checks. * Fix lots of small errors. * Remove the line length check. * Add an option to skip lexers with no alias * Run checks in make check * Add a new CI target.
* Remove unicorn token types (fixes #1816.)Matthäus G. Chajdas2021-06-201-0/+0
| | | | | | The PR #1819 provides a tool to identify unique token types. This PR aims to remove the most obvious cases of unicorn styles which are used in a single lexer only.
* Add scripts/count_token_references.py to check for "unicorn" tokens. (#1819)Walter Dörwald2021-06-201-0/+267
|
* TNT: fix reliance on "assert" stmt, handle recursionGeorg Brandl2021-05-301-3/+4
|
* scripts: fix file headersGeorg Brandl2021-01-212-1/+11
|
* remove unused epydoc css fileGeorg Brandl2021-01-211-280/+0
|
* fix check_sources: we dont have an encoding decl anymoreGeorg Brandl2021-01-201-21/+14
| | | | and a few other things
* Also add auto-updatable output-based tests to examplefiles (#1689)Oleh Prypin2021-01-201-2/+0
| | | Co-authored-by: Georg Brandl <georg@python.org>
* Run pyupgrade across codebase to modernize syntax and patterns (#1622)Jon Dufresne2021-01-174-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | pyupgrade is a tool to automatically upgrade syntax for newer versions of the Python language. The project has been Python 3 only since 35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups: - Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all source files as utf-8 by default. - Replace IOError/EnvironmentError with OSError. Python 3 unified these exceptions. The old names are aliases only. - Use the Python 3 shorter super() syntax. - Remove "utf8" argument form encode/decode. In Python 3, this value is the default. - Remove "r" from open() calls. In Python 3, this value is the default. - Remove u prefix from Unicode strings. In Python 3, all strings are Unicode. - Replace io.open() with builtin open(). In Python 3, these functions are functionally equivalent. Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
* debug_lexer: add Atheris fuzzer mode (for Google OSS-Fuzz)Georg Brandl2021-01-171-11/+50
|
* Bump copyright year.Matthäus G. Chajdas2021-01-034-5/+5
|
* debug_lexer: add an option to utf8-decode input with "ignore" handler ↵Georg Brandl2020-12-251-4/+14
| | | | (useful for fuzzer testcases)
* scripts/debug_lexer: allow guessing from contentGeorg Brandl2020-12-191-8/+23
|
* Add a check for CR/LF in files. (#1547)Matthäus G. Chajdas2020-09-201-0/+33
| | | | | | | | | | | | | | | | | | | * Add a check for CR/LF in files. This can occur when checking out things on Windows, and it breaks the tarball. This adds a script to check for the presence of CR/LF which exits early if anything gets found. * Improve error checking. * Include the external folder and check that. * Include .bashcomp files. * Use the correct CR/LF on the checker itself. * Address review feedback. * Remove || true * Fix docs * Print the first offending file name
* Remove symlink.Matthäus G. Chajdas2020-09-191-1/+0
| | | | | Windows doesn't support symlinks out of the box, and there doesn't seem to be any use of this symlink, so let's remove it.
* all: remove "u" string prefix (#1536)Georg Brandl2020-09-082-2/+2
| | | | | | | | | | | * all: remove "u" string prefix * util: remove unirange Since Python 3.3, all builds are wide unicode compatible. * unistring: remove support for narrow-unicode builds which stopped being relevant with Python 3.3
* all: use yield from (#1537)Georg Brandl2020-09-061-4/+2
|
* Update copyright year (fixes #1514.)Matthäus G. Chajdas2020-08-223-4/+4
|
* Add more checks to the release checklist.Matthäus G. Chajdas2020-03-081-2/+4
|
* Remove Python2 release instructions.Matthäus G. Chajdas2020-03-081-1/+0
|
* Remove Python 2 compatibility (#1348)Georg Brandl2020-02-295-10/+1
| | | | | | | | | | | * Remove Python 2 compatibility * remove 2/3 shims in pygments.util * update setup.py metadata * Remove unneeded object inheritance. * Remove unneeded future imports.
* add github release stepGeorg Brandl2019-11-291-1/+2
|
* keep version number in one place, dont do the "x.y.z+" anymoreGeorg Brandl2019-11-291-2/+2
|
* Post-release updates; also tweak checklistGeorg Brandl2019-11-291-5/+3
|