Skip to content

Commit

Permalink
chore: pre-commit autoupdate (#5169)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Mar 3, 2025
1 parent e393ab4 commit ebfd6c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ repos:
# rustfmt handles rust files, and in some snapshots we expect trailing spaces.
exclude: '.*\.(rs|snap)$'
- repo: https://github.com/crate-ci/typos
rev: v1.29.9
rev: v1.30.0
hooks:
- id: typos
# https://github.com/crate-ci/typos/issues/347
pass_filenames: false
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.5.2
rev: v3.5.3
hooks:
- id: prettier
additional_dependencies:
Expand All @@ -25,7 +25,7 @@ repos:
# https://github.com/PRQL/prql/issues/3078
- prettier-plugin-go-template
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.7
rev: v0.9.9
hooks:
- id: ruff
args: [--fix]
Expand Down
4 changes: 2 additions & 2 deletions prqlc/prqlc/src/codegen/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,13 @@ impl WriteSource for pr::Stmt {
}
pr::StmtKind::VarDef(var_def) => match var_def.kind {
_ if var_def.value.is_none() || var_def.ty.is_some() => {
let typ = if let Some(ty) = &var_def.ty {
let typo = if let Some(ty) = &var_def.ty {
format!("<{}> ", ty.write(opt.clone())?)
} else {
"".to_string()
};

r += opt.consume(&format!("let {} {}", var_def.name, typ))?;
r += opt.consume(&format!("let {} {}", var_def.name, typo))?;

if let Some(val) = &var_def.value {
r += opt.consume("= ")?;
Expand Down
12 changes: 6 additions & 6 deletions web/playground/src/output/Output.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,24 @@ class Output extends React.Component {
});

const converters = arrow.schema.fields.map((f) => {
const typ = f.type.toString();
if (typ.startsWith("Timestamp")) {
const typo = f.type.toString();
if (typo.startsWith("Timestamp")) {
// TODO: handle timezone (which Date does not support)

// HACK: due to bug in arrow or duckdb, we are getting MICROSECOND here,
// but the values are actually milliseconds. I'm not sure what is going on,
// so let's just assume the values will always be in milliseconds.
/*
if (typ.endsWith("<SECOND>")) {
if (typo.endsWith("<SECOND>")) {
return (x) => new Date(x * 1000).toISOString();
}
if (typ.endsWith("<MILLISECOND>")) {
if (typo.endsWith("<MILLISECOND>")) {
return (x) => new Date(x).toISOString();
}
if (typ.endsWith("<MICROSECOND>")) {
if (typo.endsWith("<MICROSECOND>")) {
return (x) => new Date(x / 1000).toISOString();
}
if (typ.endsWith("<NANOSECOND>")) {
if (typo.endsWith("<NANOSECOND>")) {
return (x) => new Date(x / 1000000).toISOString();
}
*/
Expand Down

0 comments on commit ebfd6c6

Please sign in to comment.