eastein / lidless

A great Eye, lidless, wreathed in webcams.
Other
19 stars 4 forks source link

lidlessirc.py Lint #48

Closed NegativeK closed 9 years ago

NegativeK commented 9 years ago

***** Module lidlessirc W: 50, 0: TODO work with the description of the camera (fixme) W: 56, 0: FIXME verify that skipping this check still makes it not work later on, just fail in a different way. ZMQ access shouldn't be a way to bypass the rules. (fixme) C: 6, 0: No space allowed before : class LidlessBot(mediorc.IRC) : ^ (bad-whitespace) W: 7, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 7, 0: No space allowed before : def init(self, server, nick, chan, percepts, alerts, endpoint) : ^ (bad-whitespace) W: 8, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 9, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 10, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 11, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 12, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 14, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 14, 0: No space allowed before : def route_web_zmq(self, camname) : ^ (bad-whitespace) W: 15, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 15, 0: No space allowed before : if camname not in self.web_zmqs : ^ (bad-whitespace) W: 16, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 17, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 18, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 19, 0: Trailing whitespace (trailing-whitespace) W: 20, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 20, 0: No space allowed before : def summarize_cameras(self, propname, noun) : ^ (bad-whitespace) W: 21, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 21, 0: No space allowed before : if not self.percepts : ^ (bad-whitespace) W: 22, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 23, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 23, 0: No space allowed before : else : ^ (bad-whitespace) W: 24, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 25, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 25, 0: No space allowed before : for pname in self.percepts : ^ (bad-whitespace) W: 26, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 28, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 28, 0: No space allowed before : if bus is None : ^ (bad-whitespace) W: 29, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 30, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 30, 0: No space allowed before : else : ^ (bad-whitespace) W: 31, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 33, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 34, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 34, 0: No space allowed before : if usename is None : ^ (bad-whitespace) W: 35, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 36, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 37, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 38, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 40, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 40, 0: No space allowed before : def on_pubmsg(self, c, e) : ^ (bad-whitespace) W: 41, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 42, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 44, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 45, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 45, 0: No space allowed before : if words[0] == '!space' : ^ (bad-whitespace) W: 46, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 47, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 47, 0: No space allowed before : elif words[0] == '!light' : ^ (bad-whitespace) W: 48, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 49, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 49, 0: No space allowed before : elif words[0] in ['!snap', '!snapshot'] : ^ (bad-whitespace) W: 51, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 51, 0: No space allowed before : try : ^ (bad-whitespace) W: 52, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 53, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 54, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 54, 0: No space allowed before : if pname not in self.percepts : ^ (bad-whitespace) W: 55, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 56, 0: Line too long (199/80) (line-too-long) W: 56, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 56, 0: No space allowed before : elif not self.percepts[pname].snapshot : # FIXME verify that skipping this check still makes it not work later on, just fail in a different way. ZMQ access shouldn't be a way to bypass the rules. ^ (bad-whitespace) W: 57, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 58, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 58, 0: No space allowed before : else : ^ (bad-whitespace) W: 59, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 59, 0: No space allowed before : try : ^ (bad-whitespace) W: 60, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 62, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 63, 0: Wrong hanging indentation. "mtype" : "snapshot_request", ^ | (bad-continuation) C: 63, 0: Trailing whitespace (trailing-whitespace) C: 64, 0: Wrong hanging indentation. "camname" : pname, ^ | (bad-continuation) C: 65, 0: Wrong hanging indentation. "tsus" : tsus ^ | (bad-continuation) C: 66, 0: Wrong hanging indentation. }) ^ | | (bad-continuation) C: 67, 0: Line too long (124/80) (line-too-long) W: 67, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 68, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 68, 0: No space allowed before : except KeyError : ^ (bad-whitespace) W: 69, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 70, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 70, 0: No space allowed before : except IndexError : ^ (bad-whitespace) W: 71, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 72, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 73, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 73, 0: No space allowed before : if camlist : ^ (bad-whitespace) W: 74, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 75, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 76, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 76, 0: No space allowed before : if msg : ^ (bad-whitespace) W: 77, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 79, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 79, 0: No space allowed before : def do_work(self) : ^ (bad-whitespace) W: 80, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 80, 0: No space allowed before : for alert in self.alerts : ^ (bad-whitespace) W: 81, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 81, 0: No space allowed before : try : ^ (bad-whitespace) W: 82, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 83, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 84, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 84, 0: No space allowed before : except Queue.Empty : ^ (bad-whitespace) W: 85, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 87, 0: No space allowed before : class LidlessBotThread(mediorc.IRCThread) : ^ (bad-whitespace) W: 88, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 88, 0: No space allowed before : def init(self, server, nick, chan, percepts, alerts, endpoint) : ^ (bad-whitespace) C: 89, 0: Line too long (86/80) (line-too-long) W: 89, 0: Found indentation with tabs instead of spaces (mixed-indentation) W: 90, 0: Found indentation with tabs instead of spaces (mixed-indentation) C: 1, 0: Missing module docstring (missing-docstring) F: 2, 0: Unable to import 'mediorc' (import-error) F: 4, 0: Unable to import 'zmqfan' (import-error) C: 6, 0: Missing class docstring (missing-docstring) R: 7, 1: Too many arguments (7/5) (too-many-arguments) C: 14, 1: Missing method docstring (missing-docstring) C: 20, 1: Missing method docstring (missing-docstring) C: 40, 1: Invalid argument name "c" (invalid-name) C: 40, 1: Invalid argument name "e" (invalid-name) C: 40, 1: Missing method docstring (missing-docstring) E: 77, 3: Instance of 'LidlessBot' has no 'connection' member (no-member) W: 40,21: Unused argument 'c' (unused-argument) C: 79, 1: Missing method docstring (missing-docstring) E: 83, 4: Instance of 'LidlessBot' has no 'connection' member (no-member) E: 83,28: Instance of 'LidlessBot' has no '_chan' member (no-member) C: 87, 0: Missing class docstring (missing-docstring) R: 88, 1: Too many arguments (7/5) (too-many-arguments) R: 87, 0: Too few public methods (0/2) (too-few-public-methods)

