Skip to content

Fix false positive linter warning and a use before assignment #803

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CarstenGrohmann
Copy link
Contributor

@CarstenGrohmann CarstenGrohmann commented Apr 5, 2025

The use before assignment is in the host fixture and will not affect the daily usage.

Change logic to prevent:

    testinfra/modules/socket.py:347:26: E0606: Possibly using variable 'protocol' before assignment (possibly-used-before-assignment)
@CarstenGrohmann CarstenGrohmann force-pushed the 20250401_fix_false_positive_linter_warnings branch from 6095c39 to e8fb304 Compare April 5, 2025 08:23
The hostname variable will not set for all connections/backends. Currently
the test does not fail as not all backends are tested.
@CarstenGrohmann CarstenGrohmann force-pushed the 20250401_fix_false_positive_linter_warnings branch from e8fb304 to 9acf605 Compare April 5, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant