1
0
Fork 0
Commit Graph

41 Commits (master)

Author SHA1 Message Date
Fabian P. Schmidt 02eda83a84 utils/export_as_csv: Catch more-specific TypeError instead of broad Exception (W0703)
Fixes the broad-except (W0703) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-08 18:02:23 +01:00
Fabian P. Schmidt caa861b187 forms/BaseObservationFormSet: Add missing initialization of member variable (W0201)
Fixes the attribute-defined-outside-init (W0201) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-08 18:00:51 +01:00
Fabian P. Schmidt e1ed302e64 utils/drifted_frq: Use python3 round builtin (W1633)
This changes the used rounding strategy.

See "Whats new in python3"[1] for more details:
> Exact halfway cases are now rounded to the nearest even result
> instead of away from zero.
> (For example, round(2.5) now returns 2 rather than 3.)

Fixes round-builtin (W1633) pylint error.

[1]: https://docs.python.org/3/whatsnew/3.0.html#builtins

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 15:31:05 +01:00
Fabian P. Schmidt 1719473d70 Use str(error) instead of error.message (W1645)
Fixes exception-message-attribute (W1645) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 15:07:06 +01:00
Fabian P. Schmidt 642a0a2c61 Add from __future__ import division to all relevant files (W1619)
Fixes old-divison (W1619) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 13:55:12 +00:00
Fabian P. Schmidt 426e3585f8 utils/sync_demoddata_to_db: Use requests instead of urllib2 (W1648, W1658)
Fixes the bad-python3-import (W1648) and deprecated-urllib-function (W1658) pylint errors.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-01-04 13:55:31 +01:00
Alfredos-Panagiotis Damkalis c9d4686f07 Revert "pylint: enable E1121, R0912, R0913, R0914, W0201 and W0703 checks"
This reverts commit 581fc7620c. pylint didn't
check the enabled checks as was run with --py3k parameter.

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-03 16:03:46 +02:00
Alfredos-Panagiotis Damkalis 581fc7620c pylint: enable E1121, R0912, R0913, R0914, W0201 and W0703 checks
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-03 14:03:18 +02:00
Fabian P. Schmidt 3609e46b78 Fix demod data display for utf-8 decodable non-CW observations (W1612)
Previously for unicode decode-able frames in observations where the transmitter
type was not CW, the hex dump was malformed and contained the unicode decoded
text instead.

Fixes the unicode-builtin (W1612) pylint errors as well.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 13:26:47 +01:00
Fabian P. Schmidt c70bf410a0 settings: Use python3-compatible octal literals (E396)
Fixes old-octal-literal (E396) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 09:02:52 +00:00
Fabian P. Schmidt bfc0fd639b Add absolute_import to all relevant files (W1618)
Fixes no-absolute-import (W1618) pylint error.
Similar commit in db: librespacefoundation/satnogs/satnogs-db@d4fb5189d19aa7fc12e1adcfbc7b3ca07452fed6

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-31 08:51:04 +00:00
Fabian P. Schmidt 5fa1a47871 pylint: Annotate pylintrc
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-30 22:46:24 +01:00
Fabian P. Schmidt 4dc642da1c models/DemodData: Use python3-compatible codecs for hex encoding (W1646)
Fixes the invalid-str-codec pylint error (W1646).

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-30 08:33:14 +00:00
Fabian P. Schmidt 859653e004 views: Fix key in dictionary check (W1655)
Fixes dict-keys-not-iterating (W1655) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-29 16:25:56 +01:00
Fabian P. Schmidt 7433d1f757 pylint: Enable python3 porting checker
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-17 09:23:49 +00:00
Fabian P. Schmidt aa3261683d celery|tasks: Fix celery cyclical dependency (R0401)
Fixes the cyclical dependency between celery.py and tasks.py when
the task is called outside of celery by switching to autodiscovered tasks.
Use @shared_task decorator and wrapper tasks to workaround celery bug.

Fixes cyclic-import pylint error (R0401).

Commit based on: librespacefoundation/satnogs/satnogs-db@61f9137a

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-07 15:22:41 +01:00
Fabian P. Schmidt ad388e80b3 views: Ignore false-positive no-member pylint error (E1101)
Pylint throws a false positive for E1101 under Python2
(but runs cleanly in Python3, TODO: To be checked!).

