mirror of
https://github.com/hemna/aprsd-weewx-plugin.git
synced 2025-09-05 06:37:53 -04:00
lint
This commit is contained in:
parent
87f6dfb654
commit
eb0e5f55be
@ -1,6 +1,11 @@
|
|||||||
CHANGES
|
CHANGES
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
v0.1.4
|
||||||
|
------
|
||||||
|
|
||||||
|
* Added pbr version
|
||||||
|
|
||||||
v0.1.3
|
v0.1.3
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -304,9 +304,9 @@ class WeewxWXAPRSThread(threads.APRSDThread):
|
|||||||
|
|
||||||
def str_or_dots(self, number, length):
|
def str_or_dots(self, number, length):
|
||||||
# If parameter is None, fill with dots, otherwise pad with zero
|
# If parameter is None, fill with dots, otherwise pad with zero
|
||||||
#if not number:
|
# if not number:
|
||||||
# retn_value = "." * length
|
# retn_value = "." * length
|
||||||
#else:
|
# else:
|
||||||
format_type = {"int": "d", "float": ".0f"}[type(number).__name__]
|
format_type = {"int": "d", "float": ".0f"}[type(number).__name__]
|
||||||
retn_value = "".join(("%0", str(length), format_type)) % number
|
retn_value = "".join(("%0", str(length), format_type)) % number
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user