You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/sanity/code-smell
Martin Krizek 600c1e67b4
Exceptions clean up (#85176)
* replace usage of `IOError` as it is an alias to `OSError`
* replace usage of `socket.error` as it is an alias to `OSError`
* use subclasses of `OSError` rather than inspecting `errno`s
* utilize `exist_ok` parameter of `os.makedirs` rather than ignoring
  `FileExistsError`

Make the following changes to the exception handling this patch already
updates to be consistent with the new code:
* use `ex` as a name for exception being handled
* use `from ex` when re-raising exception for additional context
* use f-strings and `!r` for quoting
* pass exceptions to the `exception` parameter of `fail_json`
* use `display.error_as_warning` rather than passing stringified
  exception into `display.warning`

Co-authored-by: Matt Clay <matt@mystile.com>
6 months ago
..
mypy Switch to stackwalk caller ID (#85095) 7 months ago
ansible-requirements.json ansible-test - split controller/target testing (#75605) 4 years ago
ansible-requirements.py Clean up unused imports in sanity tests (#79896) 3 years ago
black.json Prevent template lookup and action from masking `ansible_managed` value (#85075) 6 months ago
black.py ansible-test - Support target testing with black (#84744) 10 months ago
black.requirements.in ansible-test - Initial support for black in core (#84741) 10 months ago
black.requirements.txt ansible-test - Update sanity requirements (#85160) 7 months ago
boilerplate.json Rename boilerplate sanity test (#81903) 2 years ago
boilerplate.py Update boilerplate sanity test (#83879) 1 year ago
deprecated-config.json Split up "code smell" sanity tests. (#60174) 6 years ago
deprecated-config.py Code formatting for test/sanity/code-smell/ (#85165) 7 months ago
deprecated-config.requirements.in Update sanity requirements comments (#81321) 2 years ago
deprecated-config.requirements.txt ansible-test - Update sanity test requirements (#84866) 9 months ago
mypy.json Increase scope of mypy sanity test (#84288) 1 year ago
mypy.py Code formatting for test/sanity/code-smell/ (#85165) 7 months ago
mypy.requirements.in ansible-test - Add pytest-mock to mypy sanity test (#84669) 10 months ago
mypy.requirements.txt ansible-test - Update sanity requirements (#85160) 7 months ago
no-unwanted-characters.json Add no-unwanted-characters sanity test for core (#82557) 2 years ago
no-unwanted-characters.py Code formatting for test/sanity/code-smell/ (#85165) 7 months ago
no-unwanted-files.json Sanity test updates for collections support. (#61248) 6 years ago
no-unwanted-files.py Code formatting for test/sanity/code-smell/ (#85165) 7 months ago
obsolete-files.json Add `docs` and `examples` to obsolete-files test (#81258) 2 years ago
obsolete-files.py ansible-test - Code style cleanup (#84749) 10 months ago
package-data.json ansible-test - Update mypy and package-data tests (#83734) 1 year ago
package-data.py Code formatting for test/sanity/code-smell/ (#85165) 7 months ago
package-data.requirements.in release.py - Use changelog requirements (#83920) 1 year ago
package-data.requirements.txt ansible-test - Update sanity requirements (#85160) 7 months ago
pymarkdown.config.json Add pymarkdown sanity test for core (#81220) 2 years ago
pymarkdown.json Add pymarkdown sanity test for core (#81220) 2 years ago
pymarkdown.py Code formatting for test/sanity/code-smell/ (#85165) 7 months ago
pymarkdown.requirements.in Add pymarkdown sanity test for core (#81220) 2 years ago
pymarkdown.requirements.txt ansible-test - Update sanity requirements (#85160) 7 months ago
release-names.json Update release name for 2.10 6 years ago
release-names.py Simplify release name tracking and testing (#81151) 2 years ago
required-and-default-attributes.json Update sanity tests for collections. (#61352) 6 years ago
required-and-default-attributes.py test: Update regex for required and default in FieldAttributes (#84209) 11 months ago
skip.txt Split up "code smell" sanity tests. (#60174) 6 years ago
test-constraints.json Fix ansible-test constraints issues. (#73578) 5 years ago
test-constraints.py Code formatting for test/sanity/code-smell/ (#85165) 7 months ago
update-bundled.json Split up "code smell" sanity tests. (#60174) 6 years ago
update-bundled.py Exceptions clean up (#85176) 6 months ago
update-bundled.requirements.in ansible-test - Update import test and sanity requirements. (#76308) 4 years ago
update-bundled.requirements.txt ansible-test - Update sanity requirements (#85160) 7 months ago