Similar commit in db: librespacefoundation/satnogs/satnogs-db@9359532d

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-02 17:57:52 +00:00
Fabian P. Schmidt 76c393979a models|tests: Ignore too-few-public-methods (R0903)
Ignoring too-few-public-methods (R0903) pylint error  for tests.py
where we do not need to care about public methods,
and for django managers in models.py.

Similar commit in db: librespacefoundation/satnogs/satnogs-db@91d8ba20

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-02 16:49:03 +01:00
Fabian P. Schmidt 13da259255 Ignore ungrouped-imports pylint error where it clashes with isort (C0412)
There are clashes between the positioning and ordering of our imports
between pylint and isort, just ignoring them on the pylint side for now.

Based on: librespacefoundation/satnogs/satnogs-db@fc8f9a8c

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-02 10:34:00 +00:00
Fabian P. Schmidt 3731be7adf views: Ignore too-many-ancestors error for rest_framework classes (R0901)
Ignoring cases of too many ancestors in API views.py as these
are upstream, not much we can do about it.

Similar commit in db: librespacefoundation/satnogs/satnogs-db@82713517

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-01 19:51:37 +01:00
Fabian P. Schmidt 0fb5eef514 Ignore no-self-use error for serialization and ModelAdmin member functions (R0201)
Fixes no-self-use (R0201) pylint error.
Similar commit in db: librespacefoundation/satnogs/satnogs-db@9989efb4

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-11-30 20:20:36 +01:00
Fabian P. Schmidt 48c27fbe8d views/ObservationListView: Add get_filter_params method (R0915)
This commit refactors the HTTP GET parameter parsing into a new
funciton get_filter_params, reducing the complexity of get_queryset
and thus fixes a too-many-statements (R0915) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-11-30 19:34:49 +01:00
Fabian P. Schmidt 87e858e7b5 model: Add missing __str__ methods (W5101)
Fixes pylint-django error W5101 (model-missing-unicode).

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-11-30 19:17:23 +01:00
Fabian P. Schmidt 0ebc39c2fd tests: Replace deprecated assertEquals with assertEqual (W1505)
Fixes deprecated-method (W1505) pylint error.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-11-30 18:40:26 +01:00
Fabian P. Schmidt 01cabde483 pylint: Re-Enable redefined-builtin (W0622)
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-11-30 16:39:05 +01:00
Fabian P. Schmidt a06fdec256 pylint: Re-Enable redefined-outer-name (W0621)
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-11-30 16:39:05 +01:00
Alfredos-Panagiotis Damkalis 758c1dfc03 Fix C0111 lint issues
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-11-22 20:38:38 +02:00
Alfredos-Panagiotis Damkalis ee9ce720e7 pylint: resolve C0103 lint issues
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-10-03 10:57:29 +03:00
Vasilis Tsiligiannis 66ef0e823a pylint: Remove or ignore unused arguments
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-29 17:09:10 +03:00
Vasilis Tsiligiannis affb7bcbc3 pylint: Ignore unused variables
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-28 14:26:36 +03:00
Vasilis Tsiligiannis 8084263697 pylint: Fix errors of unimplemented abstract methods
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-28 12:50:48 +03:00
Vasilis Tsiligiannis 8e47a19563 pylint: Use same arguments on overriden methods
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 21:29:29 +03:00
Vasilis Tsiligiannis f5f6d0a0fd pylint: Return 'None' when end of function is reached
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 20:33:59 +03:00
Vasilis Tsiligiannis 6025914422 pylint: Remove unnecessary 'else' statements
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 20:30:15 +03:00
Vasilis Tsiligiannis c6b8fdd2da pylint: Simplify 'if' expression
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 20:30:15 +03:00
Vasilis Tsiligiannis d4c26d14cf pylint: Reduce 'return' statements
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 20:30:15 +03:00
Vasilis Tsiligiannis f5180258e3 pylint: Do not use 'len()' to determine variable emptiness
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 20:30:15 +03:00
Vasilis Tsiligiannis e75d8130de pylint: Remove futile parenthesis
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 20:30:15 +03:00
Vasilis Tsiligiannis 894443697e pylint: Fix class argument on 'super()' call
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 20:30:15 +03:00
Vasilis Tsiligiannis 0eb0d78b3f pylint: Fix 'bad-continuation'
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 20:30:15 +03:00
Vasilis Tsiligiannis 0cbbcce559 tox: Run 'pylint' against code
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-24 14:46:42 +03:00