refactor: Move constants outside of variable scope (#7262)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Caeden
2022-10-16 10:33:29 +01:00
committed by GitHub
parent 7776411621
commit c6582b35bf
17 changed files with 107 additions and 97 deletions

View File

@ -8,6 +8,8 @@
source: https://en.wikipedia.org/wiki/Adler-32
"""
MOD_ADLER = 65521
def adler32(plain_text: str) -> int:
"""
@ -20,7 +22,6 @@ def adler32(plain_text: str) -> int:
>>> adler32('go adler em all')
708642122
"""
MOD_ADLER = 65521 # noqa: N806
a = 1
b = 0
for plain_chr in plain_text: