mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
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:
@ -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:
|
||||
|
Reference in New Issue
Block a user