-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning cleanup. #42
Warning cleanup. #42
Commits on Jun 10, 2019
-
Fix remaining escape sequence warnings in lex patterns.
Raw strings (marked by the `r` prefix) are normally used for regular expression patterns to allow that module to expand any backslash-escape sequences without interference from the Python interpreter's string expansion, and thus the requirement for extra quoting. This practice is further encouraged by python 3.5 and later raising a `DepreciationWarning` when encountering escape sequences it can't expand, as is common is re patterns. However, in python 2.7, the `re` module doesn't expand \u and \U escapes for unicode codepoints, so patterns with non-ascii characters can only be used in raw strings when using python 3.3 or later, or the external `regex` module, and neither `u` nor `r` quoted strings will work for patterns in both languages. However, Python will concatenate whitespace-separated string literals even if they use different quoting. Take advantage of this to split the lexer patterns into raw- and unicode-quoted segments as appropriate. Also remove some unnecessary escape sequences.
Configuration menu - View commit details
-
Copy full SHA for 14e01ba - Browse repository at this point
Copy the full SHA 14e01baView commit details -
travis: Replace pep8 with pycodestyle.
The pep8 name is deprecated, and the tool continues under the new name.
Configuration menu - View commit details
-
Copy full SHA for f2bdbe1 - Browse repository at this point
Copy the full SHA f2bdbe1View commit details -
travis: Use
pytest
invocation.Now that we're using a newer pytest, we can invoke it as such even in the jython build, instead of using the older `py.test`.
Configuration menu - View commit details
-
Copy full SHA for 50d7165 - Browse repository at this point
Copy the full SHA 50d7165View commit details -
Sanitize lexer pattern regex escapes.
The parser's token pattern strings escaped almost all punctuation characters, but the Python `re` module has a fairly limited set of special characters which must be backslash-escaped. In particular, characters like @ ! : and space do not need escapes, and even more are fine inside a [] environment describing a set of characters. Audit the expression strings and remove most unnecessary escapes. I left some sequences like `[^\^\[]` which aren't ambiguous without escapes for clarity of reading.
Configuration menu - View commit details
-
Copy full SHA for 508473f - Browse repository at this point
Copy the full SHA 508473fView commit details
Commits on Jun 11, 2019
-
travis: Use the default python3 on macOS.
The default osx image on travis doesn't have an up-to-date set of homebrew packages, so the `brew upgrade` step must compile many packages from source and takes tens of minutes to complete. This makes for very slow test feedback and occasionally failures when the job times out. Travis itself doesn't provide python3 packages through the `language` and `python` yaml keys like it does on Linux. Setting these keys fails trying to download the requested tarball. Give up therefore, and just use whatever python3 was installed on the image by default. Currently that is 3.6.5 from homebrew. This significantly speeds up test feedback.
Configuration menu - View commit details
-
Copy full SHA for 86a99d4 - Browse repository at this point
Copy the full SHA 86a99d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b189a1 - Browse repository at this point
Copy the full SHA 9b189a1View commit details -
Make wrapper/cli.py callable directly.
The main function here is decorated with command-line options through the click library, but as far as I can tell, this change is needed to actually invoke it as a python executable when testing.
Configuration menu - View commit details
-
Copy full SHA for 603f6db - Browse repository at this point
Copy the full SHA 603f6dbView commit details -
Mark the segmentor's output directory with -segment-.
I find this more readable than running it together with the filename extension and the timestamp.
Configuration menu - View commit details
-
Copy full SHA for 63d09f1 - Browse repository at this point
Copy the full SHA 63d09f1View commit details -
Fix some pycodestyle warnings.
Mostly reformatting the code to fit in 80 characters. Also change some variable names, split out function argument tuple unpacking, move some info messages to the --verbose options, and handle all-success in the summary report.
Configuration menu - View commit details
-
Copy full SHA for afbbd27 - Browse repository at this point
Copy the full SHA afbbd27View commit details