fix: minor spacing typo in message for PTH123 (#2453)

This commit is contained in:
Henry Schreiner
2023-02-01 14:39:50 -05:00
committed by GitHub
parent 6861e59103
commit db1b1672b8
2 changed files with 2 additions and 2 deletions

View File

@@ -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)

View File

@@ -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()`")
}
}