GithubHelp home page GithubHelp logo

Allow tabs in DocTestParser about sybil HOT 5 CLOSED

simplistix avatar simplistix commented on August 19, 2024
Allow tabs in DocTestParser

from sybil.

Comments (5)

cjw296 avatar cjw296 commented on August 19, 2024 1

43445d8 should resolve this, it'll be in a 2.0.1 release as soon as CI finishes running.

from sybil.

cjw296 avatar cjw296 commented on August 19, 2024

Can you share some examples of these non-Python blocks?
If they're not Python, how does doctest evaluate them?

from sybil.

jacksonllee avatar jacksonllee commented on August 19, 2024

Can you share some examples of these non-Python blocks?

Absolutely. I use the reStructuredText block to illustrate a text format that happens to use tabs. Here's an (actual) example (source):

To illustrate, let us consider the following CHAT utterance with its ``%mor``
tier::

    *XXA:	喂 遲 啲 去 唔 去 旅行 啊 ?
    %mor:	e|wai3 a|ci4 u|di1 v|heoi3 d|m4 v|heoi3 vn|leoi5hang4 y|aa3 ?

If they're not Python, how does doctest evaluate them?

I'm not sure -- I haven't dug into the internals of doctest / Sybil too much. For my use case. I'd want doctest / Sybil to simply ignore blocks like this, which the commit I referred to above would allow when allow_tabs=True in DocTestParser. Would there by any chance be a better way to accomplish this that I've missed?

from sybil.

cjw296 avatar cjw296 commented on August 19, 2024

Ah, so the problem is actually that doctest is spotting tabs in blocks it won't even match...

from sybil.

jacksonllee avatar jacksonllee commented on August 19, 2024

Thank you for the quick fix! I've just upgraded to Sybil 2.0.1 and my CI also passed as well. Thanks again!

from sybil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.