Skip to content

Fix linting issues in codebase#360

Merged
cigamit merged 1 commit into
mainfrom
linting
May 29, 2026
Merged

Fix linting issues in codebase#360
cigamit merged 1 commit into
mainfrom
linting

Conversation

@cigamit
Copy link
Copy Markdown
Contributor

@cigamit cigamit commented May 29, 2026

flake8, black, and yamllint all return successful now All tests validate
Most changes are adding / removing newlines but some formatting changes, and some cleanup (removing unused imports, variables, etc...)

flake8, black, and yamllint all return successful now
All tests validate
@cigamit cigamit requested a review from TheWitness May 29, 2026 05:20
@cigamit cigamit self-assigned this May 29, 2026
Copilot AI review requested due to automatic review settings May 29, 2026 05:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR applies linting and formatting cleanup across the AWX codebase without intended behavior changes. It primarily normalizes Python/YAML whitespace, removes unused imports or assignments, and applies black-style formatting to selected expressions and literals.

Changes:

  • Normalized blank lines, trailing whitespace, comments, and YAML EOF formatting.
  • Removed redundant tuple-unpacking parentheses and unused imports/variables.
  • Reformatted long literals/calls and preserved selected regex formatting with # fmt directives.

Reviewed changes

Copilot reviewed 159 out of 168 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/docker-compose/ansible/roles/sources/tasks/main.yml Removes trailing blank line.
tools/docker-compose/ansible/roles/sources/defaults/main.yml Normalizes comment spacing and EOF newline.
tools/ansible/roles/dockerfile/defaults/main.yml Normalizes comment spacing.
awx/wsgi.py Removes extra blank line.
awx/urls.py Removes extra blank line.
awx/ui/conf.py Removes extra blank line.
awx/sso/urls.py Removes extra blank line.
awx/sso/conf.py Reformats help text literals.
awx/sso/common.py Removes redundant tuple-unpacking parentheses.
awx/sso/backends.py Removes trailing whitespace.
awx/settings/defaults.py Applies black formatting to dictionaries.
awx/main/wsrelay.py Removes trailing/extra whitespace.
awx/main/utils/* Normalizes blank lines and wraps one handler signature.
awx/main/tests/** Applies formatting cleanup and removes unused test variables/imports.
awx/main/tasks/* Normalizes imports/blank lines and tuple unpacking.
awx/main/scheduler/* Removes extra blank lines and tuple-unpacking parentheses.
awx/main/models/** Normalizes formatting, imports, tuple unpacking, and trailing commas.
awx/main/migrations/** Applies formatting-only cleanup to migration files.
awx/main/middleware.py Removes trailing whitespace and normalizes blank lines.
awx/main/management/commands/** Applies lint/formatting cleanup in management commands.
awx/main/fields.py Normalizes escape casing in regex pattern.
awx/main/credential_plugins/** Applies blank-line and black formatting cleanup.
awx/main/analytics/** Applies formatting cleanup to query construction/blank lines.
awx/conf/** Normalizes spacing and preserves URL regex formatting.
awx/api/** Removes extra blank lines and tuple-unpacking parentheses across API views/URLs/helpers.
awx/__init__.py Adds required blank line before top-level function.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@TheWitness TheWitness left a comment

Choose a reason for hiding this comment

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

Just a few comments out of curiosity mainly. Good dusting off of the code otherwise.

)
o.galaxy_credentials.add(public_galaxy_credential)

# i, _ = Inventory.objects.get_or_create(name='Demo Inventory', organization=o, created_by=superuser)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this some sort of bug or perf issue. The last one too. Just curious.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe just debug logic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This all was old logic that we removed when we first created Ascender (this PR just changes the spacing for the commenting out). This file itself preloads "Demo" inventories, Users, etc.. which we did not want. Instead we add things through our setup playbook if the user desires.

@cigamit cigamit merged commit f5a359b into main May 29, 2026
1 check passed
@cigamit cigamit deleted the linting branch May 29, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants