Skip to content
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

formatting all code with black and flake8 #82920

Closed
wants to merge 1 commit into from

Conversation

seldish-og
Copy link

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
  • Feature Pull Request
  • Test Pull Request
ADDITIONAL INFORMATION

@ansibot ansibot added bug This issue/PR relates to a bug. feature This issue/PR relates to a feature request. test This PR relates to tests. needs_triage Needs a first human triage before being processed. networking Network category needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Mar 27, 2024
@ansibot
Copy link
Contributor

ansibot commented Mar 27, 2024

The test ansible-test sanity --test required-and-default-attributes [explain] failed with 1 error:

test/sanity/ignore.txt:79:1: Ignoring 'lib/ansible/playbook/collectionsearch.py' is unnecessary

The test ansible-test sanity --test pep8 [explain] failed with 13 errors:

lib/ansible/playbook/attribute.py:143:46: E701: multiple statements on one line (colon)
lib/ansible/plugins/shell/sh.py:71:161: E501: line too long (236 > 160 characters)
lib/ansible/plugins/shell/sh.py:80:161: E501: line too long (289 > 160 characters)
lib/ansible/plugins/shell/sh.py:83:161: E501: line too long (280 > 160 characters)
packaging/release.py:58:1: E704: multiple statements on one line (def)
packaging/release.py:67:1: E704: multiple statements on one line (def)
packaging/release.py:76:1: E704: multiple statements on one line (def)
packaging/release.py:533:1: E704: multiple statements on one line (def)
packaging/release.py:537:1: E704: multiple statements on one line (def)
packaging/release.py:541:1: E704: multiple statements on one line (def)
test/sanity/code-smell/test-constraints.py:89:161: E501: line too long (164 > 160 characters)
test/units/cli/test_doc.py:25:161: E501: line too long (247 > 160 characters)
test/units/galaxy/test_collection.py:1016:161: E501: line too long (178 > 160 characters)

The test ansible-test sanity --test pylint [explain] failed with 56 errors:

