Skip to content

Fix lint and formatting breakage on develop blocking all PR CI - #501

Merged
mtarking merged 1 commit into
developfrom
fix_develop_lint_pr491
Aug 10, 2026
Merged

Fix lint and formatting breakage on develop blocking all PR CI#501
mtarking merged 1 commit into
developfrom
fix_develop_lint_pr491

Conversation

@allenrobel

Copy link
Copy Markdown
Contributor

Related Issue(s)

None — unblocks CI for all open PRs (first observed on #454; violations introduced by #491 plus black-version drift).

Proposed Changes

  • Fix the two pep8 violations introduced by Address fabric module issues and fix save without switches issue (NDA-35) #491: wrap the 163-char class_name Field line in manage_fabrics.py (E501) and drop the double blank line in test_config_actions_mixin.py (E303).
  • Fix the two pylint disallowed-name violations from Address fabric module issues and fix save without switches issue (NDA-35) #491: replace _ = instance.path with result = instance.path # pylint: disable=unused-variable in the configSave/deploy endpoint tests, matching the existing convention in sibling endpoint tests.
  • Reformat four files with current psf/black@stable (parenthesized multi-item with statements, magic trailing commas): nd_output.py, test_nd_manage_networks.py, test_nd_manage_vrfs.py, test_manage_resource_manager.py. These fail the "Pep8 Compliance - Black" check on every PR because the stable black version moved forward since they were last formatted.
  • Replace a is not type(None) with a is not types.NoneType in manage_fabric_base.py — the pylint bundled with newer ansible-core flags it as unidiomatic-typecheck (Python floor is 3.10, so types.NoneType is always available).
  • isort the three files whose imports were touched.

All changes are mechanical lint/format fixes; no behavior changes.

Test Notes

  • ansible-test sanity --test pep8 and --test pylint pass (nd-dev container machine)
  • black --check clean across plugins/ and tests/ (line length 159)
  • isort --check-only clean on changed files
  • Unit tests in all touched areas pass: 298 tests (endpoints/orchestrators/modules test files) + 1543 model tests

Cisco Nexus Dashboard Version

4.2.1

Related ND API Resource Category

  • analyze
  • infra
  • manage
  • onemanage
  • other

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly (N/A — lint-only)
  • Assigned the proper reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_011sbmW5b5UXHqMEwV7ysq2G

PR #491 introduced two pep8 violations (E501 in manage_fabrics.py, E303 in
test_config_actions_mixin.py) and two pylint disallowed-name violations
(`_` assignments in the configSave/deploy endpoint tests), failing the
stable-2.18 sanity jobs on every open PR since CI tests the merge with
develop.

Independently, psf/black@stable moved forward and now parenthesizes
multi-item `with` statements and adds magic trailing commas, so the
"Pep8 Compliance - Black" check fails on four files last formatted under
an older black.

Also replace `a is not type(None)` with `a is not types.NoneType` in
manage_fabric_base.py: the pylint shipped with newer ansible-core flags
it as unidiomatic-typecheck (Python floor is 3.10, so types.NoneType is
always available).

Verified in nd-dev: ansible-test sanity pep8 and pylint pass, black
--check clean across plugins/ and tests/, isort clean on changed files,
and 1841 unit tests in the touched areas pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sbmW5b5UXHqMEwV7ysq2G
@allenrobel allenrobel self-assigned this Aug 10, 2026
@allenrobel allenrobel added the ready for review Submitter is requesting a PR review label Aug 10, 2026

@gmicol gmicol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mtarking
mtarking merged commit 2b08f6c into develop Aug 10, 2026
60 checks passed
@mtarking
mtarking deleted the fix_develop_lint_pr491 branch August 10, 2026 23:16
@allenrobel

Copy link
Copy Markdown
Contributor Author

Thank you @mtarking @gmicol @samiib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Submitter is requesting a PR review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants