forked from NVDARemote/remote-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Update to follow our code standards more closely #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
8c671cb
Added editorconfig based on that in nvaccess/nvda
SaschaCowley 962a234
lf instead of crlf
SaschaCowley 497f668
Add initial ruff configuration, based on that of NVDA
SaschaCowley a4f79e9
remove explicit inheritance from `object`
SaschaCowley bb59a9e
Initial run ov monkeytype over the code base
SaschaCowley 253d607
Remove inheritance from object
SaschaCowley b60378e
Fix a couple of type annotations
SaschaCowley 4748695
Rename and improve ruff.toml
SaschaCowley 431c23f
Fix up type annotations by removing Optional, Union, Dict, List etc
SaschaCowley d46f773
Read certificates as binary
SaschaCowley 26267e1
Move type hints into server.py
SaschaCowley e8c7cd1
Fix logging
SaschaCowley f2c7b5e
Fix ambiguous name
SaschaCowley 03a618a
Fix some typing issues
SaschaCowley 0104e77
Docstrings for channel
SaschaCowley 217d049
Docstrings for Handler
SaschaCowley b046099
Docstrings for User
SaschaCowley 856be45
Docstrings for ServerState
SaschaCowley 3d479d5
Add some comments
SaschaCowley 65c52b3
Enable pyright, with all failing tests disabled
SaschaCowley 780ca10
Fix reportDeprecated
SaschaCowley b18c973
Fix unannotated functions
SaschaCowley 2711ecf
Resolved several type issues
SaschaCowley d851607
Move to pyproject.toml for ruff config
SaschaCowley 282581a
Remove no longer needed type stubs
SaschaCowley 2418759
Update pre-commit config for CI
SaschaCowley 96f3da9
Pre-commit updates
SaschaCowley 8e191e9
Remove pyrightCI and remove pyrightLocal alias
SaschaCowley f854857
Experimental pyright GHA
SaschaCowley 3543a3f
Try using uvx to run pyright
SaschaCowley 521dc54
Update deps
SaschaCowley ba433e4
Try running with uv run
SaschaCowley e807136
Sync environment then use uvx
SaschaCowley 418bfc2
Include dev
SaschaCowley 8680525
Use uv run
SaschaCowley 21f0a79
Apply suggestions from code review
SaschaCowley 1f36a0d
Update .github/workflows/pyright.yml
SaschaCowley 0e4f425
Fix pyright error in server.py
SaschaCowley 5bb8dd5
Fix typ annotations on test.TestGenerateKey._test
SaschaCowley 650df67
Silence pyright errors caused by incorrect types in ttwisted/Zope int…
SaschaCowley 1882501
Bring coverage back up to 100%
SaschaCowley d810bb6
camelCase variables, methods and attributes in server.Channel
SaschaCowley b448bbc
camelCase attributes, methods and variables in server.Handler
SaschaCowley 993cb65
camelCase attributes, methods and variables in server.User
SaschaCowley 2d90454
camelCase attributes, methods and variables in server.RemoteServerFac…
SaschaCowley 26288ab
camelCase attributes, methods and variables in server.ServerState
SaschaCowley 6012376
Fix some straggling snake_case
SaschaCowley b6810ce
Minor sweeks
SaschaCowley 3ef7d0e
Try using a composite setup action for coverage
SaschaCowley 2f51125
Add default shell to actions/setup-environment
SaschaCowley 6a20da4
run -> runs
SaschaCowley 7d1ec7a
Move shell to steps with runs
SaschaCowley 2150f69
Use setup-environment with pyright ci
SaschaCowley 1d8fae1
Add pyright output to GHA summary
SaschaCowley ba78907
Test restricting perms
SaschaCowley 201c518
Test restricting perms
SaschaCowley 6d37a55
Restrict perms of pyright action
SaschaCowley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.py] | ||
charset = utf-8 | ||
indent_style = tab | ||
tab_width = 4 | ||
trim_trailing_whitespace = true | ||
max_line_length = 110 | ||
|
||
[*.{yml,yaml}] | ||
indent_style = space | ||
charset = utf-8 | ||
indent_size = 2 | ||
trim_trailing_whitespace = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: 'Setup CI Environment' | ||
description: 'Setup the environment in which CI scripts for the NVDA Remote Access server can be run' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install the latest version of uv | ||
uses: astral-sh/[email protected] | ||
- name: Setup environment | ||
shell: bash | ||
run: uv sync --dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,10 @@ jobs: | |
coverage: | ||
name: Check coverage with coverage.py | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
permissions: {} | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Install the latest version of uv | ||
uses: astral-sh/[email protected] | ||
- name: Setup environment | ||
run: uv sync --dev | ||
- uses: ./.github/actions/setup-environment | ||
- name: Run unit tests | ||
run: uv run coverage run | ||
- name: Report coverage | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Check types with Pyright | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
pyright: | ||
name: Check types with pyright | ||
runs-on: ubuntu-latest | ||
permissions: {} | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/setup-environment | ||
- name: Run pyright | ||
run: uv run pyright >> $GITHUB_STEP_SUMMARY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.