Skip to content

Commit

Permalink
Merge pull request #36 from djyasin/python-check-blanket-noqa
Browse files Browse the repository at this point in the history
🧪💅 Eliminate blanket `# noqa` comments
  • Loading branch information
webknjaz authored Sep 17, 2024
2 parents 56e17bb + 113d14c commit a606b1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -605,21 +605,14 @@ jobs:
- spellcheck-docs
environment-variables:
- >- # only affects pre-commit, set for all for simplicity:
SKIP=flake8,mypy,pylint,python-check-blanket-noqa
SKIP=flake8,mypy,pylint
tox-run-posargs:
- ''
xfail:
- false
check-name:
- ''
include:
- runner-vm-os: ubuntu-latest
python-version: 3.11
toxenv: pre-commit
environment-variables: ''
tox-run-posargs: python-check-blanket-noqa --all-files
xfail: true
check-name: python-check-blanket-noqa
- runner-vm-os: ubuntu-latest
python-version: 3.11
toxenv: pre-commit
Expand Down
10 changes: 8 additions & 2 deletions tests/credential_plugins_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,18 @@ class TestDelineaImports:
fallback import."""

def test_dsv_import(self) -> None:
from awx_plugins.credentials.dsv import SecretsVault # noqa
from awx_plugins.credentials.dsv import SecretsVault # noqa: F401

# assert this module as opposed to older thycotic.secrets.vault
assert SecretsVault.__module__ == 'delinea.secrets.vault'

def test_tss_import(self) -> None:
from awx_plugins.credentials.tss import DomainPasswordGrantAuthorizer, PasswordGrantAuthorizer, SecretServer, ServerSecret # noqa
from awx_plugins.credentials.tss import ( # noqa: F401
DomainPasswordGrantAuthorizer,
PasswordGrantAuthorizer,
SecretServer,
ServerSecret,
)

for cls in (
DomainPasswordGrantAuthorizer,
Expand Down

0 comments on commit a606b1c

Please sign in to comment.