Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo committed Jun 4, 2024
1 parent f3b7585 commit 8238bfd
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 13 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ For code changes, see [`CHANGELOG_CODE.md`][_-1].

## [Unreleased]

<i>This section is currently empty.</i>
### Changed

* Errors are now detected and handled in a more user-friendly way,
with notifications and proper actions.
Previously, they would only be logged in the IDE's log file.


## [0.4.0] - 2024-05-27
Expand Down
20 changes: 14 additions & 6 deletions CHANGELOG_CODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,26 @@ For user-facing changes, see [`CHANGELOG.md`][_-1].

### Added

* [Documentation for LSP-specific settings][50-1] is added.
(34b7c498)
* [`logging.md`][50-2] is added. (7d02d73b)
* [The documentation][50-1] is updated.
* [`logging.md`][50-2] is added.

(34b7c498, 7d02d73b, HEAD)

* Global option "Process timeout" is added. (f3b7585f)

### Changed

* [`PyrightRunner` and related classes][50-3] are rewritten. (f3b7585f)

### Fixed

* [`SuppressQuickFix`][50-3] names are now stored as messages. (HEAD)
* [`SuppressQuickFix`][50-4] names are now stored as messages. (e2d9ca2b)


[50-1]: https://github.com/InSyncWithFoo/pyright-for-pycharm/blob/34b7c498/docs/configurations/lsp.md
[50-1]: https://github.com/InSyncWithFoo/pyright-for-pycharm/blob/HEAD/docs
[50-2]: https://github.com/InSyncWithFoo/pyright-for-pycharm/blob/7d02d73b/docs/logging.md
[50-3]: https://github.com/InSyncWithFoo/pyright-for-pycharm/blob/HEAD/src/main/kotlin/com/insyncwithfoo/pyright/annotations/SuppressQuickFix.kt
[50-3]: https://github.com/InSyncWithFoo/pyright-for-pycharm/blob/f3b7585f/src/main/kotlin/com/insyncwithfoo/pyright/runner
[50-4]: https://github.com/InSyncWithFoo/pyright-for-pycharm/blob/e2d9ca2b/src/main/kotlin/com/insyncwithfoo/pyright/annotations/SuppressQuickFix.kt


## [0.4.0] - 2024-05-27
Expand Down
15 changes: 15 additions & 0 deletions docs/configurations/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ If the path retrieved using the aforementioned strategy is not specified,
the project directory is used.


## Process timeout

Modify this option to set a maximum limit (in milliseconds)
each process should take before it is forcibly destroyed.

A value of <i>-1</i> disables the timeout.

Default: <i>10 seconds</i>.

!!! warning

If there is no time limit, the process might run indefinitely,
leading to undesired CPU and RAM usage.


## Minimum severity level

Modify this option to set a minimum threshold that
Expand Down
2 changes: 1 addition & 1 deletion docs/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Command entry format:
executable: ExecutablePath
target: CurrentFilePath
projectPath: ProjectPath
extraArguments: tuple[
extraArguments: tuple[ # There might be other options.
Literal['--outputjson'],
Literal['--project'], ConfigurationFilePath,
Literal['--pythonpath'], InterpreterPath
Expand Down
22 changes: 22 additions & 0 deletions docs/problems.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,25 @@ If the executable is something you come up with,
check the source code for expected options.


## Cannot parse output

This most likely mean that there is an error while running the executable,
which causes the output to be invalid as JSON and thus cannot be parsed.
It could also mean that the output is valid JSON,
but does not follow [the officially documented schemas][9].

Update Pyright to the latest version may help.
For custom executables, maintain compatibility with said version.


## Process timed out

This means the process did not finish within [the limit defined][10].

There are [multiple possible reasons][11] for this.
Increase the limit as necessary.


[1]: configurations/cli.md#configuration-file
[2]: faq.md#why-does-cli-have-to-perform-saves-so-often
[3]: how-to.md#how-to-restart-the-language-server
Expand All @@ -71,3 +90,6 @@ check the source code for expected options.
[6]: https://github.com/microsoft/pyright/issues
[7]: https://www.npmjs.com/package/pyright
[8]: https://pypi.org/project/pyright/
[9]: https://microsoft.github.io/pyright/#/command-line?id=json-output
[10]: configurations/cli.md#process-timeout
[11]: faq.md#why-does-cli-take-so-long-to-run-on-my-project
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private fun Project.changePyrightConfigurations(action: ProjectConfigurations.()
val configurationService = ConfigurationService.getInstance(this)
val projectConfigurations = configurationService.projectService.state

projectConfigurations.action()
action(projectConfigurations)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ internal fun Configurable.configurationPanel(state: Configurations) = panel {
prefilledWithRandomPlaceholder()
bindText(state::projectConfigurationFile)

component.emptyText.text = when (project.path) {
null -> message("configurations.projectConfigurationFile.placeholder")
else -> project.path.toString()
}
component.emptyText.text =
project.path?.toString() ?: message("configurations.projectConfigurationFile.placeholder")
}
}

Expand Down

0 comments on commit 8238bfd

Please sign in to comment.