Commit Graph

10 Commits

Author SHA1 Message Date
Maxim Smolskiy
2702bf9400
Enable ruff S113 rule (#11375)
* Enable ruff S113 rule

* [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-04-21 19:34:18 +02:00
Maxim Smolskiy
53b2926704
Enable ruff PGH003 rule (#11345)
* Enable ruff PGH003 rule

* Fix

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

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

* Fix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-02 21:29:34 +02:00
Maxim Smolskiy
93fb555e0a
Enable ruff SIM102 rule (#11341)
* Enable ruff SIM102 rule

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

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

* Fix

* [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-04-02 03:27:56 +02:00
Christian Clauss
4004b862d5
Revert "validate_solutions.py: os.getenv('GITHUB_TOKEN', '')" (#10552)
* Revert "validate_solutions.py: os.getenv('GITHUB_TOKEN', '') (#10546)"

This reverts commit 68e6d5ad7e.

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-15 15:40:13 -04:00
Christian Clauss
68e6d5ad7e
validate_solutions.py: os.getenv('GITHUB_TOKEN', '') (#10546)
* validate_solutions.py: os.getenv('GITHUB_TOKEN', '')

@tianyizheng02

* updating DIRECTORY.md

* f this

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-15 13:11:05 -04:00
Aniruddha Bhattacharjee
b743e44259
Wavelet tree (#4267)
* Added the matrix_exponentiation.py file in maths directory

* Implemented the requested changes

* Update matrix_exponentiation.py

* resolve merge conflict with upstream branch

* add new line at end of file

* add wavelet_tree

* fix isort issue

* updating DIRECTORY.md

* fix variable names in wavelet_tree and correct typo

* Add type hints and variable renaming

* Update data_structures/binary_tree/wavelet_tree.py

Add doctests to placate the algorithm-bot, thanks to @cclauss.

Co-authored-by: Christian Clauss <cclauss@me.com>

* Move doctest to individual functions and reformat code

* Move common test array to the global scope and reuse in tests

* MMove test array to global scope and minor linting changes

* Correct the failing pytest tests

* MUse built-in list for type annotation

* Update wavelet_tree.py

* types-requests

* updating DIRECTORY.md

* Update wavelet_tree.py

* # type: ignore

* # type: ignore

* Update decrypt_caesar_with_chi_squared.py

* ,

* Update decrypt_caesar_with_chi_squared.py

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Aniruddha Bhattacharjee <aniruddha@Aniruddhas-MacBook-Air.local>
2021-06-08 22:49:33 +02:00
Malte Jürgens
03d9b6747b
feat(ci): Hash project euler solutions (#4411)
* hash project euler solutions

* fix errors

* Return missing annotation

* Fix typo

* Extract variable to shorten excessively long line

* Update scripts/validate_solutions.py

* Update scripts/validate_solutions.py

* Simplify with str.encode()

* PEP 585: type hinting generics in standard collections;

* str().encode()

* Texas two step to placate black, flake8, mypy

Co-authored-by: Andrii Siriak <siryaka@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-05-12 09:48:23 +02:00
Christian Clauss
252df0a149
fix(mypy): Fix files in scripts/ (#4320) 2021-04-07 08:12:56 +05:30
Dhruv Manilawala
ba6310b647
Validate only submitted Project Euler solution (#3977)
* Update validate solution script to fetch only submitted solution
* Update workflow file with the updated PE script
* Fix: do not fetch `validate_solutions.py` script
* Update script to use the requests package for API calls
* Fix: install requests module
* Pytest ignore scripts/ directory
2020-11-29 23:11:09 +05:30
Dhruv Manilawala
b97529dd88
Move validate_solutions and add durations flag to pytest.ini (#3704)
* Move PE validate_solutions to scripts/ directory

* Update pytest.ini file with durations settings

* Remove codespell and autoblack workflow file

* Dependent changes to test config files

* Update pytest.ini
2020-10-24 19:07:33 +05:30