Report

73 statements analysed.

Duplication

+-------------------------+------+---------+-----------+ | |now |previous |difference | +=========================+======+=========+===========+ |nb duplicated lines |0 |0 |= | +-------------------------+------+---------+-----------+ |percent duplicated lines |0.000 |0.000 |= | +-------------------------+------+---------+-----------+

Messages by category

+-----------+-------+---------+-----------+ |type |number |previous |difference | +===========+=======+=========+===========+ |convention |48 |48 |= | +-----------+-------+---------+-----------+ |refactor |3 |3 |= | +-----------+-------+---------+-----------+ |warning |72 |72 |= | +-----------+-------+---------+-----------+ |error |3 |3 |= | +-----------+-------+---------+-----------+

Messages

+-----------------------+------------+ |message id |occurrences | +=======================+============+ |mixed-indentation |69 | +-----------------------+------------+ |bad-whitespace |30 | +-----------------------+------------+ |missing-docstring |7 | +-----------------------+------------+ |bad-continuation |4 | +-----------------------+------------+ |no-member |3 | +-----------------------+------------+ |line-too-long |3 | +-----------------------+------------+ |trailing-whitespace |2 | +-----------------------+------------+ |too-many-arguments |2 | +-----------------------+------------+ |invalid-name |2 | +-----------------------+------------+ |import-error |2 | +-----------------------+------------+ |fixme |2 | +-----------------------+------------+ |unused-argument |1 | +-----------------------+------------+ |too-few-public-methods |1 | +-----------------------+------------+

Global evaluation

Your code has been rated at -8.90/10 (previous run: -8.90/10, +0.00)

Statistics by type

+---------+-------+-----------+-----------+------------+---------+ |type |number |old number |difference |%documented |%badname | +=========+=======+===========+===========+============+=========+ |module |1 |1 |= |0.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |class |2 |2 |= |0.00 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |method |6 |6 |= |33.33 |0.00 | +---------+-------+-----------+-----------+------------+---------+ |function |0 |0 |= |0 |0 | +---------+-------+-----------+-----------+------------+---------+

Raw metrics

+----------+-------+------+---------+-----------+ |type |number |% |previous |difference | +==========+=======+======+=========+===========+ |code |77 |95.06 |77 |= | +----------+-------+------+---------+-----------+ |docstring |3 |3.70 |3 |= | +----------+-------+------+---------+-----------+ |comment |0 |0.00 |0 |= | +----------+-------+------+---------+-----------+ |empty |1 |1.23 |1 |= | +----------+-------+------+---------+-----------+

lol

eastein commented 9 years ago

Lol I don't care.