Skip to content
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

Constrain type of WhiteNoise.index_file #440

Merged
merged 1 commit into from
Nov 3, 2022
Merged

Conversation

adamchainz
Copy link
Collaborator

Split from #410. Previously this could be str | bool | None, now it's just str | None. This makes it easier to use type narrowing like self.index_file is not None.

Also inline the index file logic, so that type narrowing applies. I also find it easier to follow without tons of functions to jump between.

@adamchainz adamchainz merged commit 636cd37 into main Nov 3, 2022
@adamchainz adamchainz deleted the inline_index_logic branch November 3, 2022 10:21
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.

None yet

1 participant