pylint: Remove or ignore unused arguments
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>merge-requests/779/head
parent
affb7bcbc3
commit
66ef0e823a
|
@ -20,7 +20,6 @@ disable=
|
||||||
R0914,
|
R0914,
|
||||||
R0915,
|
R0915,
|
||||||
W0201,
|
W0201,
|
||||||
W0613,
|
|
||||||
W0621,
|
W0621,
|
||||||
W0622,
|
W0622,
|
||||||
W0703,
|
W0703,
|
||||||
|
|
|
@ -20,7 +20,6 @@ disable=
|
||||||
R0914,
|
R0914,
|
||||||
R0915,
|
R0915,
|
||||||
W0201,
|
W0201,
|
||||||
W0613,
|
|
||||||
W0621,
|
W0621,
|
||||||
W0622,
|
W0622,
|
||||||
W0703,
|
W0703,
|
||||||
|
|
|
@ -64,7 +64,7 @@ def _name_obs_demoddata(instance, filename):
|
||||||
return 'data_obs/{0}/{1}'.format(instance.observation.id, filename)
|
return 'data_obs/{0}/{1}'.format(instance.observation.id, filename)
|
||||||
|
|
||||||
|
|
||||||
def _observation_post_save(sender, instance, created, **kwargs):
|
def _observation_post_save(sender, instance, created, **kwargs): # pylint: disable=W0613
|
||||||
"""
|
"""
|
||||||
Post save Observation operations
|
Post save Observation operations
|
||||||
* Auto vet as good obserfvation with Demod Data
|
* Auto vet as good obserfvation with Demod Data
|
||||||
|
@ -82,7 +82,7 @@ def _observation_post_save(sender, instance, created, **kwargs):
|
||||||
post_save.connect(_observation_post_save, sender=Observation)
|
post_save.connect(_observation_post_save, sender=Observation)
|
||||||
|
|
||||||
|
|
||||||
def _station_post_save(sender, instance, created, **kwargs):
|
def _station_post_save(sender, instance, created, **kwargs): # pylint: disable=W0613
|
||||||
"""
|
"""
|
||||||
Post save Station operations
|
Post save Station operations
|
||||||
* Store current status
|
* Store current status
|
||||||
|
@ -104,7 +104,7 @@ def _station_post_save(sender, instance, created, **kwargs):
|
||||||
post_save.connect(_station_post_save, sender=Station)
|
post_save.connect(_station_post_save, sender=Station)
|
||||||
|
|
||||||
|
|
||||||
def _tle_post_save(sender, instance, created, **kwargs):
|
def _tle_post_save(sender, instance, created, **kwargs): # pylint: disable=W0613
|
||||||
"""
|
"""
|
||||||
Post save Tle operations
|
Post save Tle operations
|
||||||
* Update TLE for future observations
|
* Update TLE for future observations
|
||||||
|
@ -483,7 +483,7 @@ class Observation(models.Model):
|
||||||
|
|
||||||
|
|
||||||
@receiver(models.signals.post_delete, sender=Observation)
|
@receiver(models.signals.post_delete, sender=Observation)
|
||||||
def observation_remove_files(sender, instance, **kwargs):
|
def observation_remove_files(sender, instance, **kwargs): # pylint: disable=W0613
|
||||||
if instance.payload:
|
if instance.payload:
|
||||||
if os.path.isfile(instance.payload.path):
|
if os.path.isfile(instance.payload.path):
|
||||||
os.remove(instance.payload.path)
|
os.remove(instance.payload.path)
|
||||||
|
@ -522,7 +522,7 @@ class DemodData(models.Model):
|
||||||
|
|
||||||
|
|
||||||
@receiver(models.signals.post_delete, sender=DemodData)
|
@receiver(models.signals.post_delete, sender=DemodData)
|
||||||
def demoddata_remove_files(sender, instance, **kwargs):
|
def demoddata_remove_files(sender, instance, **kwargs): # pylint: disable=W0613
|
||||||
if instance.payload_demod:
|
if instance.payload_demod:
|
||||||
if os.path.isfile(instance.payload_demod.path):
|
if os.path.isfile(instance.payload_demod.path):
|
||||||
os.remove(instance.payload_demod.path)
|
os.remove(instance.payload_demod.path)
|
||||||
|
|
|
@ -191,7 +191,7 @@ def next_pass(observer, satellite):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def predict_available_observation_windows(station, min_horizon, overlapped, tle, start, end, sat):
|
def predict_available_observation_windows(station, min_horizon, overlapped, tle, start, end):
|
||||||
'''Calculate available observation windows for a certain station and satellite during
|
'''Calculate available observation windows for a certain station and satellite during
|
||||||
the given time period.
|
the given time period.
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ class StationFactory(factory.django.DjangoModelFactory):
|
||||||
horizon = fuzzy.FuzzyInteger(10, 20)
|
horizon = fuzzy.FuzzyInteger(10, 20)
|
||||||
|
|
||||||
@factory.post_generation
|
@factory.post_generation
|
||||||
def antennas(self, create, extracted, **kwargs):
|
def antennas(self, create, extracted, **kwargs): # pylint: disable=W0613
|
||||||
if not create:
|
if not create:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -410,7 +410,7 @@ def prediction_windows(request):
|
||||||
available_stations = get_available_stations(stations, downlink, request.user)
|
available_stations = get_available_stations(stations, downlink, request.user)
|
||||||
for station in available_stations:
|
for station in available_stations:
|
||||||
station_passes, station_windows = predict_available_observation_windows(
|
station_passes, station_windows = predict_available_observation_windows(
|
||||||
station, min_horizon, overlapped, tle, start, end, sat
|
station, min_horizon, overlapped, tle, start, end
|
||||||
)
|
)
|
||||||
passes_found[station.id] = station_passes
|
passes_found[station.id] = station_passes
|
||||||
if station_windows:
|
if station_windows:
|
||||||
|
@ -737,7 +737,7 @@ def pass_predictions(request, id):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
_, station_windows = predict_available_observation_windows(
|
_, station_windows = predict_available_observation_windows(
|
||||||
station, None, 2, tle, start, end, satellite
|
station, None, 2, tle, start, end
|
||||||
)
|
)
|
||||||
|
|
||||||
if station_windows:
|
if station_windows:
|
||||||
|
|
|
@ -20,7 +20,7 @@ app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
|
||||||
|
|
||||||
|
|
||||||
@app.on_after_finalize.connect
|
@app.on_after_finalize.connect
|
||||||
def setup_periodic_tasks(sender, **kwargs):
|
def setup_periodic_tasks(sender, **kwargs): # pylint: disable=W0613
|
||||||
from network.base.tasks import (
|
from network.base.tasks import (
|
||||||
update_all_tle, fetch_data, clean_observations, station_status_update,
|
update_all_tle, fetch_data, clean_observations, station_status_update,
|
||||||
stations_cache_rates, notify_for_stations_without_results, sync_to_db
|
stations_cache_rates, notify_for_stations_without_results, sync_to_db
|
||||||
|
|
|
@ -5,7 +5,7 @@ from django.db.models.signals import post_save
|
||||||
from rest_framework.authtoken.models import Token
|
from rest_framework.authtoken.models import Token
|
||||||
|
|
||||||
|
|
||||||
def gen_token(sender, instance, created, **kwargs):
|
def gen_token(sender, instance, created, **kwargs): # pylint: disable=W0613
|
||||||
try:
|
try:
|
||||||
Token.objects.get(user=instance)
|
Token.objects.get(user=instance)
|
||||||
except Token.DoesNotExist:
|
except Token.DoesNotExist:
|
||||||
|
|
Loading…
Reference in New Issue