Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyrefly/lib/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ pub mod init;
#[cfg(not(target_arch = "wasm32"))]
pub mod lsp;
#[cfg(not(target_arch = "wasm32"))]
pub mod query;
#[cfg(not(target_arch = "wasm32"))]
pub mod stubgen;
#[cfg(not(target_arch = "wasm32"))]
pub mod suppress;
Expand Down
5 changes: 5 additions & 0 deletions pyrefly/lib/commands/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use crate::commands::dump_config::DumpConfigArgs;
use crate::commands::infer::InferArgs;
use crate::commands::init::InitArgs;
use crate::commands::lsp::LspArgs;
use crate::commands::query::QueryArgs;
use crate::commands::stubgen::StubgenArgs;
use crate::commands::suppress::SuppressArgs;
use crate::commands::tsp::TspArgs;
Expand Down Expand Up @@ -55,6 +56,9 @@ pub enum Command {
/// Start an LSP server
Lsp(LspArgs),

/// Query semantic information and print the result as JSON
Query(QueryArgs),

/// Start a TSP server
Tsp(TspArgs),
/// Automatically add type annotations to a file or directory.
Expand Down Expand Up @@ -102,6 +106,7 @@ impl Command {
)?,
None,
)),
Command::Query(args) => Ok((args.run(config_configurer_wrapper, thread_count)?, None)),
Command::Tsp(args) => Ok((
args.run(
telemetry,
Expand Down
Loading
Loading