summaryrefslogtreecommitdiff
path: root/docutils/utils/code_analyzer.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix "shebang on non-executable files".milde2022-11-161-5/+3
| | | | | | | | Based on patch in opensuse.org RPM package spec. - Change mode of files supporting use as command-line script. - Remove "shebang line" from library modules. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9250 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Ensure 2 blank lines around top-level functions and classes.milde2022-03-041-0/+2
| | | | | | | | flake8 rules E302: expected 2 blank lines, found 1 E305: expected 2 blank lines after class or function definition git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9026 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Ensure at least two spaces before inline comment.milde2022-03-041-5/+5
| | | | | | | | | flake 8 rule E261 Exceptions for modules sheduled for removal or with 3rd-party origin and for data collections. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9021 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix code indentationmilde2022-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | Check conformance to our coding policies with flake8. Fix the following problems: E111 indentation is not a multiple of four E114 indentation is not a multiple of four (comment) E115 expected an indented block (comment) E116 unexpected indentation (comment) E117 over-indented E121 continuation line under-indented for hanging indent E122 continuation line missing indentation or outdented E124 closing bracked does not match visual indentaion E127 continuation line over-indented for visual indent E128 continuation line under-indented for visual indent E131 continuation line unaligned for hanging indent git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8994 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* New style classes no longer need to inherit from `object`.milde2022-01-261-2/+2
| | | | | | Patch by Adam Turner. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8984 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove redundant parenthesesmilde2022-01-261-8/+8
| | | | | | Patch by Adam Turner. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8976 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Remove "coding:" slugmilde2022-01-031-2/+1
| | | | | | Only required with Python 2.x. Encoding in Py3k is utf8 by default. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8926 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix spellingmilde2021-10-221-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8860 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Update pygments integration.milde2021-01-031-6/+1
| | | | | | | Pygments no longer uses the pkg_resources.DistributionNotFound exception, so we don't need to import it. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8599 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Don't drop "code" directive content if Warnings are silenced.milde2020-12-161-2/+2
| | | | | | | | | | | | | | Output the content without syntax highlight to prevent data loss. It is still recommended to solve the issue instead of just silencing the warning. (Languages that are unknown to the Pygments Lexer should be specified as :class: option value instead of directive argument.) Thanks to Jérôme Carretero for the report and suggestion. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8596 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* py3: Replace 'foo.next()' with 'next(foo)'milde2019-08-261-1/+1
| | | | | | | | | The former only works in Python 2, while the latter works in Python 2.7 and 3.x. Signed-off-by: Stephen Finucane <stephen@that.guru> git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8361 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Drop support for Python 3.3milde2019-08-261-1/+1
| | | | | | | | | | This doesn't involve a whole lot of changes, but references to Python 3.3 (plus some to the already removed Python 2.6) are removed and 'setup.py' is updated as necessary. Signed-off-by: Stephen Finucane <stephen@that.guru> git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8338 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix code_analyzer problem under Python 3.3.milde2018-01-161-1/+6
| | | | | | | Handle pkg_resources.DistributionNotFound error raised by pygments if no lexer can be found for a "code" role or directive. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8213 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Drop compatibility code for Python 2.4 and 2.5.milde2017-08-111-5/+8
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8163 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Safe import of "pygments": syntax errors with Py 3.1 and 3.2.milde2015-04-201-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7884 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* docutils.utils is now a package (providing a place for sub-modules)milde2011-12-201-0/+134
important:: docutils/math, docutils/error_reporting.py, and docutils/urischemes.py will move to the utils package in the next release, too. Code importing these modules needs to adapt. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7267 929543f6-e4f2-0310-98a6-ba3bd3dd1d04