Giter Site home page Giter Site logo

justinchuby / lintrunner-adapters Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 2.0 243 KB

Adapters and tools for lintrunner

Home Page: https://pypi.org/project/lintrunner-adapters

License: Other

Python 100.00%
ci linting sarif lintrunner code-scanning clippy flake8 lint linter python ruff rustfmt formatter

lintrunner-adapters's Issues

Ruff has no options as `--format`

Hi,

I'm always getting error like

STDERR
    error: unexpected argument '--format' found

I'm using latest Ruff version 0.1.6. Seems they have removed --format option:

Ruff: An extremely fast Python linter.

Usage: ruff [OPTIONS] <COMMAND>

Commands:
  check    Run Ruff on the given files or directories (default)
  rule     Explain a rule (or all rules)
  config   List or describe the available configuration options
  linter   List all supported upstream linters
  clean    Clear any caches in the current directory and any subdirectories
  format   Run the Ruff formatter on the given files or directories
  version  Display Ruff's version
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Log levels:
  -v, --verbose  Enable verbose logging
  -q, --quiet    Print diagnostics, but nothing else
  -s, --silent   Disable all logging (but still exit with status code "1" upon detecting diagnostics)

For help with a specific command, see: `ruff help <command>`.

Can you please remove --format from
https://github.com/justinchuby/lintrunner-adapters/blob/main/lintrunner_adapters/adapters/ruff_linter.py#L89 ?

Thanks!

BLACK-ISORT linter fails on Windows when black==24.1.1 and Python==3.9

This linter processes the file with isort before sending the result to black as input to the subprocess.

In

proc = run_command(
[
sys.executable,
"-mblack",
*(("--pyi",) if filename.endswith(".pyi") else ()),
*(("--ipynb",) if filename.endswith(".ipynb") else ()),
*(("--fast",) if fast else ()),
"--stdin-filename",
filename,
"-",
],
stdin=None,
input=import_sorted,
retries=retries,
timeout=timeout,
check=True,
)
, the input argument was somehow not taken by black when black==24.1.1 on Windows, Python 3.8/Python 3.9.

Maybe consider pipeline the results instead and send it via stdin?

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.