clips / clips/pattern

is_question is broken

Open
#130 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.9k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

The is_question and is_exclamation properties in tree.py are broken.
because self[-1] is an instance of Word, and str on Word returns the repr of it.
It should be return len(self) > 0 and self[-1].string == "?"

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 in tree.py at the is_question and is_exclamation properties, then inspect the Word object behavior described in the issue. Confirm both properties examine the Word.string value correctly, including the empty-tree case, and run the relevant project tests to verify the punctuation checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.