8000 Merge pull request #19818 from sistaseetaram/related-to-#19077 · numpy/numpy@11420ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 11420ae

Browse files
authored
Merge pull request #19818 from sistaseetaram/related-to-#19077
MAINT: fix unhashable instance and potential exception identified by LGTM.
2 parents 516355f + e4c5890 commit 11420ae

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

numpy/array_api/_typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
Device = Any
3939
Dtype = Type[
40-
Union[[int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64]]
40+
Union[int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64]
4141
]
4242
SupportsDLPack = Any
4343
SupportsBufferProtocol = Any

numpy/linalg/lapack_lite/clapack_scrub.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,5 @@ def scrubSource(source, nsteps=None, verbose=False):
299299

300300
source = scrub_source(source, nsteps, verbose=True)
301301

302-
writefo = open(outfilename, 'w')
303-
writefo.write(source)
304-
writefo.close()
302+
with open(outfilename, 'w') as writefo:
303+
writefo.write(source)

0 commit comments

Comments
 (0)
0