Skip to content

Commit 52645bf

Browse files
committed
typ: Upgrade pyright and resolve failures
1 parent a3a551d commit 52645bf

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ build: dist
112112
install: clean
113113
$(PIP) install ".[extra]"
114114

115+
sync:
116+
uv sync --all-extras
117+
115118
doc-dependencies:
116119
$(PIP) install -e ".[doc]"
117120
$(PIP) install -r requirements/doc.txt

plotnine/geoms/geom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ def __deepcopy__(self, memo: dict[Any, Any]) -> geom:
166166
shallow = {"data", "_kwargs", "environment"}
167167
for key, item in old.items():
168168
if key in shallow:
169-
new[key] = item
169+
new[key] = item # pyright: ignore[reportIndexIssue]
170170
memo[id(new[key])] = new[key]
171171
else:
172-
new[key] = deepcopy(item, memo)
172+
new[key] = deepcopy(item, memo) # pyright: ignore[reportIndexIssue]
173173

174174
return result
175175

plotnine/stats/stat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ def __deepcopy__(self, memo: dict[Any, Any]) -> stat:
144144
shallow = {"_kwargs"}
145145
for key, item in old.items():
146146
if key in shallow:
147-
new[key] = item
147+
new[key] = item # pyright: ignore[reportIndexIssue]
148148
memo[id(new[key])] = new[key]
149149
else:
150-
new[key] = deepcopy(item, memo)
150+
new[key] = deepcopy(item, memo) # pyright: ignore[reportIndexIssue]
151151

152152
return result
153153

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ dev = [
8181
]
8282

8383
typing = [
84-
"pyright==1.1.404",
84+
"pyright==1.1.408",
8585
"ipython",
8686
"pandas-stubs",
8787
]

0 commit comments

Comments
 (0)