From db1b1672b87438fdbee55113bb2f7dce0de04486 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 1 Feb 2023 14:39:50 -0500 Subject: [PATCH] fix: minor spacing typo in message for PTH123 (#2453) --- README.md | 2 +- src/rules/flake8_use_pathlib/violations.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 66be958ecc..639ddf2987 100644 --- a/README.md +++ b/README.md @@ -1266,7 +1266,7 @@ For more, see [flake8-use-pathlib](https://pypi.org/project/flake8-use-pathlib/) | PTH120 | pathlib-dirname | `os.path.dirname` should be replaced by `.parent` | | | PTH121 | pathlib-samefile | `os.path.samefile` should be replaced by `.samefile()` | | | PTH122 | pathlib-splitext | `os.path.splitext` should be replaced by `.suffix` | | -| PTH123 | pathlib-open | `open("foo")` should be replaced by`Path("foo").open()` | | +| PTH123 | pathlib-open | `open("foo")` should be replaced by `Path("foo").open()` | | | PTH124 | pathlib-py-path | `py.path` is in maintenance mode, use `pathlib` instead | | ### eradicate (ERA) diff --git a/src/rules/flake8_use_pathlib/violations.rs b/src/rules/flake8_use_pathlib/violations.rs index e4b4ad8017..79f0fc1a38 100644 --- a/src/rules/flake8_use_pathlib/violations.rs +++ b/src/rules/flake8_use_pathlib/violations.rs @@ -263,7 +263,7 @@ define_violation!( impl Violation for PathlibOpen { #[derive_message_formats] fn message(&self) -> String { - format!("`open(\"foo\")` should be replaced by`Path(\"foo\").open()`") + format!("`open(\"foo\")` should be replaced by `Path(\"foo\").open()`") } }