mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:10:09 +00:00
Fix version number in playground (#5372)
## Summary
`v0.0.275` in the top-right was showing `v0.0.0` at all times.
## Test Plan

This commit is contained in:
parent
2fc38d81e6
commit
8a1bb7a5af
2 changed files with 3 additions and 3 deletions
|
@ -9,6 +9,8 @@ pub use ruff_python_ast::source_code::round_trip;
|
||||||
pub use rule_selector::RuleSelector;
|
pub use rule_selector::RuleSelector;
|
||||||
pub use rules::pycodestyle::rules::IOError;
|
pub use rules::pycodestyle::rules::IOError;
|
||||||
|
|
||||||
|
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
mod autofix;
|
mod autofix;
|
||||||
mod checkers;
|
mod checkers;
|
||||||
mod codes;
|
mod codes;
|
||||||
|
|
|
@ -21,8 +21,6 @@ use ruff::settings::{defaults, flags, Settings};
|
||||||
use ruff_diagnostics::Edit;
|
use ruff_diagnostics::Edit;
|
||||||
use ruff_python_ast::source_code::{Indexer, Locator, SourceLocation, Stylist};
|
use ruff_python_ast::source_code::{Indexer, Locator, SourceLocation, Stylist};
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
|
||||||
|
|
||||||
#[wasm_bindgen(typescript_custom_section)]
|
#[wasm_bindgen(typescript_custom_section)]
|
||||||
const TYPES: &'static str = r#"
|
const TYPES: &'static str = r#"
|
||||||
export interface Diagnostic {
|
export interface Diagnostic {
|
||||||
|
@ -87,7 +85,7 @@ pub fn run() {
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn currentVersion() -> JsValue {
|
pub fn currentVersion() -> JsValue {
|
||||||
JsValue::from(VERSION)
|
JsValue::from(ruff::VERSION)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue