Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ rules.possibly-missing-attribute = "ignore"
ignore = [ "src/usethis/_version.py" ]
failOnWarnings = true
reportAny = false
reportArgumentType = false
reportAssignmentType = false
reportAttributeAccessIssue = false
reportCallInDefaultInitializer = false
Expand Down
2 changes: 1 addition & 1 deletion src/usethis/_file/toml/io_.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def _set_value_in_existing(
for key in reversed(unshared_keys[1:]):
contents = {key: contents}

shared_container[keys[1]] = contents # type: ignore[reportAssignmentType]
shared_container[keys[1]] = contents # pyright: ignore[reportArgumentType]
else:
shared_container[_get_unified_key(unshared_keys)] = value

Expand Down
21 changes: 0 additions & 21 deletions tests/usethis/_file/ini/test_ini_io_.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
INIStructureError,
INIValueAlreadySetError,
INIValueMissingError,
InvalidINITypeError,
UnexpectedINIIOError,
UnexpectedINIOpenError,
)
Expand Down Expand Up @@ -1471,26 +1470,6 @@ def relative_path(self) -> Path:
"""
)

def test_wrong_list_type_raises(self, tmp_path: Path):
# Arrange
class MyINIFileManager(INIFileManager):
@property
def relative_path(self) -> Path:
return Path("valid.ini")

valid_file = tmp_path / "valid.ini"
valid_file.touch()

# Act, Assert
with (
change_cwd(tmp_path),
MyINIFileManager() as manager,
pytest.raises(
InvalidINITypeError, match="INI files only support strings"
),
):
manager.extend_list(keys=["section", "key"], values=[123]) # type: ignore

class TestRemoveFromList:
def test_singleton_list_collapsed(self, tmp_path: Path):
# Arrange
Expand Down
7 changes: 0 additions & 7 deletions tests/usethis/_integrations/pre_commit/test_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,3 @@ def test_placeholder(self, tmp_path: Path):
),
reference={},
)

def test_invalid(self):
with pytest.raises(TypeError):
_pre_commit_fancy_dump(
config=2, # type: ignore for test
reference={},
)