Skip to content

Commit 8debf74

Browse files
committed
Add noqas
1 parent 0a4055f commit 8debf74

11 files changed

+28
-35
lines changed

__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@
2020
__author__ = "Anita Graser"
2121
__date__ = "Sep 2025"
2222
__copyright__ = "(c) 2025, Anita Graser"
23-
24-
# This will get replaced with a git SHA1 when you do a git archive
25-
26-
__revision__ = "$Format:%H$"
27-
23+
__name__ = "trajectools"
2824

2925
from packaging.version import Version
3026
from movingpandas import __version__ as mpd_version

qgis_processing/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
name = "trajectools"
2-
__version__ = "2.7.2"
1+
__name__ = "qgis_processing"

qgis_processing/cleaningAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def displayName(self):
4747
return self.tr("Remove speed above threshold")
4848

4949
def shortHelpString(self):
50-
return self.tr(
50+
return self.tr( # noqa E501
5151
"<p>Speed-based outlier cleaner that cuts away spikes in the trajectory when "
5252
"the speed exceeds the provided <b>Speed threshold</b> value </p>"
5353
"<p>For more info see: "

qgis_processing/extractPtsAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def processTc(self, tc, parameters, context):
201201
tc, n_processes=self.cpu_count
202202
).get_stop_points(max_diameter=max_diameter, min_duration=min_duration)
203203
except TypeError:
204-
raise TypeError(
204+
raise TypeError( # noqa E501
205205
"TypeError: cannot pickle 'QVariant' object. This error is usually caused by None values in input layer fields. Try to remove None values or run without Add movement metrics."
206206
)
207207

qgis_processing/generalizationAlgorithm.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
QgsProcessingParameterNumber,
1414
)
1515

16-
sys.path.append("..")
17-
1816
from qgis_processing.trajectoriesAlgorithm import (
1917
TrajectoryManipulationAlgorithm,
2018
help_str_base,
@@ -57,7 +55,7 @@ def displayName(self):
5755
return self.tr("Douglas-Peucker generalization")
5856

5957
def shortHelpString(self):
60-
return self.tr(
58+
return self.tr( # noqa E501
6159
"<p>Generalizes trajectories using Douglas-Peucker algorithm "
6260
"(as implemented in shapely/Geos). </p>"
6361
"<p>For more info see: "
@@ -95,7 +93,7 @@ def displayName(self):
9593
return self.tr("Distance-based generalization")
9694

9795
def shortHelpString(self):
98-
return self.tr(
96+
return self.tr( # noqa E501
9997
"This generalization ensures that consecutive locations are at least a "
10098
"certain distance apart. "
10199
"Distance is calculated using CRS units, except if the CRS is geographic "
@@ -137,7 +135,7 @@ def displayName(self):
137135
return self.tr("Temporal generalization")
138136

139137
def shortHelpString(self):
140-
return self.tr(
138+
return self.tr( # noqa E501
141139
"This generalization ensures that consecutive rows are at least a certain "
142140
"timedelta apart. </p>"
143141
"<p>For more info see: "
@@ -176,7 +174,7 @@ def displayName(self):
176174
return self.tr("Spatiotemporal generalization (TDTR)")
177175

178176
def shortHelpString(self):
179-
return self.tr(
177+
return self.tr( # noqa E501
180178
"Generalizes using Top-Down Time Ratio algorithm proposed by "
181179
"Meratnia & de By (2004). "
182180
"This is a spatiotemporal trajectory generalization algorithm. "

qgis_processing/overlayAlgorithm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def displayName(self):
8888
return self.tr("Clip trajectories by polygon layer")
8989

9090
def shortHelpString(self):
91-
return self.tr(
91+
return self.tr( # noqa E501
9292
"<p>Creates a trajectory point layers with speed and direction information "
9393
"as well as a trajectory line layer clipped by the specified vector layer.</p>"
9494
"" + help_str_base + help_str_traj
@@ -140,7 +140,7 @@ def displayName(self):
140140
return self.tr("Intersect trajectories with polygon layer")
141141

142142
def shortHelpString(self):
143-
return self.tr(
143+
return self.tr( # noqa E501
144144
"<p>Creates a trajectory point layers with speed and direction information "
145145
"as well as a trajectory line layer which ihntersects the specified vector layer.</p>"
146146
"" + help_str_base + help_str_traj

qgis_processing/privacyAttackAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def shortHelpString(self):
5353
)
5454

5555
def helpUrl(self):
56-
return "https://scikit-mobility.github.io/scikit-mobility/reference/privacy.html#skmob.privacy.attacks.HomeWorkAttack"
56+
return "https://scikit-mobility.github.io/scikit-mobility/reference/privacy.html#skmob.privacy.attacks.HomeWorkAttack" # noqa E501
5757

5858
def createInstance(self):
5959
return type(self)()

qgis_processing/qgisUtils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def set_multiprocess_path():
4444
if path.isfile(python_path):
4545
multiprocessing.set_executable(python_path)
4646
else:
47-
qgis_utils.iface.messageBar().pushMessage(
47+
qgis_utils.iface.messageBar().pushMessage( # noqa E501
4848
"Trajectools",
49-
QApplication.translate("Error. Python library not found"),
49+
QApplication.translate("Error. Python library not found"), # noqa E501
5050
level=Qgis.Info,
5151
)
5252
except Exception as err:

qgis_processing/smoothingAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def displayName(self):
5757
return self.tr("Kalman filter with constant velocity model")
5858

5959
def shortHelpString(self):
60-
return self.tr(
60+
return self.tr( # noqa E501
6161
"<p>Smooths trajectories using a Kalman Filter with a Constant Velocity model. "
6262
"The Constant Velocity model assumes that the speed between consecutive "
6363
"locations is nearly constant. For trajectories where traj.is_latlon = True "

qgis_processing/splitTrajectoriesAlgorithm.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def displayName(self):
7272
return self.tr("Split trajectories at observation gaps")
7373

7474
def shortHelpString(self):
75-
return self.tr(
75+
return self.tr( # noqa E501
7676
"<p>Splits trajectories into subtrajectories "
7777
"whenever there is a gap in the observations</p>"
7878
"<p>For more information on trajectory splitters see: "
@@ -94,7 +94,7 @@ def processTc(self, tc, parameters, context):
9494
gap=time_gap, min_length=tc.min_length, n_processes=self.cpu_count
9595
)
9696
except TypeError:
97-
raise TypeError(
97+
raise TypeError( # noqa E501
9898
"TypeError: cannot pickle 'QVariant' object. This error is usually caused by None values in input layer fields. Try to remove None values or run without Add movement metrics."
9999
)
100100

@@ -150,7 +150,7 @@ def processTc(self, tc, parameters, context):
150150
mode=split_mode, min_length=tc.min_length, n_processes=self.cpu_count
151151
)
152152
except TypeError:
153-
raise TypeError(
153+
raise TypeError( # noqa E501
154154
"TypeError: cannot pickle 'QVariant' object. This error is usually caused by None values in input layer fields. Try to remove None values or run without Add movement metrics."
155155
)
156156
self.tc_to_sink(splits)
@@ -213,7 +213,7 @@ def processTc(self, tc, parameters, context):
213213
n_processes=self.cpu_count,
214214
)
215215
except TypeError:
216-
raise TypeError(
216+
raise TypeError( # noqa E501
217217
"TypeError: cannot pickle 'QVariant' object. This error is usually caused by None values in input layer fields. Try to remove None values or run without Add movement metrics."
218218
)
219219

@@ -248,7 +248,7 @@ def displayName(self):
248248
return self.tr("Split trajectories at field value change")
249249

250250
def shortHelpString(self):
251-
return self.tr(
251+
return self.tr( # noqa E501
252252
"<p>Splits trajectories into subtrajectories "
253253
"whenever there is a change in the specified field's value.</p>"
254254
"<p>For more information on trajectory splitters see: "
@@ -266,7 +266,7 @@ def processTc(self, tc, parameters, context):
266266
n_processes=self.cpu_count,
267267
)
268268
except TypeError:
269-
raise TypeError(
269+
raise TypeError( # noqa E501
270270
"TypeError: cannot pickle 'QVariant' object. This error is usually caused by None values in input layer fields. Try to remove None values or run without Add movement metrics."
271271
)
272272

0 commit comments

Comments
 (0)