openzim / openzim/python-scraperlib

Calls to third party code not respecting type hints

Open
#228 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
31
Forks
27
Avg merge
3d 7h
Merged PRs (30d)
2

Description

Following #227, scraperlib users are not allowed to send values of unexpected types to our API.
We should apply the same strict treatment to our usage of other's APIs.

beartype allows setting this in our code and raising or warning on incorrect calls. Once we fix the codebase, we would keep it and it would serve as automated test for this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the scraperlib codebase for calls into third-party APIs and the type-hint enforcement described in #227. Use beartype to identify incorrect calls; done means the codebase passes this checking without unexpected argument types, while retaining the checks as automated tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.