<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pygments-git.git/pygments/lexers/tnt.py, branch examplefiles</title>
<subtitle>github.com: pygments/pygments.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/'/>
<entry>
<title>Run pyupgrade across codebase to modernize syntax and patterns (#1622)</title>
<updated>2021-01-17T15:44:58+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2021-01-17T15:44:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=debda34e2d4f28d6d369cdafdcba4791702f63fc'/>
<id>debda34e2d4f28d6d369cdafdcba4791702f63fc</id>
<content type='text'>
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 &lt;Anteru@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;Anteru@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Bump copyright year.</title>
<updated>2021-01-03T17:03:23+00:00</updated>
<author>
<name>Matthäus G. Chajdas</name>
<email>dev@anteru.net</email>
</author>
<published>2021-01-03T17:03:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=a590ac5ea7c00a41e253834306bfa19e38349c0b'/>
<id>a590ac5ea7c00a41e253834306bfa19e38349c0b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>TNTLexer: Don't crash on unexpected EOL. (#1570)</title>
<updated>2020-10-14T05:18:39+00:00</updated>
<author>
<name>Ken</name>
<email>kenny2minecraft@gmail.com</email>
</author>
<published>2020-10-14T05:18:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=3e1b79c82d2df318f63f24984d875fd2a3400808'/>
<id>3e1b79c82d2df318f63f24984d875fd2a3400808</id>
<content type='text'>
* TNTLexer: Don't crash on unexpected EOL

Catch IndexErrors in each line and error the rest of the line,
leaving whatever tokens were found.

* Write and pass tests for Typographic Number Theory

pygments/lexers/tnt.py:
* Fix indentation on import
* Fix: TNTLexer.cur is class-level reference if not initialized
  in get_tokens_unprocessed, so init it in __init__ too
* Fix: Fantasy markers are not allowed as components of other formulas,
  so have a dedicated check for them in the body of get_tokens_unprocessed
  which disables the normal formula handling if present
* Clarify TNTLexer.lineno docstring
* Attempt to discard tokens before an IndexError

+tests/test_tnt.py:
* Test every method, and test both +ve and -ve matches for most
* Lexer fixture is test-level to reinitialize cur clean each time
* Don't test actual get_tokens_unprocessed method (besides for fantasy markers)
  because the text testing is left to examplefiles

AUTHORS:
+ Add myself to credits :)

* Add a TNT test just to make sure no crashes</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* TNTLexer: Don't crash on unexpected EOL

Catch IndexErrors in each line and error the rest of the line,
leaving whatever tokens were found.

* Write and pass tests for Typographic Number Theory

pygments/lexers/tnt.py:
* Fix indentation on import
* Fix: TNTLexer.cur is class-level reference if not initialized
  in get_tokens_unprocessed, so init it in __init__ too
* Fix: Fantasy markers are not allowed as components of other formulas,
  so have a dedicated check for them in the body of get_tokens_unprocessed
  which disables the normal formula handling if present
* Clarify TNTLexer.lineno docstring
* Attempt to discard tokens before an IndexError

+tests/test_tnt.py:
* Test every method, and test both +ve and -ve matches for most
* Lexer fixture is test-level to reinitialize cur clean each time
* Don't test actual get_tokens_unprocessed method (besides for fantasy markers)
  because the text testing is left to examplefiles

AUTHORS:
+ Add myself to credits :)

* Add a TNT test just to make sure no crashes</pre>
</div>
</content>
</entry>
<entry>
<title>all: fixup some file headers</title>
<updated>2020-09-06T10:02:11+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2020-09-06T10:02:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=5509d51a8c3b8a0d7c3542e47a8de2edb0d61277'/>
<id>5509d51a8c3b8a0d7c3542e47a8de2edb0d61277</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update CHANGES, docs, add versionadded.</title>
<updated>2020-04-10T11:20:47+00:00</updated>
<author>
<name>Matthäus G. Chajdas</name>
<email>dev@anteru.net</email>
</author>
<published>2020-04-10T11:20:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=2b8c3a30376e79548e39a2f6120641ac918a84a9'/>
<id>2b8c3a30376e79548e39a2f6120641ac918a84a9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Typographic Number Theory lexer (#1414)</title>
<updated>2020-04-10T11:13:50+00:00</updated>
<author>
<name>Ken</name>
<email>kenny2minecraft@gmail.com</email>
</author>
<published>2020-04-10T11:13:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=621e9e25b8131ea1ca382ac9b3c9b73da4fd002d'/>
<id>621e9e25b8131ea1ca382ac9b3c9b73da4fd002d</id>
<content type='text'>
* Add Typographic Number Theory lexer

Originally tried to use RegexLexer, but the
structure of TNT is too rigid for it to handle.
Went with a direct parser instead.

Co-authored-by: lonetwin &lt;steve@lonetwin.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add Typographic Number Theory lexer

Originally tried to use RegexLexer, but the
structure of TNT is too rigid for it to handle.
Went with a direct parser instead.

Co-authored-by: lonetwin &lt;steve@lonetwin.net&gt;</pre>
</div>
</content>
</entry>
</feed>
