Giter Club home page Giter Club logo

Comments (5)

larsoner avatar larsoner commented on July 22, 2024

FYI right now I do codespell.py ... | tee /dev/tty | wc -l | xargs test 0 -eq to get it to print the result and give a meaningful error code.

from codespell.

lucasdemarchi avatar lucasdemarchi commented on July 22, 2024

yeah... we should return an error code. Anyone up to send a patch for this?

from codespell.

larsoner avatar larsoner commented on July 22, 2024

Sure :)

from codespell.

thorade avatar thorade commented on July 22, 2024

Sorry for commenting on an old issue: I would be interested in two examples, showing:

  • How to call codespell from python (script or notebook) and
  • How to ceck the return code from that script.

If you happen to have such an example it would be greatly appreciated, otherwise I would try how far I can get myself.

EDIT: This file was a good starting point for me:
https://github.com/codespell-project/codespell/blob/master/codespell_lib/tests/test_basic.py

from codespell.

larsoner avatar larsoner commented on July 22, 2024

All of the tests do this. Everything is routed through codespell_lib.main. Historically it has been designed as a command-line utility rather than with user-accessible Python functions in mind, so if you want to use Python functions with reasonable args / kwargs and so forth then it will probably require refactoring.

from codespell.

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.