Skip to content

Commit 96a7d1d

Browse files
Fix the typing of all PosixPath in tests/config/test_config.py
1 parent 106ac13 commit 96a7d1d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/config/test_config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pylint: disable=missing-module-docstring, missing-function-docstring, protected-access
22
import os
33
import unittest.mock
4-
from pathlib import Path, PosixPath
4+
from pathlib import Path
55
from typing import Union
66

77
import pylint.lint
@@ -34,7 +34,7 @@ def check_configuration_file_reader(config_file: Union[str, Path]) -> Run:
3434
return runner
3535

3636

37-
def test_can_read_ini(tmp_path: PosixPath) -> None:
37+
def test_can_read_ini(tmp_path: Path) -> None:
3838
# Check that we can read the "regular" INI .pylintrc file
3939
config_file = tmp_path / ".pylintrc"
4040
config_file.write_text(
@@ -48,7 +48,7 @@ def test_can_read_ini(tmp_path: PosixPath) -> None:
4848
check_configuration_file_reader(config_file)
4949

5050

51-
def test_can_read_setup_cfg(tmp_path: PosixPath) -> None:
51+
def test_can_read_setup_cfg(tmp_path: Path) -> None:
5252
# Check that we can read a setup.cfg (which is an INI file where
5353
# section names are prefixed with "pylint."
5454
config_file = tmp_path / "setup.cfg"
@@ -63,7 +63,7 @@ def test_can_read_setup_cfg(tmp_path: PosixPath) -> None:
6363
check_configuration_file_reader(config_file)
6464

6565

66-
def test_can_read_toml(tmp_path: PosixPath) -> None:
66+
def test_can_read_toml(tmp_path: Path) -> None:
6767
# Check that we can read a TOML file where lists and integers are
6868
# expressed as strings.
6969
config_file = tmp_path / "pyproject.toml"
@@ -78,7 +78,7 @@ def test_can_read_toml(tmp_path: PosixPath) -> None:
7878
check_configuration_file_reader(config_file)
7979

8080

81-
def test_can_read_toml_rich_types(tmp_path: PosixPath) -> None:
81+
def test_can_read_toml_rich_types(tmp_path: Path) -> None:
8282
# Check that we can read a TOML file where lists, integers and
8383
# booleans are expressed as such (and not as strings), using TOML
8484
# type system.
@@ -97,7 +97,7 @@ def test_can_read_toml_rich_types(tmp_path: PosixPath) -> None:
9797
check_configuration_file_reader(config_file)
9898

9999

100-
def test_can_read_toml_env_variable(tmp_path: PosixPath) -> None:
100+
def test_can_read_toml_env_variable(tmp_path: Path) -> None:
101101
"""We can read and open a properly formatted toml file."""
102102
config_file = tmp_path / "pyproject.toml"
103103
config_file.write_text(

0 commit comments

Comments
 (0)