Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mattias Jakobsson
pupygrib
Commits
7a08f163
Commit
7a08f163
authored
Dec 02, 2016
by
Mattias Jakobsson
Browse files
Fixed a pep8 warning in the binary module
parent
db676d97
Changes
1
Hide whitespace changes
Inline
Side-by-side
pupygrib/binary.py
View file @
7a08f163
...
...
@@ -7,13 +7,15 @@ import struct
from
pupygrib.exceptions
import
ParseError
error
=
struct
.
error
_uint8struct
=
struct
.
Struct
(
b
'>B'
)
_uint16struct
=
struct
.
Struct
(
b
'>H'
)
_uint24struct
=
struct
.
Struct
(
b
'>HB'
)
_uint32struct
=
struct
.
Struct
(
b
'>I'
)
_uint64struct
=
struct
.
Struct
(
b
'>Q'
)
error
=
struct
.
error
_grib1_float_magic
=
2
**-
24
def
unpack_grib1float_from
(
buf
,
offset
=
0
):
...
...
@@ -32,8 +34,6 @@ def unpack_grib1float_from(buf, offset=0):
B
=
i
&
0x00ffffff
return
(
-
1
)
**
s
*
_grib1_float_magic
*
B
*
16
**
(
A
-
64
)
_grib1_float_magic
=
2
**-
24
def
unpack_int8_from
(
buf
,
offset
=
0
):
"""Unpack an 8-bit signed magnitude integer from *buf* at *offset*."""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment