Fix some spacing issues and import syntax introduced by my linting changes.
The inline pylint disable for C0412 clashes with isort, there is no combination there that works for both.
Signed-off-by: Corey Shields <cshields@gmail.com>
Fixing these as part of W0511
There were some transmitter properties labeled "has_" (which implies a boolean) while returning a count. Renamed them and their instances to "_count" along with cleaning up some variables
Signed-off-by: Corey Shields <cshields@gmail.com>
Ignoring R0903 for tests.py where we do not need to care about public methods, and for django managers in models.py
This negates the need for MR !396
Signed-off-by: Corey Shields <cshields@gmail.com>
Signed-off-by: Corey Shields <cshields@gmail.com>
Fix some spacing issues brought up in a full tox run (that were not identified in my prior linting flows)
broad-except, I added explicit exceptions where I felt safe doing so - but we do have a lot of broad exceptions accepted.
Signed-off-by: Corey Shields <cshields@gmail.com>
we are going to ignore W0201 and W0221 around the TransmitterEntry save function. Reasons are in the code comments.
Signed-off-by: Corey Shields <cshields@gmail.com>
display_decoded is an unused relic of the original decode method, and throws a W0105 warning.
removing this function completely
Signed-off-by: Corey Shields <cshields@gmail.com>
cleaning up C0111 exposed that we have some helpers initially added when django cache was implemented, but have since been abandoned.
Removing them as they are unused and unneeded
Signed-off-by: Corey Shields <cshields@gmail.com>
The special method __unicode__ is python2-only,
in python3 it's merged with __str__. In order to be py23-compatible
the python_2_unicode_decorator is used, see
https://docs.djangoproject.com/en/1.11/topics/python3/#str-and-unicode-methods
initial patch: Updated docstrings to show names
[kerel@mailbox.org: - reworded commit message,
- added similar change in demoddata
- added @python_2_unicode_compatible decorator]
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
We have a field in demoddata called "source" which stores the application source of the data (network, sids, manual). This causes a lot of confusion with the SiDS API format which has a "source" parameter (that we convert to "station")
As I'm working through documenting the API (and getting us ready for feature expansion), I'd like this field renamed to avoid future confusion.
Transmitter model has been refactored by changing the current schema
from Transmitter and Suggestion models to TransmitterEntry model and
two proxy models TransmitterSuggestion and Transmitter:
* TransmitterEntry model will hold all the entries and changes on
transmitter entries in db.
* TransmitterSuggestion model will be the proxy model of the unreviewed
transmitter entries.
* Transmitter model will be the proxy model of the latest approved and
reviewed transmitter entries.
There are also change on Transmitter model fields:
* alive field is now change to status field
* there are new fields: citation, user, reviewed and created
Upon fixing CI we now have a slew of PEP8 722 issues (bare excepts). This MR fixes all of those by excepting Exception, which should catch anything the program generates while allowing systemexit exceptions.