Skip to content

Use bytes-string for constant bytes values#2046

Merged
mhammond merged 8 commits intomhammond:mainfrom
Avasam:bytes-string
Apr 20, 2023
Merged

Use bytes-string for constant bytes values#2046
mhammond merged 8 commits intomhammond:mainfrom
Avasam:bytes-string

Conversation

@Avasam
Copy link
Copy Markdown
Collaborator

@Avasam Avasam commented Apr 18, 2023

Split off from #1990

Another PR in a series concerning code cleanup. With the final goal to make basic type-checking validation of public methods possible, easing the addition of 3.7+ type annotations.

Using bytes-strings (b"") for constant/known bytes values rather than needlessly calling .encode now that it is no longer needed for Python2 support.

Avasam added 2 commits April 17, 2023 21:26
.encode on direct strings

Replace uses of str2bytes
@mhammond mhammond merged commit e05d130 into mhammond:main Apr 20, 2023
@mhammond
Copy link
Copy Markdown
Owner

Thanks!

@Avasam Avasam deleted the bytes-string branch April 21, 2023 00:28
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.

2 participants