Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

split_held_out_encoding has an unreachable branch and an untested empty-suffix error

Open Beginner friendly
#961 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
79/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data, testing

Research direction

Read faircode/proxy.py around split_held_out_encoding() and the related tests in tests/test_proxy.py. Add coverage for an empty encoding suffix, an unknown codec, an @ in the path, and missing join key columns in either file; remove the unreachable branch. Run the focused proxy tests and confirm these cases pass.

Written by the indexing model from the issue text.

Description

enhancement good first issue

Where: faircode/proxy.py split_held_out_encoding() (#914), tests/test_proxy.py.

Current gap: the function does value, marker, encoding = rest.rpartition("@") only after "@" in rest, so marker is always "@" and the if not marker: branch can never run (line 204). The "expected @ENCODING" error for a trailing @ (line 206) has no test either.

Repro:

$ python3 -m pytest tests -q -m "not slow" --cov=faircode.proxy --cov-report=term-missing | grep proxy.py
faircode/proxy.py ... 204, 206, 370, 376
>>> split_held_out_encoding("h.csv=race@")
ValueError: invalid held-out encoding in 'h.csv=race@': expected @ENCODING     # works, but no test

Suggested approach: delete the dead branch, add tests for the empty suffix, an unknown codec and an @ inside the path, and cover the two other uncovered raises (lines 370, 376: a missing join key column in either file).

Dominant language
HTML
Stars
47
Forks
45
Avg merge
3h 1m
Merged PRs (30d)
53

Getting set up

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.

More from yakew7/Fair-Code

All issues in yakew7/Fair-Code

Similar issues

More Data Engineering issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.