Commit Graph

4 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
bc8df6de31
[pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-13 07:52:41 +01:00
Christian Clauss
cecf43d648
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-07 13:37:03 +02:00
Christian Clauss
46e56fa6f2
luhn.py: Favor list comprehensions over maps (#4663)
* luhn.py: Favor list comprehensions over maps

As discussed in CONTRIBUTING.md.

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-08-27 11:45:14 +02:00
QuantumNovice
95a4957d9e
Luhn algorithm (#4487)
* Luhn algorithm

Perform Luhn validation on input string
    Algorithm:
    * Double every other digit starting from 2nd last digit.
    * Subtract 9 if number is greater than 9.
    * Sum the numbers
https://en.wikipedia.org/wiki/Luhn_algorithm

* Update DIRECTORY.md

* Update luhn.py

* Update luhn.py

* Update luhn.py

* Update luhn.py

* Update DIRECTORY.md
2021-06-13 23:49:44 +05:30