All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Additional markers for types of change copied from README
:
- 🎈 Features. Public facing changes to functionality.
- 📕 Documentation. Public facing changes to documentation, but no functionality changes.
- ⛏️ Internal refactors. Internal technical changes with no downstream changes to features.
- 🔥 Breaking change.
See also latest documentation.
- 📕 Version signatures now run on Python 3.12, upgraded from Python 3.11.
- 📕 Build out individual documentation pages for error
AAA02
andAAA04
. Completes work on Issue 149. - ⛏️ Make tag recipe fixed to work using grep. Issue 224.
0.17.0 - 2023/10/30
- ⛏️ Syntax upgrades on named tuples and f-strings.
- ⛏️ Type hint added for Flake8 config manager.
- 🎈 Explicit support added for Python 3.12. Issue 228.
- ⛏️ Tox label added to help with dependency bumping. Pull #231.
- 📕 Readme updated to reflect re-focus on only operating as a Flake8 plugin.
- ⛏️ Test requirements unpinned from old Flake8 and Mypy.
- ⛏️ All requirements bumped. Issue 227.
🔥 Command line support dropped. Issue 225. In addition:
- 📕 Command line documentation removed.
- ⛏️ Tests and tox environments for command line code removed.
- ⛏️
Function.__str__
method cleaned up.
⛏️ Old style
setup.py check
lint call removed so that Python 3.12 can pass without complicated work arounds.
0.16.0 - 2023/07/16
- 📕 Notes added in docs about latest versions that supported Python 3.7. Issue 198.
- ⛏️ Examples that were for Python 3.8 only (assignment operator focused) were merged into one suite of examples. Issue 198.
- 🔥 Python 3.7 support removed. Issue 198.
0.15.0 - 2023/05/11
- 🎈 New "large" Act block style option added. This allows context managers to
join the Act block when they directly wrap the Act node. This behaviour is
provided to provide compatibility with Black versions
23.*
. Fixes issue 200. - 📕 New docs added for "large" Act block style. Issue 200.
- ⛏️ Moved Black formatted test examples to their own directory. This helps
when running Flake8 against Black formatted tests which need
--aaa-act-block-style=large
. Also fix up associated Makefile recipes and update example README file.
- ⛏️ Removed list of nodes from
Block
class and instead kept the start and end line numbers of the block. This allows for any structural discoveries while doing AST node traversal (e.g. when parsing Large style Act blocks) to be used to calculate the size of the Act block itself. The alternative would have been to store the list of nodes in the Act block, and then re-walk them when working out the block's span, which would be duplication of effort. - ⛏️ Remove unused
MultiNodeBlock
.
0.14.1 - 2023/04/25
- ⛏️ New
--aaa-act-block-style
option added with correspondingaaa_act_block_style
config value. Only default behaviour supported at this stage, but makes room to fix the Black formatting problems in issue #200. - 📕 New "Options and configuration" page added to documentation to support issue #200.
- ⛏️ New tox configuration added
PIP_INDEX_URL
pointed at locally running devpi server instance. - ⛏️ Faker added to test requirements to generate random data.
- 📕 Previous documentation page "Controlling Flake8-AAA" contained information
on both code directives (
# noqa
, etc) and how to use the command line tool. These have been split into two separate pages: "Directives" and "Command line". - ⛏️ Documentation can be built locally with
make docs
recipe, but this has been adjusted to call tox.
0.14.0 - 2023/03/01
- 🎈 Files ending in
_test.py
are now linted. Pull #204 fixes issue #185. - 📕 AAA06 hash comment resolution added to docs. Pull #208 fixes issue #193.
- ⛏️ Release notes updated to use a better method of updating Flake8 version
strings. Also reduce use of
vx.y.z
version strings - use justx.y.z
instead. Pull #207. - ⛏️ AAA05 and AAA06 bad examples upgraded. Pull #208.
0.13.1 - 2023/02/27
- 🎈 Support for Python 3.11 Pull #203
- ⛏️ Read the docs build added with supporting docs requirements. Pull #205.
- ⛏️ Tox configuration rebuilt with lint, test and meta labels. Pull #205.
- ⛏ Requirements cleaned: base requirements removed, specific versions indicated where builds are required on particular Python versions, README added. Pull #205.
0.13.0 - 2023/02/17
- 📕 Extended Changelog entries to include markers indicating focus. Pull #201
- 🎈 Support for Pytest context managers
pytest.warns()
andpytest.deprecated_call()
. Issue #196, pull #199. - ⛏️ "Bad" example added for scenario where manager will only be found if it is
in the
pytest
namespace. To be compatible with Flake8-AAA tests need toimport pytest
and notfrom pytest import raises
. Pull #199.
- ⛏️ CI system (GitHub Actions) adjusted to install pinned requirements from
ci.txt
rather than un-pinned / rolling requirements at "action time". Pull #197 . Also:- Pinned Ubuntu GHA image to
ubuntu-22.04
- Fixed
tox.ini
config to useallowlist_externals
.
- Pinned Ubuntu GHA image to
- 📕 Documentation for error
AAA01
no Act block found in test expanded to contain problematic code / correct code examples. Progress on Issue #149, pull #201.
- 📕 Added missing Python 3.6 compatibility notes missing from
v0.12.2
documentation. Pull #201. - 📕 Supported Python version list updated: remove 3.6 and add 3.10. Pull #201.
0.12.2 - 2022/01/02
- Support for Python 3.6 #189
0.12.1 - 2022/01/01
- Support for Python 3.10 #187
0.12.0 - 2021/05/01
- Fix marking of act blocks on multiple lines - allow
# act
markers to be found on the last line of possible multi line act blocks. #165
0.11.2 - 2021/04/22
- Support for Python 3.9 #177
- CI system changed from Travis to GitHub actions. #173.
- Adjusted "examples_aaa" tox environments to sort both outputs and expected outputs because there were inconsistencies in sorting between local dev and CI.
0.11.1 - 2020/12/28
- Bug which prevented act block hints containing capital letters (like
# Act
) from being found #167
0.11.0 - 2020/07/26
- Adjust rules for comments: no comments allowed in Act blocks. #148.
0.10.1 - 2020/06/20
- Add good example usage of the assignment expression in Python 3.8 to guarantee compatibility. #120.
- Tokens now received from Flake8 to help with comment analysis. #148.
- Stringy line analysis adjusted to use Constant visitor since Str visitor is deprecated as of Python 3.8. #145.
- Blank line analysis now carried out using tokens rather than tokenised AST. #157.
0.10.0 - 2020/05/24
- Test examples are intended to be real but simple examples. All examples added
or updated from now on must:
- Go green when run with Pytest.
- Use only standard library imports.
README rewritten and expanded to be more friendly to readers that are not aware of the AAA pattern. Template from The Documentation Compendium. #141.
Behaviour of context managers in tests has been changed. Going forwards only with statements that are used to catch exceptions are considered actions, for example,
with pytest.raises(...):
. Otherwise, the with statement is arrangement or assertion and must be separated from the Act block by a blank line as usual. #146.Implementing this feature meant changing the line-by-line analysis that happens on test function bodies.
0.9.0 - 2020/03/07
- Simply named files are now checked. For example
test.py
andtests.py
are now checked but were skipped before. #124.
- Doctesting of internal helpers functions - not worth managing a whole tox environment for when only two functions are being tested, and it's easier to write the cases in pytest anyway. Tests moved to pytest.
0.8.1 - 2020/03/01
- Line that are covered by strings (like docstrings) are found with a
NodeVisitor
. Previously this was an iterator on the tree. #132.
0.8.0 - 2020/02/27
- Install requires ASTTokens version 2 or greater, was previously
>= 1.1.10
. - Special test examples that only ran on Python 3.6 and greater, now merged into main test suite. #128
- Support for Python 3.5. #110
- Pylint removed from linting checks.
0.7.2 - 2020/02/24
- Bug preventing type annotated assignment Act blocks from being found #123
0.7.1 - 2019/11/16
- Expanded test suite to run Python 3.8 and added Python 3.8 meta tags. #119
- Bug occurring when running Python 3.8 and linting test functions that are decorated has been fixed. #119
0.7.0 - 2019/07/14
- Improved documentation on use of
# noqa
comments. #102.
- AAA03 and AAA04 (checks for a single blank line before and after Act block) line numbers have been moved down. Part of #79.
- AAA03 and AAA04 errors now return a real offset. #79.
0.6.2 - 2019/06/29
- Add tests for compatibility with Black to the test suite. #90
- New compatibility list shows what Flake8-AAA works with now and plans to support in the future. #97
F-string processing was crashing Flake8-AAA with all versions of Python. This has been fixed with a workaround. #101
This will be "fully fixed" in the first minor version after support for Python 3.5 is dropped. #110
0.6.1 - 2019/05/26
- Output the total number of errors found in a file from the command line interface, along with a big "PASSED!" or "FAILED"
- New test run
cmdbad
asserts that all bad example files return at least one error and a non-zero error code when run through the command line.
- Command line was not returning total number of errors in the file. Instead it
was returning the number of errors in the last function. This meant that
false positives were given for files that contained errors, but where the
last test in the file contained none - in this case a
0
return value was given. #90
0.6.0 - 2019/04/28
- New rule
AAA05
"blank line in block". #66.
- Adjusted error handling so that multiple errors can be returned. #76.
- Blank line analysis changed drastically. Now runs first as part of the test function analysis and finds all blank lines that are not part of a string literal.
0.5.2 - 2019/02/27
- Support for Python 3.7.
- Act node now distinguished from Act block in code and docs. Generic
Block
class now handles all blocks. - Python warnings now reported in test runs.
- Command line wrapper fixed to manually close files opened by
argparse
.
0.5.1 - 2019/02/01
- Bad examples folder. This is used for testing that files containing tests
that fail linting return the expected content when run with
flake8`
.
- Spacing between Arrange and Act analysis fixed. Now recognises comment blocks.
- Spacing between Act and Assert analysis fixed. Now recognises comment blocks.
- Act Blocks can now contain context managers that are not test suite exception
catchers like
pytest.raises()
.
- Location of package pushed down to
/src
directory as recommended by pytest.
0.5.0 - 2018/11/01
- Python 3.5 now supported.
- Command line functionality now available to assist with development and debugging.
- New line-wise analysis, including updated blank line checking and a new
AAA99
rule for node to line mapping collisions.
- Python 2.7 support removed.
flake8
package removed as a dependency since Flake8-AAA can be run on a command line without it.
0.4.0 - 2018/07/17
- Support for unittest tests.
- Improved loading of Act blocks so that they can be found within context managers.
0.3.0 - 2018/06/28
- New rule
AAA03
"expected 1 blank line before Act block, found none" - New rule
AAA04
"expected 1 blank line before Assert block, found none"
0.2.0 - 2018/05/28
- Allow parsing of files containing unicode.
- Do not parse
pytest.raises
blocks in Assert block as Actions.
Initial alpha release.