Skip to content

Fix possibly-unbound session_token (pylint E0606) - #12

Merged
nijave merged 3 commits into
mainfrom
fix/unbound-session-token
Sep 19, 2026
Merged

nijave merged 3 commits into
mainfrom
fix/unbound-session-token

Conversation

@nijave

@nijave nijave commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes the pre-existing pylint E0606 possibly-used-before-assignment at okta_auth.py that turns the pylint CI red on main.

session_token was only assigned inside specific status branches (MFA_REQUIRED, SUCCESS), so if Okta returned any other status value the function fell through to return session_token with the name unbound — a latent NameError. Initializing session_token = None before the branches resolves the lint error and turns that edge case into a defined return instead of a crash.

Behavior change

  • On an unexpected Okta status (none of MFA_REQUIRED/SUCCESS/MFA_ENROLL/LOCKED_OUT), primary auth now returns None instead of raising NameError. No change to any handled path.

This is the base of the current PR stack (#7 and the rest are stacked on top so CI can go green across the stack).

Finalize uv packaging: remove requirements.txt + MANIFEST, install via uv in Dockerfile and CI
@nijave
nijave merged commit fc4d67b into main Sep 19, 2026
2 of 3 checks passed
@nijave
nijave deleted the fix/unbound-session-token branch September 19, 2026 01:43
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