8 Commits
Author SHA1 Message Date
priya-sundaram-devandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> bfa655ecea deps: migrate from httpx to httpx2 (pydantic's maintained fork) (#15192)
* deps: migrate from httpx to httpx2 (pydantic's maintained fork)

Mechanical rename of httpx -> httpx2 (API-compatible fork of httpx 0.28.1):
pyproject.toml deps, PEP 723 inline-script headers, and all import/call sites.
Excludes uv.lock (the keeper's allow-list rejects .lock files); the lock
refresh needs a separate maintainer-merged PR.

Refs #15081

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

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

* deps: drop tweepy + migrate remaining requests refs to httpx2

- maths/allocation_number.py: docstring example uses httpx2, not requests
- web_programming/get_imdbtop.py.DISABLED: import httpx2 instead of requests
- remove web_programming/get_user_tweets.py.DISABLED (a Twitter API how-to,
  not an algorithm) and drop the tweepy dependency that was its only user and
  the last high-level dep pulling in requests
- uv.lock intentionally untouched (keeper allow-list)

Refs #15081

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-09-05 09:26:45 +02:00
priya-sundaram-devChristian Clausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
7283543c16 fix(reddit): remove unreachable 429 check after raise_for_status() (#15177)
* fix(reddit): remove unreachable 429 check after raise_for_status()

* refactor(reddit): use fluent httpx.get().raise_for_status().json() chain

* Refactor age parameter to use Literal type

Updated the age parameter to use Literal for specific values.

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

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

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-09-04 06:21:30 +00:00
Christian ClaussLim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com>cclausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
a2fa32c7ad Lukazlim: Replace dependency requests with httpx (#12744)
* Replace dependency `requests` with `httpx`

Fixes #12742
Signed-off-by: Lim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com>

* updating DIRECTORY.md

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

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

---------

Signed-off-by: Lim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com>
Co-authored-by: Lim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-14 04:42:11 +03:00
Maxim Smolskiyandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 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
Tianyi Zhengandgithub-actions aaf7195465 Fix mypy error in web_programming/reddit.py (#9162)
* updating DIRECTORY.md

* updating DIRECTORY.md

* Fix mypy error in web_programming/reddit.py

web_programming/reddit.py:36: error: Missing named argument "response" for "HTTPError"  [call-arg]

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-01 16:10:33 +13:00
Christian ClaussDhruv Manilawalapre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
4b79d771cd Add more ruff rules (#8767)
* Add more ruff rules

* Add more ruff rules

* pre-commit: Update ruff v0.0.269 -> v0.0.270

* Apply suggestions from code review

* Fix doctest

* Fix doctest (ignore whitespace)

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

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

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-26 09:34:17 +02:00
Caeden Perelli-Harrisandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 61eedc16c3 Remove useless code in doctests (#7733)
* refactor: Fix matrix display deprecation

* refactor: Remove useless `print` and `pass` statements

* revert: Replace broken doctests

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

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

* revert: Fix failing doctests

* chore: Satisfy pre-commit

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-27 22:52:00 +02:00
Jaydeep DasandChristian Clauss b6eb448e63 Added reddit.py to get data from reddit (#5698)
* Rewritten reddit.py

* Removed logging module import

* Fixed minor bug which was causing extreme rate limiting

* Update reddit.py

* Update reddit.py

* Update reddit.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-11-04 16:36:22 +01:00