Skip to content

Commit

Permalink
Apply taplo to the repository (pantsbuild#18998)
Browse files Browse the repository at this point in the history
Per the suggestion from @thejcannon, I've turned the taplo formatter
onto pants itself 😄 Happy to take suggestions for formatting
standards, if anyone wants to bikeshed.

---------

Co-authored-by: Andreas Stenius <[email protected]>
Co-authored-by: Joshua Cannon <[email protected]>
  • Loading branch information
3 people authored Jun 8, 2023
1 parent 4d8508b commit e0ef5b8
Show file tree
Hide file tree
Showing 40 changed files with 81 additions and 78 deletions.
2 changes: 2 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[formatting]
column_width = 100
7 changes: 3 additions & 4 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ backend_packages.add = [
"pants.backend.experimental.tools.workunit_logger",
"pants.backend.experimental.visibility",
"pants.backend.tools.preamble",
"pants.backend.tools.taplo",
"pants.explorer.server",
"internal_plugins.releases",
"internal_plugins.test_lockfile_fixtures",
]
plugins = [
"hdrhistogram", # For use with `--stats-log`.
"hdrhistogram", # For use with `--stats-log`.
]

# The invalidation globs cover the PYTHONPATH by default, but we exclude some files that are on the
Expand Down Expand Up @@ -116,9 +117,7 @@ build_file_header = """\
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""
ignore_paths = [
"build-support/migration-support/BUILD",
]
ignore_paths = ["build-support/migration-support/BUILD"]
ignore_adding_targets = [
"src/python/pants:__main__",
"src/python/pants/backend/docker/subsystems:dockerfile_wrapper_script",
Expand Down
28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ show_traceback = true

[[tool.mypy.overrides]]
module = [
"botocore",
"bs4",
"chevron",
"colors",
"dockerfile",
"fasteners",
"freezegun",
"gnupg",
"hdrh",
"hdrh.histogram",
"ijson.*",
"nodesemver",
"pex.*",
"psutil",
"botocore",
"bs4",
"chevron",
"colors",
"dockerfile",
"fasteners",
"freezegun",
"gnupg",
"hdrh",
"hdrh.histogram",
"ijson.*",
"nodesemver",
"pex.*",
"psutil",
]
ignore_missing_imports = true
13 changes: 8 additions & 5 deletions src/rust/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "engine"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

# NOTE: See `src/rust/engine/.cargo/config` for `--cfg` flags enabled for these crates.
Expand Down Expand Up @@ -60,7 +60,7 @@ members = [
"tryfuture",
"ui",
"watch",
"workunit_store"
"workunit_store",
]

# These are the packages which are built/tested when no special selector flags are passed to cargo.
Expand Down Expand Up @@ -104,7 +104,7 @@ default-members = [
"tryfuture",
"ui",
"watch",
"workunit_store"
"workunit_store",
]

[lib]
Expand All @@ -129,7 +129,10 @@ cache = { path = "cache" }
concrete_time = { path = "concrete_time" }
crossbeam-channel = "0.5"
# TODO: Waiting on https://github.com/Aeledfyr/deepsize/pull/{30,31,32}.
deepsize = { git = "https://github.com/stuhood/deepsize.git", rev = "5c8bee5443fcafe4aaa9274490d354412d0955c1", features=["internment", "smallvec"] }
deepsize = { git = "https://github.com/stuhood/deepsize.git", rev = "5c8bee5443fcafe4aaa9274490d354412d0955c1", features = [
"internment",
"smallvec",
] }
dep_inference = { path = "dep_inference" }
derivative = "2.2"
async-oncecell = "0.2"
Expand Down Expand Up @@ -159,7 +162,7 @@ rand = "0.8"
regex = "1"
reqwest = { version = "0.11", default_features = false, features = ["stream", "rustls-tls"] }
rule_graph = { path = "rule_graph" }
smallvec = { version = "1", features=["union"] }
smallvec = { version = "1", features = ["union"] }
stdio = { path = "stdio" }
store = { path = "fs/store" }
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/address/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "address"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/async_latch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "async_latch"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/async_value/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "async_value"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
name = "cache"
version = "0.0.1"
edition = "2021"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
bytes = "1.2"
grpc_util = { path = "../grpc_util" }
hashing = { path = "../hashing" }
protos = { path = "../protos" }
sharded_lmdb = { path = "../sharded_lmdb" }
sharded_lmdb = { path = "../sharded_lmdb" }
task_executor = { path = "../task_executor" }
2 changes: 1 addition & 1 deletion src/rust/engine/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "client"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[[bin]]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/dep_inference/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "dep_inference"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "fs"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/fs/brfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "brfs"
version = "0.0.1"
edition = "2021"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/fs/fs_util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "fs_util"
version = "0.0.1"
edition = "2021"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/fs/store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tonic = { version = "0.6", features = ["transport", "codegen", "tls", "tls-roots
tower-service = "0.3"
tryfuture = { path = "../../tryfuture" }
uuid = { version = "1.1.2", features = ["v4"] }
workunit_store = {path = "../../workunit_store" }
workunit_store = { path = "../../workunit_store" }

[dev-dependencies]
criterion = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "graph"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/grpc_util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "grpc_util"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/hashing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "hashing"
version = "0.0.1"
edition = "2021"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "logging"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/nailgun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "nailgun"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/options/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "options"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
6 changes: 4 additions & 2 deletions src/rust/engine/process_execution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "process_execution"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand All @@ -16,7 +16,9 @@ bytes = "1.2"
cache = { path = "../cache" }
derivative = "2.2"
# TODO: Waiting on https://github.com/Aeledfyr/deepsize/pull/{30,31,32}.
deepsize = { git = "https://github.com/stuhood/deepsize.git", rev = "5c8bee5443fcafe4aaa9274490d354412d0955c1", features=["log"] }
deepsize = { git = "https://github.com/stuhood/deepsize.git", rev = "5c8bee5443fcafe4aaa9274490d354412d0955c1", features = [
"log",
] }
grpc_util = { path = "../grpc_util" }
fs = { path = "../fs" }
futures = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/process_execution/docker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "docker"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/process_execution/pe_nailgun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "pe_nailgun"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/process_execution/remote/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "remote"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions src/rust/engine/process_executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "process_executor"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand All @@ -21,5 +21,5 @@ shlex = "1.1.0"
store = { path = "../fs/store" }
task_executor = { path = "../task_executor" }
tokio = { version = "1.28", features = ["rt-multi-thread", "macros"] }
workunit_store = { path = "../workunit_store"}
remote = { path = "../process_execution/remote"}
workunit_store = { path = "../workunit_store" }
remote = { path = "../process_execution/remote" }
2 changes: 1 addition & 1 deletion src/rust/engine/protos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "protos"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
9 changes: 6 additions & 3 deletions src/rust/engine/rule_graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
version = "0.0.1"
edition = "2021"
name = "rule_graph"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
# TODO: Waiting on https://github.com/Aeledfyr/deepsize/pull/{30,31,32}.
deepsize = { git = "https://github.com/stuhood/deepsize.git", rev = "5c8bee5443fcafe4aaa9274490d354412d0955c1", features=["internment", "smallvec"] }
deepsize = { git = "https://github.com/stuhood/deepsize.git", rev = "5c8bee5443fcafe4aaa9274490d354412d0955c1", features = [
"internment",
"smallvec",
] }
fnv = "1.0.5"
indexmap = "1.9"
internment = "0.6"
log = "0.4"
petgraph = "0.6"
smallvec = { version = "1", features=["union"] }
smallvec = { version = "1", features = ["union"] }

[dev-dependencies]
env_logger = "0.10.0"
2 changes: 1 addition & 1 deletion src/rust/engine/sharded_lmdb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sharded_lmdb"
version = "0.0.1"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/stdio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "stdio"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/task_executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.1"
edition = "2021"
name = "task_executor"
authors = [ "Pants Build <[email protected]>" ]
authors = ["Pants Build <[email protected]>"]
publish = false

[dependencies]
Expand Down
Loading

0 comments on commit e0ef5b8

Please sign in to comment.