Recent Releases of qchecker
qchecker - v1.1.1
BugFixes
IndentationErrorsthrown during AST parsing are now rethrown asSyntaxErrorscst_substructure.iter_matchesnow uses metadata wrapper for parsing string arguments to prevent errors when constructing matches in CSTs
Changes
NoOpis now a subset ofEmptyIfBodyandEmptyElseBodyand will not match if the noop is part of these patterns- Subset substructure functionality is now deprecated and will be removed in the next major version. Substructures can be filtered manually if needed.
- Python
Published by James-Ansley over 3 years ago
qchecker - v1.1.0
[1.1.0]
BugFixes
RedundantArithmeticnow catchesx - 0andx ** 1
Changes
- New Substructure
NoOpto catch expressions where values are assigned to themselves or augmented assignments do not change the value (e.g.x += 0) - New Substructure
Tautologyto catch simple boolean expressions that always evaluate to True (excluding theTrueconstant). e.g.x == xorx == 0 or x != 0 - New Substructure
Contradictionto catch simple boolean expressions that always evaluate to False (excluding theFalseconstant). e.g.x is not xorx == 0 and x == 1 - New Substructure
WhileAsForto catch while loops that could be easily rewritten as for loops - New Substructure
ForWithRedundantIndexingto catchfor i in rangeloops that can be replaced with forfor value in iterableloops. - Substructure
iter_matchesetc. methods can now take aparser.CodeModuleobject as a parameter. Using a singleCodeModulefor all substructures has been found to improve the run time of this program by 3-4 times for larger code blocks where all substructures are being matched. - String parameter to substructure methods is now deprecated.
RedundantNotdescription now gives examples of operators such asnot inwhich students may be unaware of
- Python
Published by James-Ansley over 3 years ago
qchecker - v1.0.2
Bugfixes
- Fixed expression tree parsing so
RepeatedAdditionandRepeatedMultiplicationpatterns consider order of operations. #5
Changes
RepeatedAdditionandRepeatedMultiplicationpatterns now consider non-adjacent repeats. For example,x + y + xis now considered a repeated addition.
- Python
Published by James-Ansley over 3 years ago
qchecker - v1.0.1
Bugfixes
- Fixed issue in
RepeatedAdditionandRepeatedMultiplicationwhere an operand whose prefix/suffix matched the preceding/proceeding operands would be counted as a repeated operand. e.g.x + x1andab + bare no longer matched. RepeatedMultiplicationdescription no longer incorrectly lists squares as instances- Fixed "couuld" typo in
MergeableEqualdescription - Fixed error where
DuplicateIfElseStatementandSeveralDuplicateIfElseStatementswould match on elif blocks #3 - Fixed incorrect handling of CST parser errors. Parser errors are now rethrown as syntax errors
Changes
- Substructure
iter_matchesfunction now cannot be guaranteed to lazily search code for matches. This affects some substructureis_presentfunctions too. - Deprecation warnings have been removed
- Python
Published by James-Ansley almost 4 years ago
qchecker - v0.0.0-alpha.2
Added pylint and flake8 Substructures can now list subset substructures to avoid double matching.
- Python
Published by James-Ansley almost 4 years ago
qchecker - v0.0.0-alpha.1
Initial release – a barebones project with some basic functionality.
- Python
Published by James-Ansley almost 4 years ago