summaryrefslogtreecommitdiff
path: root/examples/dfmparse.py
Commit message (Collapse)AuthorAgeFilesLines
* Blacken the project (#141)Jon Dufresne2019-10-311-33/+89
|
* Use pyupgrade to upgrade the code to use Python3 conventions (#138)Jon Dufresne2019-10-241-1/+1
| | | | | | | | | | | | The pyupgrade project is available at https://github.com/asottile/pyupgrade and can be installed through pip. The pyupgrade tool automatically upgrades syntax for newer versions of the language. As pyparsing is now Python 3 only, can apply some cleanups and simplifications. Ran the tool using the following command: $ find . -name \*.py -exec pyupgrade --py3-plus {} \; For now, pyparsing.py was skipped while it is refactored to a package.
* Replace bare 'except:' with 'except Exception;'Jon Dufresne2018-12-241-1/+1
| | | | | | | | | | | | | Catching all exceptions is generally considered a bad practice under most circumstances as it will also catch KeyboardInterrupt and SystemExit. These special cases should be raised to the interpreter to allow the Python process to exit. This fix complies with pycodestyle's error code E722: https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes > do not use bare except, specify exception instead
* Remove unused imports throughout projectJon Dufresne2018-12-241-1/+1
| | | | | | | | | | | | | Unused imports were discovered using flake8. By removing the unused imports, the code is a bit friendlier to new contributors as it is clearer what is being used and not simply leftover from previous refactoring. The flake8 command: $ flake8 . --select F401 http://flake8.pycqa.org/
* Trim trailing white space throughout the projectJon Dufresne2018-12-221-6/+6
| | | | | | Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated lines.
* Move src to rootCengiz Kaygusuz2017-11-201-0/+179