Hi, Iām Jordan. Iām a systems engineer. I build Linux distributions and Linux distribution accessories.
jordemort / action-pyright Goto Github PK
View Code? Open in Web Editor NEWA GitHub Action to run pyright
License: MIT License
A GitHub Action to run pyright
License: MIT License
Hi, Iām Jordan. Iām a systems engineer. I build Linux distributions and Linux distribution accessories.
The action runs npm install pyright
here (or similar when specific pyright version is specified). This means all node dependencies are installed as well if package.json
exists in the repo as well. I don't think it's necessary and it slows down the check significantly.
It might be better to use npx
/npm exec
to install and run directly in one command.
It'd be nice to have some unit tests for pyright_to_rdjson.py
The action produces error comments even when level: warning
is set:
- name: pyright
uses: jordemort/action-pyright@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
level: warning
filter_mode: diff_context
lib: true
It would be great if the highest error level is reduced to the level specified in the action config.
Hello!
I'm not even sure where to begin with this bug report.
I believe I have either misunderstood how to set up this action, or it will not catch obvious errors.
I noticed it during this run, where the Type Coverage
step passed successfully, however there were numerous type errors relating to return type were completely missed.
My action specification at the time looked like this, which should have inherited from the pyproject.toml
file outlined here.
I have managed to manually install node, and run pyright in an actual to verify that it will actually return these results, this can be viewed here in the "Run Pyright" step.
Could you please let me know if this is an issue with you, or me? I very much like and appreciate the features you offer.
Hi, I was hoping to test out this action, but there seems to be an issue in pyright_to_rdjson.py
regarding a KeyError. I'm guessing the output format from pyright
has changed slightly?
I may find the time in the next week or so to look into it, but if you already know how to solve it, some help/input would be appreciated!
Example stacktrace:
Searching for source files
Found 10 source files
Traceback (most recent call last):
File "/home/runner/work/_actions/jordemort/action-pyright/v1/pyright_to_rdjson.py", line 44, in <module>
print(pyright_to_rdjson(sys.stdin))
File "/home/runner/work/_actions/jordemort/action-pyright/v1/pyright_to_rdjson.py", line 22, in pyright_to_rdjson
"message": f"{d['message']} ({d['rule']})",
KeyError: 'rule'
reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token
Setup this action using a default config of:
- uses: jordemort/action-pyright@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # You need this
reporter: github-pr-review
This gives me this output when running the action:
Traceback (most recent call last):
File "/home/runner/work/_actions/jordemort/action-pyright/v1/pyright_to_rdjson.py", line 52, in <module>
print(pyright_to_rdjson(sys.stdin))
BrokenPipeError: [Errno 32] Broken pipe
Error: Process completed with exit code 1.
Do you have any clue as to what could be going on here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.