lib/ansible/inventory/host.py:75:8: unnecessary-dunder-call: Unnecessarily calls dunder method __init__. Instantiate class directly.
lib/ansible/module_utils/basic.py:1573:24: ansible-deprecated-no-version: Display.deprecated call without a version or date
lib/ansible/module_utils/basic.py:1577:16: ansible-deprecated-no-version: Display.deprecated call without a version or date
lib/ansible/module_utils/common/collections.py:10:0: unused-import: Unused MutableMapping imported from ansible.module_utils.six.moves.collections_abc
lib/ansible/modules/file.py:644:12: using-constant-test: Using a conditional statement with a constant value
lib/ansible/parsing/ajson.py:9:0: unused-import: Unused AnsibleJSONEncoder imported from ansible.module_utils.common.json
lib/ansible/playbook/attribute.py:143:47: multiple-statements: More than one statement on a single line
lib/ansible/plugins/cache/base.py:20:0: unused-import: Unused BaseCacheModule imported from ansible.plugins.cache
lib/ansible/plugins/cache/base.py:20:0: unused-import: Unused BaseFileCacheModule imported from ansible.plugins.cache
lib/ansible/plugins/loader.py:1014:20: ansible-deprecated-no-version: Display.deprecated call without a version or date
lib/ansible/plugins/loader.py:1197:16: unnecessary-dunder-call: Unnecessarily calls dunder method __init__. Instantiate class directly.
test/integration/targets/ansiballz_python/library/custom_module.py:5:0: relative-beyond-top-level: Attempted relative import beyond top-level package
test/integration/targets/ansiballz_python/library/custom_module.py:8:0: relative-beyond-top-level: Attempted relative import beyond top-level package
test/integration/targets/ansible-test-container/runme.py:571:15: used-before-assignment: Using variable 'error' before assignment
test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor1.py:19:0: unused-import: Unused loader imported from ansible.plugins
test/integration/targets/ansible-test-sanity-import/ansible_collections/ns/col/plugins/lookup/vendor2.py:19:0: unused-import: Unused loader imported from ansible.plugins
test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/modules/bad.py:21:0: unused-import: Unused constants imported from ansible
test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/tests/integration/targets/hello/files/bad.py:11:4: unused-import: Unused Request imported from urllib2
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/module_utils/subpkg_with_init/__init__.py:5:0: relative-beyond-top-level: Attempted relative import beyond top-level package
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_collection_redirected_mu.py:10:0: relative-beyond-top-level: Attempted relative import beyond top-level package
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_collection_redirected_mu.py:13:0: relative-beyond-top-level: Attempted relative import beyond top-level package
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_mu_missing.py:4:0: relative-beyond-top-level: Attempted relative import beyond top-level package
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_mu_missing.py:4:0: unused-import: Unused bogusmu imported from module_utils
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_mu_missing_redirect_collection.py:4:0: relative-beyond-top-level: Attempted relative import beyond top-level package
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_mu_missing_redirect_collection.py:4:0: unused-import: Unused missing_redirect_target_collection imported from module_utils
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_mu_missing_redirect_module.py:4:0: relative-beyond-top-level: Attempted relative import beyond top-level package
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_mu_missing_redirect_module.py:4:0: unused-import: Unused missing_redirect_target_module imported from module_utils
test/lib/ansible_test/_internal/cli/argparsing/parsers.py:252:14: unused-argument: Unused argument 'value'
test/lib/ansible_test/_internal/cli/argparsing/parsers.py:258:14: unused-argument: Unused argument 'value'
test/lib/ansible_test/_internal/cli/argparsing/parsers.py:655:14: unused-argument: Unused argument 'state'
test/lib/ansible_test/_internal/commands/sanity/__init__.py:1036:14: unused-argument: Unused argument 'targets'
test/lib/ansible_test/_internal/ssh.py:259:12: consider-using-with: Consider using 'with' for resource-allocating operations
test/lib/ansible_test/_internal/util.py:370:4: import-error: Unable to import 'ansible_release'
test/lib/ansible_test/_internal/util.py:532:22: consider-using-with: Consider using 'with' for resource-allocating operations
test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py:53:0: implicit-str-concat: Implicit string concatenation found in tuple
test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py:103:0: implicit-str-concat: Implicit string concatenation found in tuple
test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py:83:16: protected-access: Access to a protected member _package_to_load of a client class
test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py:84:19: protected-access: Access to a protected member _package_to_load of a client class
test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py:119:4: protected-access: Access to a protected member _install of a client class
test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py:139:8: protected-access: Access to a protected member _path of a client class
test/lib/ansible_test/_util/target/sanity/import/importer.py:120:23: consider-using-with: Consider using 'with' for resource-allocating operations
test/lib/ansible_test/_util/target/sanity/import/importer.py:148:8: protected-access: Access to a protected member _meta_yml_to_dict of a client class
test/lib/ansible_test/_util/target/setup/requirements.py:348:14: consider-using-with: Consider using 'with' for resource-allocating operations
test/lib/ansible_test/_util/target/setup/requirements.py:393:11: unspecified-encoding: Using open without explicitly specifying an encoding
test/sanity/ignore.txt:74:1: ansible-test: Ignoring 'trailing-comma-tuple' on 'lib/ansible/module_utils/six/__init__.py' is unnecessary
test/units/modules/test_hostname.py:82:0: implicit-str-concat: Implicit string concatenation found in call
test/units/modules/test_hostname.py:87:0: implicit-str-concat: Implicit string concatenation found in call
test/units/modules/test_hostname.py:104:0: implicit-str-concat: Implicit string concatenation found in call
test/units/modules/test_hostname.py:108:0: implicit-str-concat: Implicit string concatenation found in call
test/units/modules/test_hostname.py:113:0: implicit-str-concat: Implicit string concatenation found in call
test/units/modules/test_hostname.py:117:0: implicit-str-concat: Implicit string concatenation found in call
test/units/modules/test_known_hosts.py:59:0: implicit-str-concat: Implicit string concatenation found in call
test/units/modules/test_known_hosts.py:77:0: implicit-str-concat: Implicit string concatenation found in call
test/units/modules/test_known_hosts.py:95:0: implicit-str-concat: Implicit string concatenation found in call
test/units/plugins/connection/test_winrm.py:368:0: implicit-str-concat: Implicit string concatenation found in assignment
test/units/plugins/connection/test_winrm.py:392:0: implicit-str-concat: Implicit string concatenation found in assignment

click here for bot help

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Mar 27, 2024
@sivel
Copy link
Member

sivel commented Apr 1, 2024

Thank you for your interest in Ansible, however we do not accept code reformatting changes through community contributed pull requests.

If you have further questions please stop by IRC or the mailing list:

@sivel sivel closed this Apr 1, 2024
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Apr 1, 2024
@ansible ansible locked and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. ci_verified Changes made in this PR are causing tests to fail. feature This issue/PR relates to a feature request. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. networking Network category test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants