summaryrefslogtreecommitdiff
path: root/coverage/parser.py
Commit message (Collapse)AuthorAgeFilesLines
* style: fix spellingNed Batchelder2022-11-281-3/+2
| | | | un-executed, white space, time stamp.
* refactor: no need for special handling of compiling unicode sourceNed Batchelder2022-11-061-7/+3
| | | | This was a holdover from Python 2 days.
* fix: properly measure strange use of wildcard alternatives in match/case. #1421Ned Batchelder2022-11-031-1/+4
|
* fix: `class` statements shouldn't be branches. #1449Ned Batchelder2022-09-261-0/+15
| | | | | | Revert "refactor: we no longer need to treat 'class' lines specially" This reverts commit 79f9f4575321fafc2ef770e3255f874db3d4b037.
* style: adapt to latest pylint concernsNed Batchelder2022-09-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Before these changes, these violations happened: ``` lint run-test: commands[6] | python -m pylint --notes= coverage tests doc ci igor.py setup.py __main__.py ************* Module coverage.parser coverage/parser.py:1290 I: Useless suppression of 'too-many-function-args' (useless-suppression) ************* Module ci.download_gha_artifacts ci/download_gha_artifacts.py:18 W: Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (missing-timeout) ci/download_gha_artifacts.py:54 W: Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (missing-timeout) ************* Module ci.trigger_build_kits ci/trigger_build_kits.py:21 W: Missing timeout argument for method 'requests.post' can cause your program to hang indefinitely (missing-timeout) ************* Module ci.github_releases ci/github_releases.py:138 E: Too many positional arguments for function call (too-many-function-args) ci/github_releases.py:138 I: Useless suppression of 'no-value-for-parameter' (useless-suppression) ************* Module ci.comment_on_fixes ci/comment_on_fixes.py:30 W: Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (missing-timeout) ci/comment_on_fixes.py:37 W: Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (missing-timeout) ci/comment_on_fixes.py:49 W: Missing timeout argument for method 'requests.post' can cause your program to hang indefinitely (missing-timeout) ************* Module ci.parse_relnotes ci/parse_relnotes.py:126 E: Too many positional arguments for function call (too-many-function-args) ci/parse_relnotes.py:126 I: Useless suppression of 'no-value-for-parameter' (useless-suppression) ```
* fix: 3.11.0b4 has 0-numbered lines. Fixes #1419Ned Batchelder2022-07-121-1/+1
| | | | | CPython added these lines in https://github.com/python/cpython/commit/1bfe83a114da3939c00746fc44dc5da7f56f525f
* chore: make upgradeNed Batchelder2022-05-121-0/+1
| | | | | Wrote this bug for pylint, because I shouldn't have to add a pragma: https://github.com/PyCQA/pylint/issues/6592
* style: parens should indent the same as their opening lineNed Batchelder2022-05-011-3/+3
|
* debug: tweaks to make these clearerNed Batchelder2022-02-061-3/+3
|
* test: adapt to PyPy 3.9 v7.8.8Ned Batchelder2022-02-061-2/+2
|
* fix: 3.11 now traces decorator lines as the decorators executeNed Batchelder2022-01-151-2/+8
| | | | See: https://bugs.python.org/issue46234
* docs: document the exceptionsNed Batchelder2021-11-141-2/+2
| | | | ... and make some of them private.
* refactor: we no longer need to treat 'class' lines speciallyNed Batchelder2021-11-111-15/+0
| | | | | Originally, this tokenizing code was paired with bytecode analysis. But now we use AST instead, so class lines don't need to be handled differently.
* fix: colons in decorators shouldn't stop an exclusionNed Batchelder2021-11-101-2/+7
|
* fix(debug): ast_dump failed on a few thingsNed Batchelder2021-10-271-2/+5
|
* test: lightly test the ast_dump functionNed Batchelder2021-10-121-67/+66
|
* style: prefer explicit string concatenationNed Batchelder2021-10-101-1/+1
|
* test: mark some uncovered thingsNed Batchelder2021-10-081-2/+6
|
* fix: missing exceptions through with statements in 3.10 aren't considered ↵Ned Batchelder2021-08-141-8/+4
| | | | missing branches. #1205
* fix: correct previous refactoringsNed Batchelder2021-07-281-2/+2
| | | | | File names should not be rendered with !r, since on Windows that will produce double backslashes, which only confuses people.
* refactor: convert %-strings to f-stringsNed Batchelder2021-07-281-4/+3
|
* fix: match/case will trace the default case lineNed Batchelder2021-07-271-3/+0
|
* fix: raise chained errors with "from" #998Ned Batchelder2021-07-201-5/+3
| | | | | | This makes exceptions report their causes correctly, as "The above exception was the direct cause of the following exception" instead of "During handling of the above exception, another exception occurred."
* feat: add support for Python 3.10 match-case statementsNed Batchelder2021-06-061-0/+21
|
* fix: in Python 3.10, leaving a with block exits through the with statement.Ned Batchelder2021-06-051-9/+74
| | | | This need 3.10.0b3 (not yet released) to fully pass.
* refactor: no need for clever byte_parser propertyNed Batchelder2021-06-051-10/+3
| | | | | It was only ever used once per object, so just make the ByteParser when we need it.
* test: add a test for annotated assignmentNed Batchelder2021-06-051-1/+4
| | | | | | | | | Every statement-level ast node should be tested. Annotated assignment was missing. Also, we don't need "exec" anymore, that was only for Python 2. And: this is the 1000th test!
* test: during testing, be strict about handling all ast nodesNed Batchelder2021-06-041-4/+3
|
* refactor: better naming for a code object dispatcherNed Batchelder2021-06-041-14/+16
|
* refactor: delegate to blocks and avoid isinstanceNed Batchelder2021-06-041-38/+87
|
* refactor: remove things only needed for Python 2Ned Batchelder2021-06-041-26/+1
|
* refactor: move exceptions to their own moduleNed Batchelder2021-05-021-1/+1
|
* refactor: remove a few more version checksNed Batchelder2021-05-021-2/+1
|
* refactor: pyupgrade --py36-plus coverage/*.pyNed Batchelder2021-05-021-37/+36
|
* refactor: remove more unneeded backward.py shimsNed Batchelder2021-05-011-3/+2
| | | | | | | | | | | | | | Gone are: - iitems - litems - iternext - to_bytes - to_string - binary_bytes - byte_to_int - bytes_to_ints - BUILTINS
* refactor: remove unneeded backward.py shimsNed Batchelder2021-05-011-3/+2
| | | | | | | | | | | | | | | Removed were: - StringIO - configparser - string_class - unicode_class - range - zip_longest - get_thread_id - path_types - shlex_quote - reprlib
* refactor: remove code explicitly choosing between py2 and py3Ned Batchelder2021-05-011-5/+2
|
* tool: more information about the location of ast nodes when debuggingNed Batchelder2021-03-131-1/+6
|
* A better test for 'if not __debug__'Ned Batchelder2021-01-101-3/+1
|
* PEP 626: constant tests are kept as no-opsNed Batchelder2021-01-101-1/+6
| | | | | The conditionals are now getting unwieldy, perhaps we can simplify them in the future?
* In 3.10, modules always have firstlineno==1Ned Batchelder2021-01-101-1/+9
|
* Use co_lines() if it's availableNed Batchelder2021-01-101-27/+28
|
* Use set literalsNed Batchelder2021-01-031-9/+9
|
* Thanks, Kjell BradenNed Batchelder2020-03-261-1/+0
|
* handle decorators for AsyncFunctionDefs. Closes #964Kjell Braden2020-03-241-0/+2
|
* Exit arcs have to be corrected to first linesNed Batchelder2019-09-211-1/+5
| | | | | | | | | | We've long remapped line numbers to the first line of a multi-line statement. But exit line numbers (negative numbers) were not remapped. This meant we were needlessly chasing weirdnesses in implementations. But the actual results of running coverage always remapped results to the first line, so there's no point in tracking the unmapped line numbers in our tests.
* No need for format indexes (mostly)Ned Batchelder2019-09-011-19/+19
|
* This class was simpler as a functionNed Batchelder2019-06-171-3/+2
|
* Move more PYVERSION to be PYBEHAVIORNed Batchelder2019-03-241-1/+1
|
* Python 3.8 will optimize away "while True:"Ned Batchelder2018-11-111-0/+21
|