Skip to content

Commit 046dea0

Browse files
authored
Merge pull request Unidata#1501 from glaziermag/fix/bench-diskless-mypy
Fix bench_diskless type checking with mypy 2
2 parents 6e67576 + 52a6a41 commit 046dea0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎examples/bench_diskless.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ def read_netcdf(ncfile):
5353
repr(sum(t.repeat(ntrials,1))/ntrials))
5454

5555
# test diskless=True in nc_open
56-
format: Literal["NETCDF3_CLASSIC"] = 'NETCDF3_CLASSIC' # mypy should know this but it needs help...
56+
fmt: Literal["NETCDF3_CLASSIC"] = 'NETCDF3_CLASSIC' # mypy should know this but it needs help...
5757
trials=50
58-
sys.stdout.write('test caching of file in memory on open for %s\n' % format)
59-
sys.stdout.write('testing file format %s ...\n' % format)
60-
write_netcdf('test1.nc',format=format,closeit=True)
58+
sys.stdout.write('test caching of file in memory on open for %s\n' % fmt)
59+
sys.stdout.write('testing file format %s ...\n' % fmt)
60+
write_netcdf('test1.nc',format=fmt,closeit=True)
6161
ncfile = netCDF4.Dataset('test1.nc',diskless=False)
6262
t = Timer("read_netcdf(ncfile)","from __main__ import read_netcdf,ncfile")
6363
sys.stdout.write('reading (from disk) took %s seconds\n' %

0 commit comments

Comments
 (0)