Coder Social home page Coder Social logo

Comments (8)

ofek avatar ofek commented on August 27, 2024

just like other scripts: hatch fmt -- arg1 arg2

from hatch.

peakschris avatar peakschris commented on August 27, 2024

-- doesn't seem to be working on windows, at least:

>hatch fmt -- --format gitlab
cmd [1] | ruff check --fix --format gitlab
error: unexpected argument '--format' found

  tip: to pass '--format' as a value, use '-- --format'

from hatch.

peakschris avatar peakschris commented on August 27, 2024

I'm also seeing the same on linux

from hatch.

ofek avatar ofek commented on August 27, 2024

This is what's happening under the hood which you can entirely customize.

So either modify the scripts or in CI make it to steps, one for the linter and one for the formatter e.g.: hatch fmt -f -- --format gitlab

from hatch.

peakschris avatar peakschris commented on August 27, 2024

Ok, I'll look into customizing the fmt command, thanks.

I'm also having the same -- issue with hatch run. After defining an env named 'check', hatch run isn't passing arguments through. Note, ruff here is not defined as a script in pyproject.toml script, it is the actual ruff command that is being invoked.

[tool.hatch.envs.check]
extra-dependencies = ["ruff", "pyright"]
>hatch run check:ruff -- check . --format=gitlab
error: unexpected argument '--format' found

  tip: to pass '--format' as a value, use '-- --format'

from hatch.

ofek avatar ofek commented on August 27, 2024

the check command appears to have no such option, argument passing is working properly

from hatch.

peakschris avatar peakschris commented on August 27, 2024

Apologies, my error. I was confused by the error message.

from hatch.

ofek avatar ofek commented on August 27, 2024

no worries!

from hatch.

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.