Skip to content

Commit d4c6bcd

Browse files
committed
remove erroneous pylint init messages
1 parent 38708b9 commit d4c6bcd

5 files changed

Lines changed: 9 additions & 8 deletions

File tree

gnss_lib_py/navdata/navdata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def rename(self, mapper=None, inplace=False):
385385
self.str_map[new_name] = self.str_map.pop(old_name)
386386
self.orig_dtypes[new_name] = self.orig_dtypes.pop(old_name)
387387
else:
388-
new_navdata.map[new_name] = new_navdata.map.pop(old_name)
388+
new_navdata.map[new_name] = new_navdata.map.pop(old_name) # pylint: disable=possibly-used-before-assignment
389389
new_navdata.str_map[new_name] = new_navdata.str_map.pop(old_name)
390390
new_navdata.orig_dtypes[new_name] = new_navdata.orig_dtypes.pop(old_name)
391391

@@ -451,7 +451,7 @@ def replace(self, mapper=None, rows=None, inplace=False):
451451
if inplace:
452452
self[row] = np.array(new_row_values)
453453
else:
454-
new_navdata[row] = np.array(new_row_values)
454+
new_navdata[row] = np.array(new_row_values) # pylint: disable=possibly-used-before-assignment
455455

456456
if inplace:
457457
return None

gnss_lib_py/navdata/operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def sort(navdata, order=None, ind=None, ascending=True,
148148
if inplace:
149149
navdata.array[row_idx,:] = navdata.array[row_idx,ind]
150150
else:
151-
new_navdata.array[row_idx,:] = new_navdata.array[row_idx,ind]
151+
new_navdata.array[row_idx,:] = new_navdata.array[row_idx,ind] # pylint: disable=possibly-used-before-assignment
152152

153153
if inplace:
154154
return None
@@ -248,7 +248,7 @@ def interpolate(navdata, x_row, y_rows, inplace=False, *args):
248248
navdata[y_row,nan_idxs] = np.interp(x_vals, xp_vals,
249249
yp_vals, *args)
250250
else:
251-
new_navdata[y_row,nan_idxs] = np.interp(x_vals, xp_vals,
251+
new_navdata[y_row,nan_idxs] = np.interp(x_vals, xp_vals, # pylint: disable=possibly-used-before-assignment
252252
yp_vals, *args)
253253
if inplace:
254254
return None

gnss_lib_py/parsers/nmea.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,19 @@ def __init__(self, input_path, msg_types=None,
139139
# As per `gnss_lib_py` standards, convert the heading from degrees
140140
# to radians
141141
pd_df['true_course_rad'] = (np.pi/180.)*pd_df['true_course']\
142-
.replace("",pd.NA)\
142+
.replace("",np.nan)\
143143
.bfill()\
144144
.ffill()\
145145
.astype(float)
146146
# Convert the given altitude value to float based on the given units
147147

148148
# Assuming that altitude units are always meters
149-
pd_df['altitude'] = pd_df['altitude'].replace("",pd.NA)\
149+
pd_df['altitude'] = pd_df['altitude'].replace("",np.nan)\
150150
.bfill()\
151151
.ffill()\
152152
.astype(float)
153153
pd_df["num_sats"] = pd_df["num_sats"].fillna(value=0).astype('int64')
154-
pd_df = pd_df.fillna(value=np.nan).replace("",pd.NA)
154+
pd_df = pd_df.fillna(value=np.nan).replace("",np.nan)
155155
convert_dict={
156156
'num_sats' : np.int64,
157157
'gps_qual' : np.int64,

gnss_lib_py/parsers/rinex_nav.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def preprocess(self, rinex_paths, satellites):
131131
self.iono_params[start_gps_millis].keys():
132132
self.iono_params[start_gps_millis][constellation] \
133133
= value
134-
#TODO: Find a more pythonic way to do this^
134+
135135
data.reset_index(inplace=True, drop=True)
136136
data.sort_values('time', inplace=True, ignore_index=True)
137137

gnss_lib_py/parsers/sp3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def __init__(self, input_paths):
6565
data = [line.strip() for line in infile]
6666

6767
# Loop through each line
68+
gps_millis_timestep = 0
6869
for dval in data:
6970
if len(dval) == 0:
7071
# No data

0 commit comments

Comments
 (0)