AI Slop Code RIsk Monitor

twisted/twisted

Event-driven networking engine written in Python.

7.9 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for twisted/twisted, a Python project with 5,995 GitHub stars. SynthScan examined 401,865 lines of code across 1161 source files, recording 1631 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 7.9 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

7.9
Adjusted Signal
7.9
Raw Pattern Score
100%
Time Factor
2026-10-08
Last Push
6.0K
Stars
Python
Language
401.9K
Lines of Code
1.2K
Files
1.6K
Pattern Hits
2026-10-12
Scan Date
0.29
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 7.0/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 460 finding(s).

Hallucinated Dependency & Supply Chain Risk 11.8/100 · LOW

Are imports declared and package/API names verified? 687 finding(s).

Agent Over-Engineering Ratio 18.4/100 · LOW

Are wrappers, guards, and repeated structures necessary? 550 finding(s).

PR Review Velocity Impact 35.5/100 · MEDIUM

Which changes need focused human review? 1631 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 11HIGH 328MEDIUM 80LOW 1212

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1631 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Empty Error Handlers201 hits · 1005 pts
SeverityFileLineSnippetContext
HIGHdocs/words/examples/cursesclient.py168except BaseException:CODE
HIGHdocs/words/examples/pb_client.py80except RuntimeError:CODE
HIGHdocs/core/examples/courier.py57except OSError:CODE
HIGHdocs/core/examples/longex2.py55except StopIteration:CODE
HIGHdocs/core/examples/threadedselect/blockingdemo.py66except Empty:CODE
HIGHdocs/core/benchmarks/failure.py71except BaseException:CODE
HIGHsrc/twisted/words/service.py81except KeyError:CODE
HIGHsrc/twisted/words/im/basesupport.py179except KeyError:CODE
HIGHsrc/twisted/words/protocols/irc.py143except (TypeError, ValueError):CODE
HIGHsrc/twisted/words/protocols/irc.py2234except ValueError:CODE
HIGHsrc/twisted/words/protocols/irc.py2240except ValueError:CODE
HIGHsrc/twisted/words/protocols/irc.py2908except BaseException:CODE
HIGHsrc/twisted/words/protocols/irc.py2916except BaseException:CODE
HIGHsrc/twisted/words/protocols/irc.py2928except BaseException:CODE
HIGHsrc/twisted/words/protocols/irc.py3034except ValueError:CODE
HIGHsrc/twisted/words/protocols/irc.py2435except ValueError:CODE
HIGHsrc/twisted/words/protocols/irc.py3053except ValueError:CODE
HIGHsrc/twisted/words/protocols/irc.py3839except TypeError:CODE
HIGHsrc/twisted/words/protocols/jabber/error.py175except KeyError:CODE
HIGHsrc/twisted/words/protocols/jabber/xmlstream.py738except KeyError:CODE
HIGHsrc/twisted/names/dns.py3368except KeyError:CODE
HIGHsrc/twisted/names/dns.py3449except KeyError:CODE
HIGHsrc/twisted/names/test/test_names.py211except error.CannotListenError:CODE
HIGHsrc/twisted/logger/_observer.py56except ValueError:CODE
HIGHsrc/twisted/test/test_strerror.py148except ImportError:CODE
HIGHsrc/twisted/test/test_strerror.py154except ImportError:CODE
HIGHsrc/twisted/test/test_fdesc.py70except OSError:CODE
HIGHsrc/twisted/test/test_fdesc.py74except OSError:CODE
HIGHsrc/twisted/test/test_plugin.py95except FileNotFoundError:CODE
HIGHsrc/twisted/test/testutils.py174except OSError:CODE
HIGHsrc/twisted/test/test_dirdbm.py66except KeyError:CODE
HIGHsrc/twisted/test/test_roots.py14except NotImplementedError:CODE
HIGHsrc/twisted/test/test_roots.py20except NotImplementedError:CODE
HIGHsrc/twisted/test/test_roots.py33except NotImplementedError:CODE
HIGHsrc/twisted/test/test_roots.py39except NotImplementedError:CODE
HIGHsrc/twisted/test/test_internet.py357except (ValueError, KeyError):CODE
HIGHsrc/twisted/test/test_process.py615except BaseException:CODE
HIGHsrc/twisted/test/test_process.py2650except KeyError:CODE
HIGHsrc/twisted/test/test_process.py795except OSError:CODE
HIGHsrc/twisted/test/test_ftp.py52except OSError:CODE
HIGHsrc/twisted/test/test_logfile.py194except OSError:CODE
HIGHsrc/twisted/test/test_threads.py21except ImportError:CODE
HIGHsrc/twisted/test/test_failure.py927except StopIteration:CODE
HIGHsrc/twisted/test/test_tcp.py1863except ImportError:CODE
HIGHsrc/twisted/test/iosim.py18except ImportError:CODE
HIGHsrc/twisted/test/test_protocols.py122except AttributeError:CODE
HIGHsrc/twisted/test/test_protocols.py127except AttributeError:CODE
HIGHsrc/twisted/test/test_protocols.py131except AttributeError:CODE
HIGHsrc/twisted/test/test_protocols.py135except AttributeError:CODE
HIGHsrc/twisted/python/randbytes.py69except SourceNotAvailable:CODE
HIGHsrc/twisted/python/randbytes.py114except SourceNotAvailable:CODE
HIGHsrc/twisted/python/_release.py172except (NotWorkingDirectory, OSError):CODE
HIGHsrc/twisted/python/util.py777except TypeError:CODE
HIGHsrc/twisted/python/util.py781except (TypeError, AttributeError):CODE
HIGHsrc/twisted/python/util.py785except (TypeError, AttributeError):CODE
HIGHsrc/twisted/python/util.py789except TypeError:CODE
HIGHsrc/twisted/python/htmlizer.py118except tokenize.TokenError:CODE
HIGHsrc/twisted/python/logfile.py89except OSError:CODE
HIGHsrc/twisted/python/logfile.py232except ValueError:CODE
HIGHsrc/twisted/python/context.py99except KeyError:CODE
141 more matches not shown…
Unused Imports599 hits · 558 pts
SeverityFileLineSnippetContext
LOWdocs/conf.py21CODE
LOWdocs/core/examples/wxacceptance.py32CODE
LOWdocs/core/examples/threadedselect/pygamedemo.py13CODE
LOW…examples/threadedselect/Cocoa/SimpleWebClient/setup.py10CODE
LOW…les/threadedselect/Cocoa/SimpleWebClient/Twistzilla.py5CODE
LOW…les/threadedselect/Cocoa/SimpleWebClient/Twistzilla.py8CODE
LOWdocs/core/benchmarks/tpserver.py3CODE
LOWdocs/core/benchmarks/tpserver.py7CODE
LOWdocs/core/benchmarks/tpclient.py7CODE
LOW…re/howto/tutorial/listings/finger/finger19c_changes.py4CODE
LOW…re/howto/tutorial/listings/finger/finger19c_changes.py4CODE
LOW…re/howto/tutorial/listings/finger/finger19c_changes.py4CODE
LOWdocs/core/howto/tutorial/listings/finger/finger10.py3CODE
LOWdocs/core/howto/tutorial/listings/finger/finger10.py3CODE
LOWdocs/core/howto/tutorial/listings/finger/finger22.py4CODE
LOWdocs/core/howto/tutorial/listings/finger/finger22.py11CODE
LOW…re/howto/tutorial/listings/finger/finger19b_changes.py1CODE
LOW…re/howto/tutorial/listings/finger/finger19b_changes.py3CODE
LOW…re/howto/tutorial/listings/finger/finger19b_changes.py3CODE
LOWdocs/core/howto/tutorial/listings/finger/finger09.py3CODE
LOWdocs/core/howto/tutorial/listings/finger/finger/tap.py4CODE
LOWdocs/core/howto/tutorial/listings/finger/finger/tap.py4CODE
LOWdocs/core/howto/tutorial/listings/finger/finger/tap.py5CODE
LOWdocs/core/howto/listings/pb/copy2_sender.py10CODE
LOWdocs/core/howto/listings/pb/cache_sender.py10CODE
LOWdocs/core/howto/listings/pb/copy_sender.py8CODE
LOWdocs/core/howto/listings/pb/cache_receiver.py7CODE
LOWdocs/core/howto/listings/pb/copy2_receiver.py7CODE
LOWdocs/core/howto/listings/ssl/wrapped_client.py9CODE
LOWdocs/core/howto/listings/logger/loader-math.py1CODE
LOWdocs/core/howto/listings/logger/saver.py1CODE
LOWdocs/core/howto/listings/logger/loader.py1CODE
LOWdocs/core/howto/listings/logger/offline_analyze.py1CODE
LOWdocs/core/howto/listings/logger/ad_hoc_save.py1CODE
LOWdocs/core/howto/listings/process/quotes.py1CODE
LOWdocs/core/howto/listings/process/quotes.py4CODE
LOWdocs/web/examples/websocket/websocket-client.py1CODE
LOWdocs/web/examples/websocket/websocket-client.py6CODE
LOWsrc/twisted/copyright.py11CODE
LOWsrc/twisted/plugin.py13CODE
LOWsrc/twisted/words/tap.py7CODE
LOWsrc/twisted/words/xish/xmlstream.py36CODE
LOWsrc/twisted/words/test/test_tap.py4CODE
LOWsrc/twisted/words/protocols/jabber/xmlstream.py24CODE
LOWsrc/twisted/words/protocols/jabber/xmlstream.py37CODE
LOWsrc/twisted/words/protocols/jabber/jid.py14CODE
LOWsrc/twisted/names/dns.py11CODE
LOWsrc/twisted/names/dns.py298CODE
LOWsrc/twisted/names/dns.py298CODE
LOWsrc/twisted/names/client.py18CODE
LOWsrc/twisted/names/test/test_hosts.py7CODE
LOWsrc/twisted/logger/_json.py9CODE
LOWsrc/twisted/logger/_stdlib.py9CODE
LOWsrc/twisted/logger/_flatten.py11CODE
LOWsrc/twisted/logger/_observer.py9CODE
LOWsrc/twisted/logger/_io.py9CODE
LOWsrc/twisted/logger/_buffer.py9CODE
LOWsrc/twisted/logger/__init__.py92CODE
LOWsrc/twisted/logger/__init__.py92CODE
LOWsrc/twisted/logger/__init__.py94CODE
539 more matches not shown…
Cross-File Repetition65 hits · 325 pts
SeverityFileLineSnippetContext
HIGHsrc/twisted/test/testutils.py0utility to pump data between clients and servers for protocol testing. perhaps this is a utility worthy of being in protSTRING
HIGHsrc/twisted/test/iosim.py0utility to pump data between clients and servers for protocol testing. perhaps this is a utility worthy of being in protSTRING
HIGHsrc/twisted/spread/test/test_pb.py0utility to pump data between clients and servers for protocol testing. perhaps this is a utility worthy of being in protSTRING
HIGHsrc/twisted/test/stdio_test_halfclose_buggy_write.py0a protocol to hook up to stdio and observe its transport being half-closed. if all goes as expected, c{exitcode} will beSTRING
HIGHsrc/twisted/test/stdio_test_halfclose.py0a protocol to hook up to stdio and observe its transport being half-closed. if all goes as expected, c{exitcode} will beSTRING
HIGHsrc/twisted/test/stdio_test_halfclose_buggy.py0a protocol to hook up to stdio and observe its transport being half-closed. if all goes as expected, c{exitcode} will beSTRING
HIGHsrc/twisted/test/stdio_test_halfclose_buggy_write.py0this is the desired event. once it has happened, stop the reactor so the process will exit.STRING
HIGHsrc/twisted/test/stdio_test_halfclose.py0this is the desired event. once it has happened, stop the reactor so the process will exit.STRING
HIGHsrc/twisted/test/stdio_test_halfclose_buggy.py0this is the desired event. once it has happened, stop the reactor so the process will exit.STRING
HIGHsrc/twisted/test/stdio_test_halfclose_buggy_write.py0this may only be invoked after c{readconnectionlost}. if it happens otherwise, mark it as an error and shut down.STRING
HIGHsrc/twisted/test/stdio_test_halfclose.py0this may only be invoked after c{readconnectionlost}. if it happens otherwise, mark it as an error and shut down.STRING
HIGHsrc/twisted/test/stdio_test_halfclose_buggy.py0this may only be invoked after c{readconnectionlost}. if it happens otherwise, mark it as an error and shut down.STRING
HIGHsrc/twisted/mail/interfaces.py0get a unique identifier for a message. @type i: l{int} @param i: the 0-based index of a message. @rtype: l{bytes} @returSTRING
HIGHsrc/twisted/mail/maildir.py0get a unique identifier for a message. @type i: l{int} @param i: the 0-based index of a message. @rtype: l{bytes} @returSTRING
HIGHsrc/twisted/mail/pop3.py0get a unique identifier for a message. @type i: l{int} @param i: the 0-based index of a message. @rtype: l{bytes} @returSTRING
HIGHsrc/twisted/web/_http2.py0pause producing data. tells a producer that it has produced too much data to process for the time being, and to stop untSTRING
HIGHsrc/twisted/web/http.py0pause producing data. tells a producer that it has produced too much data to process for the time being, and to stop untSTRING
HIGHsrc/twisted/internet/interfaces.py0pause producing data. tells a producer that it has produced too much data to process for the time being, and to stop untSTRING
HIGHsrc/twisted/web/http.py0stop consuming data from a producer, without disconnecting.STRING
HIGHsrc/twisted/internet/abstract.py0stop consuming data from a producer, without disconnecting.STRING
HIGHsrc/twisted/internet/interfaces.py0stop consuming data from a producer, without disconnecting.STRING
HIGHsrc/twisted/internet/_pollingfile.py0stop consuming data from a producer, without disconnecting.STRING
HIGHsrc/twisted/internet/interfaces.py0see l{twisted.internet.interfaces.ireactortime.getdelayedcalls}STRING
HIGHsrc/twisted/internet/task.py0see l{twisted.internet.interfaces.ireactortime.getdelayedcalls}STRING
HIGHsrc/twisted/internet/base.py0see l{twisted.internet.interfaces.ireactortime.getdelayedcalls}STRING
HIGHsrc/twisted/internet/interfaces.py0checks if broadcast is currently allowed on this port. @return: whether this port may broadcast. @rtype: l{bool}STRING
HIGHsrc/twisted/internet/udp.py0checks if broadcast is currently allowed on this port. @return: whether this port may broadcast. @rtype: l{bool}STRING
HIGHsrc/twisted/internet/iocpreactor/udp.py0checks if broadcast is currently allowed on this port. @return: whether this port may broadcast. @rtype: l{bool}STRING
HIGHsrc/twisted/internet/epollreactor.py0add a socket filedescriptor for notification of data available to read.STRING
HIGHsrc/twisted/internet/_threadedselect.py0add a socket filedescriptor for notification of data available to read.STRING
HIGHsrc/twisted/internet/pollreactor.py0add a socket filedescriptor for notification of data available to read.STRING
HIGHsrc/twisted/internet/selectreactor.py0add a socket filedescriptor for notification of data available to read.STRING
HIGHsrc/twisted/internet/win32eventreactor.py0add a socket filedescriptor for notification of data available to read.STRING
HIGHsrc/twisted/internet/epollreactor.py0add a socket filedescriptor for notification of data available to write.STRING
HIGHsrc/twisted/internet/_threadedselect.py0add a socket filedescriptor for notification of data available to write.STRING
HIGHsrc/twisted/internet/pollreactor.py0add a socket filedescriptor for notification of data available to write.STRING
HIGHsrc/twisted/internet/selectreactor.py0add a socket filedescriptor for notification of data available to write.STRING
HIGHsrc/twisted/internet/win32eventreactor.py0add a socket filedescriptor for notification of data available to write.STRING
HIGHsrc/twisted/internet/epollreactor.py0remove a selectable for notification of data available to read.STRING
HIGHsrc/twisted/internet/_threadedselect.py0remove a selectable for notification of data available to read.STRING
HIGHsrc/twisted/internet/pollreactor.py0remove a selectable for notification of data available to read.STRING
HIGHsrc/twisted/internet/selectreactor.py0remove a selectable for notification of data available to read.STRING
HIGHsrc/twisted/internet/win32eventreactor.py0remove a selectable for notification of data available to read.STRING
HIGHsrc/twisted/internet/epollreactor.py0remove a selectable for notification of data available to write.STRING
HIGHsrc/twisted/internet/_threadedselect.py0remove a selectable for notification of data available to write.STRING
HIGHsrc/twisted/internet/pollreactor.py0remove a selectable for notification of data available to write.STRING
HIGHsrc/twisted/internet/selectreactor.py0remove a selectable for notification of data available to write.STRING
HIGHsrc/twisted/internet/win32eventreactor.py0remove a selectable for notification of data available to write.STRING
HIGHsrc/twisted/internet/unix.py0create and bind my socket, and begin listening on it. this is called on unserialization, and must be called after creatiSTRING
HIGHsrc/twisted/internet/tcp.py0create and bind my socket, and begin listening on it. this is called on unserialization, and must be called after creatiSTRING
HIGHsrc/twisted/internet/udp.py0create and bind my socket, and begin listening on it. this is called on unserialization, and must be called after creatiSTRING
HIGHsrc/twisted/internet/iocpreactor/udp.py0create and bind my socket, and begin listening on it. this is called on unserialization, and must be called after creatiSTRING
HIGHsrc/twisted/internet/tcp.py0returns the name of my class, to prefix log entries with.STRING
HIGHsrc/twisted/internet/iocpreactor/tcp.py0returns the name of my class, to prefix log entries with.STRING
HIGHsrc/twisted/internet/iocpreactor/udp.py0returns the name of my class, to prefix log entries with.STRING
HIGHsrc/twisted/pair/tuntap.py0returns the name of my class, to prefix log entries with.STRING
HIGHsrc/twisted/internet/test/test_unix.py0get the message expected to be logged when a tls port starts listening.STRING
HIGHsrc/twisted/internet/test/test_tcp.py0get the message expected to be logged when a tls port starts listening.STRING
HIGHsrc/twisted/internet/test/test_tls.py0get the message expected to be logged when a tls port starts listening.STRING
HIGHsrc/twisted/protocols/haproxy/_v2parser.py0consume a chunk of data and attempt to parse it. @param data: a bytestring. @type data: l{bytes} @return: a two-tuple coSTRING
5 more matches not shown…
Cross-Language Confusion62 hits · 310 pts
SeverityFileLineSnippetContext
HIGHdocs/core/examples/pbgtk2.py103 self._statusBar.push(self._statusContext, text)CODE
HIGH…les/threadedselect/Cocoa/SimpleWebClient/Twistzilla.py47 s.replaceCharactersInRange_withString_((0, s.length()), html)CODE
HIGH…les/threadedselect/Cocoa/SimpleWebClient/Twistzilla.py52 s.deleteCharactersInRange_((0, s.length()))CODE
HIGH⚡src/twisted/test/test_sip.py282 self.assertEqual(r.toString(), "INVITE sip:foo SIP/2.0\r\nFoo: bar\r\n\r\n")CODE
HIGH⚡src/twisted/test/test_sip.py290 r.toString(), "SIP/2.0 200 OK\r\nFoo: bar\r\nContent-Length: 4\r\n\r\n1234"CODE
HIGH⚡src/twisted/test/test_sip.py295 self.assertEqual(r.toString(), "SIP/2.0 200 OK\r\n\r\n")CODE
HIGH⚡src/twisted/test/test_sip.py300 s = v.toString()CODE
HIGH⚡src/twisted/test/test_sip.py373 self.assertEqual(v.toString(), "SIP/2.0/UDP foo.bar:5060;rport")CODE
HIGH⚡src/twisted/test/test_sip.py383 self.assertEqual(v.toString(), "SIP/2.0/UDP foo.bar:5060;rport")CODE
HIGH⚡src/twisted/test/test_sip.py393 self.assertEqual(v.toString(), "SIP/2.0/UDP foo.bar:5060;rport=1")CODE
HIGH⚡src/twisted/test/test_sip.py552 self.proxy.datagramReceived(r.toString(), ("1.1.1.1", 5060))CODE
HIGH⚡src/twisted/test/test_sip.py562 self.proxy.datagramReceived(r.toString(), ("1.1.1.1", 5060))CODE
HIGH⚡src/twisted/test/test_sip.py572 self.proxy.datagramReceived(r.toString(), ("client.com", 5060))CODE
HIGH⚡src/twisted/test/test_sip.py580 self.proxy.datagramReceived(r.toString(), ("1.2.3.4", 5060))CODE
HIGHsrc/twisted/test/test_sip.py145 self.assertEqual(m.uri.toString(), uri)CODE
HIGHsrc/twisted/test/test_sip.py330 v.toString(),CODE
HIGHsrc/twisted/test/test_sip.py352 self.assertEqual(v.toString(), "SIP/2.0/UDP example.com:5060;hidden")CODE
HIGHsrc/twisted/test/test_sip.py407 self.assertNotEqual(v.toString().find("rport=12345"), -1)CODE
HIGHsrc/twisted/test/test_sip.py415 self.assertEqual(v.toString(), s)CODE
HIGHsrc/twisted/test/test_sip.py471 self.assertEqual(gurl.toString(), urls)CODE
HIGHsrc/twisted/test/test_sip.py501 self.proxy.datagramReceived(r.toString(), ("1.2.3.4", 5060))CODE
HIGHsrc/twisted/test/test_sip.py506 self.assertEqual(m.uri.toString(), "sip:foo")CODE
HIGHsrc/twisted/test/test_sip.py523 self.proxy.datagramReceived(r.toString(), ("1.1.1.1", 5060))CODE
HIGHsrc/twisted/test/test_sip.py534 self.proxy.datagramReceived(r.toString(), ("1.1.1.1", 5060))CODE
HIGHsrc/twisted/test/test_sip.py541 self.proxy.datagramReceived(r.toString(), ("1.1.1.1", 5060))CODE
HIGHsrc/twisted/test/test_sip.py606 self.proxy.datagramReceived(r.toString(), ("client.com", 5060))CODE
HIGHsrc/twisted/test/test_sip.py614 self.proxy.datagramReceived(r.toString(), ("client.com", 5060))CODE
HIGHsrc/twisted/test/test_sip.py631 self.assertEqual(uri.toString(), "sip:joe@client.com:5060")CODE
HIGHsrc/twisted/test/test_sip.py673 self.proxy.datagramReceived(r.toString(), ("client.com", 5060))CODE
HIGHsrc/twisted/test/test_sip.py681 self.proxy.datagramReceived(r.toString(), ("client.com", 5060))CODE
HIGHsrc/twisted/web/test/test_static.py1229 If there are multiple byte ranges but only one is non-null, theSTRING
HIGHsrc/twisted/web/test/requesthelper.py505 verify.verifyObject(IAddress, null)CODE
HIGHsrc/twisted/web/test/test_domhelpers.py215 "this string \" has && entities > < and some characters xml won't like<"CODE
HIGHsrc/twisted/persisted/styles.py299 will be made. If any of these methods are undefined, a warning messageSTRING
HIGHsrc/twisted/conch/manhole.py267 more = self.interpreter.push(line)STRING
HIGHsrc/twisted/conch/test/test_transport.py2213 S_REPLY (S_CT2 || S_PK1), and a valid signature over the exchangeCODE
HIGHsrc/twisted/conch/test/test_knownhosts.py167 self.assertEqual(self.entry.toString(), self.plaintextLine.rstrip(b"\n"))CODE
HIGHsrc/twisted/conch/test/test_knownhosts.py169 self.assertEqual(multiHostEntry.toString(), self.hostIPLine.rstrip(b"\n"))CODE
HIGHsrc/twisted/conch/test/test_knownhosts.py205 self.assertEqual(self.entry.toString(), self.hashedLine.rstrip(b"\n"))CODE
HIGHsrc/twisted/conch/test/test_knownhosts.py284 self.assertEqual(b" This is a bogus entry. ", self.entry.toString())CODE
HIGHsrc/twisted/conch/test/test_knownhosts.py303 self.assertEqual(b" This is a bogus entry. ", self.entry.toString())CODE
HIGHsrc/twisted/conch/test/test_knownhosts.py469 self.assertEqual(entry.toString() + b"\n", path.getContent())CODE
HIGHsrc/twisted/conch/test/test_knownhosts.py717 hostsFileObj.write(entry.toString() + b"\n")CODE
HIGHsrc/twisted/conch/ssh/keys.py342 string k || aSTRING
HIGHsrc/twisted/conch/ssh/keys.py1360 string k || aSTRING
HIGHsrc/twisted/conch/client/knownhosts.py540 b"\n".join([entry.toString() for entry in self._added]) + b"\n"CODE
HIGHsrc/twisted/scripts/_twistd_unix.py365 os.dup2(null, i)CODE
HIGHsrc/twisted/scripts/_twistd_unix.py369 os.close(null)CODE
HIGH⚡src/twisted/protocols/sip.py820 log.msg(f"Sending {message.toString()!r} to {destURL!r}")CODE
HIGH⚡src/twisted/protocols/sip.py821 data = message.toString()CODE
HIGHsrc/twisted/protocols/sip.py374 return self.toString()CODE
HIGHsrc/twisted/protocols/sip.py556 return "<SIP Request %d:%s %s>" % (id(self), self.method, self.uri.toString())CODE
HIGHsrc/twisted/protocols/sip.py559 return f"{self.method} {self.uri.toString()} SIP/2.0"CODE
HIGHsrc/twisted/protocols/sip.py766 log.msg(f"Received {m.toString()!r} from {addr!r}")CODE
HIGHsrc/twisted/protocols/sip.py781 message.headers["via"][0] = senderVia.toString()CODE
HIGHsrc/twisted/protocols/sip.py785 message.headers["via"][0] = senderVia.toString()CODE
HIGHsrc/twisted/protocols/sip.py958 if viaHeader.toString() in message.headers["via"]:CODE
HIGHsrc/twisted/protocols/sip.py963 message.headers["via"].insert(0, viaHeader.toString())CODE
HIGHsrc/twisted/protocols/sip.py1155 response.addHeader("contact", registration.contactURL.toString())CODE
HIGHsrc/twisted/protocols/sip.py1183 msg.headers.setdefault("contact", []).append(registration.contactURL.toString())CODE
2 more matches not shown…
Deep Nesting217 hits · 204 pts
SeverityFileLineSnippetContext
LOWdocs/core/examples/dbcred.py93CODE
LOWdocs/core/examples/threadedselect/pygamedemo.py64CODE
LOWsrc/twisted/plugin.py115CODE
LOWsrc/twisted/plugin.py200CODE
LOWsrc/twisted/words/xish/utility.py243CODE
LOWsrc/twisted/words/xish/utility.py274CODE
LOWsrc/twisted/words/xish/xpath.py206CODE
LOWsrc/twisted/words/xish/xpath.py218CODE
LOWsrc/twisted/words/protocols/irc.py194CODE
LOWsrc/twisted/words/protocols/irc.py3824CODE
LOWsrc/twisted/names/server.py484CODE
LOWsrc/twisted/names/client.py167CODE
LOWsrc/twisted/names/authority.py107CODE
LOWsrc/twisted/names/authority.py137CODE
LOWsrc/twisted/names/authority.py226CODE
LOWsrc/twisted/names/authority.py352CODE
LOWsrc/twisted/names/root.py143CODE
LOWsrc/twisted/names/root.py174CODE
LOWsrc/twisted/logger/_json.py193CODE
LOWsrc/twisted/logger/_util.py13CODE
LOWsrc/twisted/logger/_legacy.py95CODE
LOWsrc/twisted/test/test_cooperator.py383CODE
LOWsrc/twisted/python/deprecate.py632CODE
LOWsrc/twisted/python/lockfile.py144CODE
LOWsrc/twisted/python/util.py310CODE
LOWsrc/twisted/python/util.py432CODE
LOWsrc/twisted/python/util.py794CODE
LOWsrc/twisted/python/util.py577CODE
LOWsrc/twisted/python/zipstream.py276CODE
LOWsrc/twisted/python/htmlizer.py31CODE
LOWsrc/twisted/python/failure.py42CODE
LOWsrc/twisted/python/failure.py313CODE
LOWsrc/twisted/python/text.py11CODE
LOWsrc/twisted/python/filepath.py468CODE
LOWsrc/twisted/python/filepath.py982CODE
LOWsrc/twisted/python/filepath.py1684CODE
LOWsrc/twisted/python/modules.py114CODE
LOWsrc/twisted/python/modules.py418CODE
LOWsrc/twisted/python/_shellcomp.py38CODE
LOWsrc/twisted/python/_shellcomp.py470CODE
LOWsrc/twisted/python/rebuild.py118CODE
LOWsrc/twisted/python/reflect.py534CODE
LOWsrc/twisted/mail/relaymanager.py1008CODE
LOWsrc/twisted/mail/alias.py51CODE
LOWsrc/twisted/mail/alias.py677CODE
LOWsrc/twisted/mail/imap4.py4355CODE
LOWsrc/twisted/mail/imap4.py4434CODE
LOWsrc/twisted/mail/imap4.py4596CODE
LOWsrc/twisted/mail/imap4.py4627CODE
LOWsrc/twisted/mail/imap4.py4742CODE
LOWsrc/twisted/mail/imap4.py4860CODE
LOWsrc/twisted/mail/imap4.py6131CODE
LOWsrc/twisted/mail/imap4.py6165CODE
LOWsrc/twisted/mail/imap4.py2186CODE
LOWsrc/twisted/mail/imap4.py2690CODE
LOWsrc/twisted/mail/imap4.py3161CODE
LOWsrc/twisted/mail/imap4.py3434CODE
LOWsrc/twisted/mail/imap4.py3912CODE
LOWsrc/twisted/mail/imap4.py4062CODE
LOWsrc/twisted/mail/imap4.py5946CODE
157 more matches not shown…
Self-Referential Comments53 hits · 158 pts
SeverityFileLineSnippetContext
MEDIUMdocs/conf.py5# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUM⚡docs/core/examples/ftpserver.py33# Create a pass.dat file which looks like this:COMMENT
MEDIUMdocs/core/examples/dbcred.py161 # Create the table that will be usedCOMMENT
MEDIUMdocs/core/examples/ftpclient.py80 # Create the clientCOMMENT
MEDIUMdocs/core/examples/ftpclient.py112 # Create a bufferCOMMENT
MEDIUMdocs/mail/examples/smtpclient_tls.py38 # Create a TLS context factory.COMMENT
MEDIUMsrc/twisted/_version.py5# This file is auto-generated! Do not edit!COMMENT
MEDIUMsrc/twisted/words/xish/domish.py99 # Create the starttagCOMMENT
MEDIUMsrc/twisted/words/test/test_irc.py2396 # Create a lot of pings, more than MAX_PINGRINGCOMMENT
MEDIUMsrc/twisted/words/test/test_service.py36 # Creating the same user again should notCOMMENT
MEDIUMsrc/twisted/words/test/test_jabbercomponent.py133 # Create a write listCOMMENT
MEDIUMsrc/twisted/names/dns.py2849 # Create a mapping from record types to their corresponding Record_*COMMENT
MEDIUMsrc/twisted/names/test/test_client.py1064 # Create a resolver pointed at an invalid server - we won't be hittingCOMMENT
MEDIUMsrc/twisted/logger/_legacy.py64 # Create an object that implements __str__() in order to defer theCOMMENT
MEDIUMsrc/twisted/test/test_defer.py1316 # Create a synchronous Deferred that has a callback 'cb' that returnsCOMMENT
MEDIUMsrc/twisted/test/test_defer.py1388 # Create a synchronous Deferred that has a callback 'cb' that returnsCOMMENT
MEDIUM⚡src/twisted/test/test_defer.py1739 # Create a canceller and weak reference to track if its been freed.COMMENT
MEDIUM⚡src/twisted/test/test_defer.py1743 # Create a Deferred with the above canceller, adding a reference to theCOMMENT
MEDIUM⚡src/twisted/test/test_defer.py1768 # Create a canceller and weak reference to track if its been freed.COMMENT
MEDIUM⚡src/twisted/test/test_defer.py1772 # Create a Deferred with the above canceller, adding a reference to theCOMMENT
MEDIUM⚡src/twisted/test/test_defer.py1801 # Create a canceller and weak reference to track if its been freed.COMMENT
MEDIUM⚡src/twisted/test/test_defer.py1805 # Create a Deferred with the above canceller, adding a reference to theCOMMENT
MEDIUMsrc/twisted/test/test_defer.py4016 # Create an object and weak reference to track if its gotten freed.COMMENT
MEDIUMsrc/twisted/test/test_ftp.py132 # Create a directoryCOMMENT
MEDIUMsrc/twisted/test/test_ftp.py3100 # Create a client, and give it a greeting.COMMENT
MEDIUMsrc/twisted/test/test_ftp.py3121 # Create a client, and give it a greeting.COMMENT
MEDIUMsrc/twisted/test/test_policies.py868 # Define an overflow protocolCOMMENT
MEDIUMsrc/twisted/test/test_tcp.py1001 # Create the server port to which a connection will be made.COMMENT
MEDIUMsrc/twisted/test/test_tcp.py1060 # Create the client and initiate the connectionCOMMENT
MEDIUMsrc/twisted/python/twisted-completion.zsh12# This file is included in the official Zsh distribution asCOMMENT
MEDIUMsrc/twisted/python/test/test_components.py110 # Create a brand new, empty registry and put it onto the componentsCOMMENT
MEDIUMsrc/twisted/python/test/test_zippath.py86 # Create a path to the file rooted in the current working directoryCOMMENT
MEDIUMsrc/twisted/python/test/test_zippath.py117 # Create a path to the file rooted in the current working directoryCOMMENT
MEDIUMsrc/twisted/mail/test/test_smtp.py999 # Create a server which will fail the first message deliver attempt toSTRING
MEDIUMsrc/twisted/mail/test/test_mailmail.py221 # Create a config file with some invalid valuesCOMMENT
MEDIUMsrc/twisted/trial/unittest.py13# Define the public API from the two implementation modulesCOMMENT
MEDIUMsrc/twisted/trial/_dist/disttrial.py388 # Create a worker pool to use to execute them.COMMENT
MEDIUMsrc/twisted/trial/test/sample.py1"""This module is used by test_loader to test the Trial test loadingSTRING
MEDIUMsrc/twisted/web/test/test_xml.py706 # Create the root in one namespace. Microdom will probably make thisSTRING
MEDIUMsrc/twisted/web/test/test_xml.py775 # Create a child with a specific namespace with a prefix bound to it.STRING
MEDIUMsrc/twisted/web/test/test_xml.py780 # Create a child of that which has the outer namespace.STRING
MEDIUMsrc/twisted/spread/flavors.py373 """This method is called when a client has stopped observing me.STRING
MEDIUMsrc/twisted/internet/epollreactor.py76 # Create the poller we're going to use. The 1024 here is just a hintCOMMENT
MEDIUMsrc/twisted/internet/_threadedselect.py289 # The following methods are mostly for test-suite support, to makeCOMMENT
MEDIUMsrc/twisted/internet/tcp.py1223 # The following block should not run arbitrary codeCOMMENT
MEDIUMsrc/twisted/internet/tcp.py1374 # Create a new socket and make it listenCOMMENT
MEDIUMsrc/twisted/internet/udp.py199 # Create a new socket and make it listenCOMMENT
MEDIUMsrc/twisted/internet/defer.py1814 # This function is complicated by the need to prevent unbounded recursionCOMMENT
MEDIUMsrc/twisted/internet/ssl.py109 # Create a context object right now. This is to force validation ofCOMMENT
MEDIUMsrc/twisted/internet/base.py999 # This function is called twice per reactor iteration, once inCOMMENT
MEDIUMsrc/twisted/internet/test/test_posixprocess.py218 # Create a new instanceCOMMENT
MEDIUMsrc/twisted/internet/test/test_process.py238 # Create the process with no shared file descriptors, so that thereCOMMENT
MEDIUMsrc/twisted/internet/test/test_inlinecb.py402 # Create an object and weak reference to track if its gotten freed.COMMENT
Hallucination Indicators11 hits · 130 pts
SeverityFileLineSnippetContext
CRITICALsrc/twisted/web/test/test_distrib.py79 self.sub.publisher.broker.transport.loseConnection()CODE
CRITICALsrc/twisted/web/test/test_wsgi.py631 # twisted.test.test_web.DummyChannel.transport.getHost().hostCOMMENT
CRITICALsrc/twisted/conch/unix.py195 ipAddress = self.avatar.conn.transport.transport.getPeer().hostCODE
CRITICALsrc/twisted/conch/unix.py238 peer = self.avatar.conn.transport.transport.getPeer()CODE
CRITICALsrc/twisted/conch/unix.py239 host = self.avatar.conn.transport.transport.getHost()CODE
CRITICAL⚡src/twisted/conch/unix.py258 self.avatar.conn.transport.transport.setTcpNoDelay(1)CODE
CRITICAL⚡src/twisted/conch/unix.py266 peer = self.avatar.conn.transport.transport.getPeer()CODE
CRITICAL⚡src/twisted/conch/unix.py267 host = self.avatar.conn.transport.transport.getHost()CODE
CRITICALsrc/twisted/conch/unix.py285 self.avatar.conn.transport.transport.setTcpNoDelay(1)CODE
CRITICALsrc/twisted/conch/test/test_recvline.py445 return self.avatar.conn.transport.factory.serverProtocol()CODE
CRITICALsrc/twisted/spread/test/test_pb.py626 self.server.factory.protocolInstance.transport.loseConnection()CODE
Modern Structural Boilerplate133 hits · 128 pts
SeverityFileLineSnippetContext
LOWdocs/development/listings/new_module_template.py10__all__ = []CODE
LOWsrc/twisted/copyright.py9__all__ = ["copyright", "disclaimer", "longversion", "version"]CODE
LOWsrc/twisted/_version.py11__all__ = ["__version__"]CODE
LOWsrc/twisted/plugin.py262__all__ = ["getPlugins", "pluginPackagePaths"]CODE
LOWsrc/twisted/words/service.py1271__all__ = [CODE
LOWsrc/twisted/words/iwords.py276__all__ = [CODE
LOWsrc/twisted/words/ewords.py34__all__ = [CODE
LOWsrc/twisted/words/protocols/jabber/xmlstream.py1114__all__ = [CODE
LOWsrc/twisted/names/error.py83__all__ = [CODE
LOWsrc/twisted/names/dns.py38__all__ = [CODE
LOWsrc/twisted/names/secondary.py6__all__ = ["SecondaryAuthority", "SecondaryAuthorityService"]CODE
LOWsrc/twisted/names/_rfc1982.py261__all__ = ["SerialNumber"]CODE
LOWsrc/twisted/logger/__init__.py42__all__ = [CODE
LOWsrc/twisted/test/test_plugin.py361__all__ = []CODE
LOWsrc/twisted/test/proto_helpers.py12__all__ = [CODE
LOWsrc/twisted/test/test_modules.py330 def _setupSysPath(self) -> None:CODE
LOWsrc/twisted/test/test_modules.py399 def _setupSysPath(self) -> None:CODE
LOWsrc/twisted/test/test_modules.py415 def _setupSysPath(self) -> None:CODE
LOWsrc/twisted/test/test_modules.py494__all__ = [CODE
LOWsrc/twisted/enterprise/__init__.py8__all__ = ["adbapi"]CODE
LOWsrc/twisted/enterprise/adbapi.py478__all__ = ["Transaction", "ConnectionPool"]CODE
LOWsrc/twisted/python/_tzhelper.py18__all__ = [CODE
LOWsrc/twisted/python/deprecate.py84__all__ = [CODE
LOWsrc/twisted/python/randbytes.py128__all__ = ["secureRandom", "insecureRandom", "SecureRandomNotAvailable"]CODE
LOWsrc/twisted/python/threadable.py137__all__ = ["isInIOThread", "registerAsIOThread", "getThreadID", "XLock"]CODE
LOWsrc/twisted/python/lockfile.py241__all__ = ["FilesystemLock", "isLocked"]CODE
LOWsrc/twisted/python/compat.py586__all__ = [CODE
LOWsrc/twisted/python/util.py949__all__ = [STRING
LOWsrc/twisted/python/_url.py11__all__ = ["URL"]CODE
LOWsrc/twisted/python/systemd.py14__all__ = ["ListenFDs"]CODE
LOWsrc/twisted/python/_textattributes.py305__all__ = ["flatten", "DefaultFormattingState", "CharacterAttributesMixin"]CODE
LOWsrc/twisted/python/zippath.py340__all__ = ["ZipArchive", "ZipPath"]CODE
LOWsrc/twisted/python/runtime.py7__all__ = [CODE
LOWsrc/twisted/python/sendmsg.py13__all__ = ["sendmsg", "recvmsg", "getSocketFamily", "SCM_RIGHTS"]CODE
LOWsrc/twisted/python/url.py13__all__ = [CODE
LOWsrc/twisted/python/fakepwd.py11__all__ = ["UserDatabase", "ShadowDatabase"]CODE
LOWsrc/twisted/python/versions.py13__all__ = ["Version", "getVersionString", "IncomparableVersions"]CODE
LOWsrc/twisted/python/components.py421__all__ = [CODE
LOWsrc/twisted/python/reflect.py653__all__ = [CODE
LOWsrc/twisted/plugins/twisted_reactors.py7__all__ = []CODE
LOWsrc/twisted/mail/interfaces.py1035__all__ = [CODE
LOWsrc/twisted/mail/imap4.py6226__all__ = [CODE
LOWsrc/twisted/mail/_cred.py99__all__ = [CODE
LOWsrc/twisted/mail/pop3.py1694__all__ = [CODE
LOWsrc/twisted/mail/smtp.py66__all__ = [CODE
LOWsrc/twisted/trial/unittest.py28__all__ = [CODE
LOWsrc/twisted/trial/runner.py12__all__ = [CODE
LOWsrc/twisted/trial/util.py32__all__ = [CODE
LOWsrc/twisted/trial/_dist/test/matchers.py8__all__ = [CODE
LOWsrc/twisted/web/server.py48__all__ = [CODE
LOWsrc/twisted/web/error.py9__all__ = [CODE
LOWsrc/twisted/web/xmlrpc.py624__all__ = [STRING
LOWsrc/twisted/web/util.py9__all__ = [CODE
LOWsrc/twisted/web/client.py1802__all__ = [CODE
LOWsrc/twisted/web/resource.py12__all__ = [CODE
LOWsrc/twisted/web/iweb.py830__all__ = [CODE
LOWsrc/twisted/web/http_headers.py275__all__ = ["Headers"]STRING
LOWsrc/twisted/web/http.py37__all__ = [CODE
LOWsrc/twisted/web/http.py3410 def _set_logFile(self, newLogFile: BufferedIOBase | _MinimalLogFile) -> None:STRING
LOWsrc/twisted/web/http.py3422 def _updateLogDateTime(self) -> None:STRING
73 more matches not shown…
Excessive Try-Catch Wrapping79 hits · 90 pts
SeverityFileLineSnippetContext
LOWdocs/core/examples/stdiodemo.py47 except Exception as e:CODE
LOWdocs/mail/examples/smtpclient_tls.py104 except Exception as e:CODE
LOWsrc/twisted/words/protocols/jabber/sasl.py94 except Exception as e:CODE
LOWsrc/twisted/names/tap.py95 except Exception:CODE
LOWsrc/twisted/names/tap.py101 except Exception:CODE
LOWsrc/twisted/logger/_observer.py84 except Exception:CODE
LOWsrc/twisted/logger/_logger.py242 except Exception:STRING
LOWsrc/twisted/logger/_format.py352 except Exception:CODE
LOWsrc/twisted/test/test_defer.py3790 except Exception:CODE
LOWsrc/twisted/test/test_defer.py3955 except Exception:CODE
LOWsrc/twisted/test/test_adbapi.py710 except Exception:CODE
MEDIUMsrc/twisted/test/test_adbapi.py450def can_connect(self):CODE
LOWsrc/twisted/test/test_usage.py399 except Exception as e:CODE
LOWsrc/twisted/test/test_threads.py139 except Exception as e:CODE
MEDIUMsrc/twisted/test/test_threads.py136def threadedFunc():CODE
LOWsrc/twisted/test/test_udp.py490 except Exception:CODE
LOWsrc/twisted/python/log.py430 except Exception as e:CODE
LOWsrc/twisted/python/rebuild.py215 except Exception:CODE
LOWsrc/twisted/python/test/test_shellcomp.py78 except Exception as e:CODE
MEDIUMsrc/twisted/mail/imap4.py1156def _setupChallenge(self, chal, tag):CODE
LOWsrc/twisted/mail/imap4.py729 except Exception as e:CODE
LOWsrc/twisted/mail/imap4.py1159 except Exception as e:CODE
LOWsrc/twisted/mail/imap4.py3451 except Exception as e:CODE
LOWsrc/twisted/trial/_asynctest.py226 except Exception:CODE
LOWsrc/twisted/trial/_dist/disttrial.py273 except Exception:CODE
LOWsrc/twisted/trial/_dist/disttrial.py363 except Exception:CODE
MEDIUMsrc/twisted/trial/_dist/disttrial.py360def task(case):CODE
LOWsrc/twisted/trial/test/test_reporter.py635 except Exception as e:CODE
LOWsrc/twisted/trial/test/test_reporter.py781 except Exception as e:CODE
MEDIUMsrc/twisted/trial/test/test_reporter.py355def setUp(self):CODE
LOWsrc/twisted/trial/test/matchers.py44 except Exception as e:CODE
LOWsrc/twisted/web/_flatten.py419 except Exception as e:CODE
LOWsrc/twisted/web/xmlrpc.py144 except Exception as e:CODE
LOWsrc/twisted/web/xmlrpc.py179 except Exception as e:CODE
LOWsrc/twisted/web/xmlrpc.py189 except Exception:CODE
LOWsrc/twisted/web/test/test_error.py278 except Exception as e:CODE
LOWsrc/twisted/persisted/_tokenize.py891 except Exception as err:CODE
LOWsrc/twisted/conch/checkers.py237 except Exception: # any error should be treated as a failed loginCODE
LOWsrc/twisted/conch/checkers.py638 except Exception as e: # Any error should be treated as a failed loginCODE
LOWsrc/twisted/conch/openssh_compat/factory.py36 except Exception as e:CODE
LOWsrc/twisted/conch/openssh_compat/factory.py61 except Exception as e:CODE
LOWsrc/twisted/conch/ssh/transport.py720 except Exception:CODE
LOWsrc/twisted/conch/ssh/session.py174 except Exception:CODE
LOWsrc/twisted/conch/ssh/session.py198 except Exception:CODE
LOWsrc/twisted/conch/ssh/session.py208 except Exception:CODE
LOWsrc/twisted/conch/ssh/connection.py166 except Exception as e:CODE
LOWsrc/twisted/conch/ssh/filetransfer.py88 except Exception:CODE
LOWsrc/twisted/conch/scripts/conch.py344 except Exception:STRING
LOWsrc/twisted/conch/scripts/ckeygen.py282 except Exception as e:STRING
LOWsrc/twisted/conch/client/knownhosts.py617 except Exception:CODE
LOWsrc/twisted/cred/strcred.py197 except Exception as e:CODE
LOWsrc/twisted/internet/asyncioreactor.py143 except Exception as e:CODE
LOWsrc/twisted/internet/selectreactor.py72 except Exception as e:CODE
LOWsrc/twisted/internet/tcp.py1042 except Exception:CODE
MEDIUMsrc/twisted/internet/tcp.py288def _closeWriteConnection(self) -> None:CODE
LOWsrc/twisted/internet/test/test_inotify.py269 except Exception:CODE
LOWsrc/twisted/internet/test/test_inotify.py297 except Exception:CODE
LOWsrc/twisted/internet/test/test_inotify.py305 except Exception:CODE
LOWsrc/twisted/internet/test/test_inotify.py337 except Exception:CODE
LOWsrc/twisted/internet/test/test_inotify.py424 except Exception:CODE
19 more matches not shown…
Over-Commented Block84 hits · 84 pts
SeverityFileLineSnippetContext
LOWcodecov.yml21 # New code should have 100% CI coverage as the minimumCOMMENT
LOWlowest-constraints.txt1#COMMENT
LOWlowest-constraints.txt41COMMENT
LOW.readthedocs.yml1version: 2COMMENT
LOWtox.ini161COMMENT
LOWadmin/black_separate_commits.sh1#!/bin/bashCOMMENT
LOWdocs/conf.py1#COMMENT
LOWdocs/conf.py101COMMENT
LOWdocs/core/examples/tls_alpn_client.py21"""COMMENT
LOWdocs/core/examples/tls_alpn_client.py41# how it affects the result.COMMENT
LOWdocs/core/examples/ftpserver.py21# current working directory.COMMENT
LOWdocs/core/examples/ftpserver.py41COMMENT
LOWdocs/conch/examples/sshsimpleserver.py61# You would need a list for each SSH key size that you plan to support in yourCOMMENT
LOW.github/workflows/test.yaml61 runs-on: "${{ matrix.runs-on || 'ubuntu-26.04' }}"COMMENT
LOW.github/workflows/test.yaml81 # Just use the default OS.COMMENT
LOW.github/workflows/test.yaml101COMMENT
LOWsrc/twisted/words/xish/xpathparser.py1# -*- test-case-name: twisted.words.test.test_xpath -*-COMMENT
LOWsrc/twisted/words/xish/xpathparser.py21# hasn't been touched since 2003 and has not been updated to work withCOMMENT
LOWsrc/twisted/words/xish/domish.py901 if prefix is None:COMMENT
LOWsrc/twisted/words/xish/domish.py921COMMENT
LOWsrc/twisted/words/test/test_xpath.py21 # </bar>COMMENT
LOWsrc/twisted/words/im/interfaces.py1# -*- Python -*-COMMENT
LOWsrc/twisted/test/test_task.py581 # The amount of time to let pass (the number of 1 second steps toCOMMENT
LOWsrc/twisted/test/test_pcp.py1# -*- Python -*-COMMENT
LOWsrc/twisted/test/test_pcp.py21# - has a method write()COMMENT
LOWsrc/twisted/test/test_pcp.py381# would hang on the last block.)COMMENT
LOWsrc/twisted/test/test_log.py701 # the '_collectWarnings' function which collects all warnings as aCOMMENT
LOWsrc/twisted/test/test_process.py1101 """COMMENT
LOWsrc/twisted/test/test_tcp.py481 def test_connectionRefusedErrorNumber(self):COMMENT
LOWsrc/twisted/test/test_tcp.py1041 msg("UnreadingWriter.connectionMade write")COMMENT
LOWsrc/twisted/test/test_udp.py581 # udp.Port's doRead calls recvfrom() in a loop, as an optimization.COMMENT
LOWsrc/twisted/test/test_modules.py61 """COMMENT
LOWsrc/twisted/python/twisted-completion.zsh1#compdef twist twistd trial conch cftp ckeygen pyhtmlizer tkconchCOMMENT
LOWsrc/twisted/python/systemd.py121 try:COMMENT
LOWsrc/twisted/python/_inotify.py61 # an exception and we need to ignore the problem, one ofCOMMENT
LOWsrc/twisted/mail/imap4.py2081 # It's important to run this *after* resetting the timeout to "rigCOMMENT
LOWsrc/twisted/mail/imap4.py3361 def __cbList(self, result, command):COMMENT
LOWsrc/twisted/mail/imap4.py3981 # ["BODY", ["TEXT"], VALUE]COMMENT
LOWsrc/twisted/trial/_asynctest.py421 # web/test/test_webclient.py:COMMENT
LOWsrc/twisted/trial/test/scripttest.py1#!/usr/bin/env pythonCOMMENT
LOWsrc/twisted/web/_http2.py281 # handler that allows it to push data into the H2Stream. The H2Stream thenCOMMENT
LOWsrc/twisted/web/_http2.py301 # streams off in priority order.COMMENT
LOWsrc/twisted/web/sux.py521COMMENT
LOWsrc/twisted/web/_newclient.py201 """COMMENT
LOWsrc/twisted/web/_newclient.py821 # cancellation to the producer.COMMENT
LOWsrc/twisted/web/wsgi.py21from twisted.web.resource import IResourceCOMMENT
LOWsrc/twisted/web/wsgi.py281 self.environ.update(COMMENT
LOWsrc/twisted/web/wsgi.py401 # that underlying implementation does not, as yet, provide any way toCOMMENT
LOWsrc/twisted/conch/test/test_filetransfer.py701COMMENT
LOWsrc/twisted/conch/ssh/filetransfer.py41 # (format all requests follow) is a 4 byte length prefix, a 1 byteCOMMENT
LOWsrc/twisted/conch/scripts/cftp.py921 f = open(fn)COMMENT
LOWsrc/twisted/conch/scripts/cftp.py941 # can be passed with SSH_MSG_CHANNEL_EXTENDED_DATA messages, where aCOMMENT
LOWsrc/twisted/conch/scripts/cftp.py961 # (end of RFC quotations)COMMENT
LOWsrc/twisted/conch/insults/insults.py321 ECMA 48 standardized modesCOMMENT
LOWsrc/twisted/spread/pb.py541 self.failures = []COMMENT
LOWsrc/twisted/spread/test/test_banana.py301COMMENT
LOWsrc/twisted/internet/task.py261 assert self.starttime is not NoneCOMMENT
LOWsrc/twisted/internet/_sslverify.py1841 _expandCipherString(COMMENT
LOWsrc/twisted/internet/_glibbase.py181 # We don't actually know which versions of gtk do this so this mightCOMMENT
LOWsrc/twisted/internet/tcp.py1081COMMENT
24 more matches not shown…
AI Slop Vocabulary25 hits · 47 pts
SeverityFileLineSnippetContext
MEDIUM⚡src/twisted/words/test/test_jabbercomponent.py144 # Ensure the test service harness got notifiedCOMMENT
MEDIUM⚡src/twisted/words/test/test_jabbercomponent.py150 # Ensure the test service harness got notifiedCOMMENT
MEDIUM⚡src/twisted/words/test/test_jabbercomponent.py156 # Ensure the test service harness got notifiedCOMMENT
LOWsrc/twisted/test/test_failure.py745 # it will just use None.COMMENT
LOWsrc/twisted/test/test_tcp.py652 # just call that directly. Some other test can make sure thatCOMMENT
MEDIUMsrc/twisted/test/test_persisted.py411 # test more comprehensive, is welcome to do so.COMMENT
LOWsrc/twisted/python/test/test_shellcomp.py360 # docstring for opt_silly is useless so it should just use theCOMMENT
LOWsrc/twisted/mail/tap.py256 # If there are any services set up, just return those.STRING
LOWsrc/twisted/mail/test/test_imap.py7092 # be re-written to just use the default adapter for IMailbox toSTRING
LOWsrc/twisted/web/_http2.py291 # For flow control, we simply use the equivalent of the IPushProducerCOMMENT
LOWsrc/twisted/web/_http2.py898 # to expose it. So we just set it to None.COMMENT
MEDIUMsrc/twisted/web/test/test_web.py352 # HELLLLLLLLLLP! This harness is Very Ugly.COMMENT
MEDIUMsrc/twisted/web/test/test_newclient.py2837 # The protocol reference should be dropped, too, to facilitate GC orCOMMENT
LOWsrc/twisted/web/test/test_http2.py908 # This should not raise an exception, the function will just returnCOMMENT
LOWsrc/twisted/web/test/test_http2.py1014 # That's absurdly hard, so instead we'll just call it ourselves. ForCOMMENT
LOWsrc/twisted/web/test/test_http2.py1552 # That's absurdly hard, so instead we'll just call it ourselves. ForCOMMENT
LOWsrc/twisted/conch/manhole.py376 # We couldn't do it. Strange. Oh well, just add the character.STRING
LOWsrc/twisted/internet/task.py276 # Finally, if everything else is normal, we just return theCOMMENT
LOWsrc/twisted/internet/asyncioreactor.py197 # We don't have it, so just return OK.COMMENT
LOWsrc/twisted/internet/asyncioreactor.py220 # We don't have it, so just return OK.COMMENT
LOWsrc/twisted/internet/defer.py811 # if provided, otherwise just use L{cancelledToTimedOutError}COMMENT
LOWsrc/twisted/internet/posixbase.py167 # Otherwise just use the base behaviorCOMMENT
LOWsrc/twisted/internet/test/test_protocol.py195 # Cancel the Deferred, disconnecting the transport just set up andCOMMENT
LOWsrc/twisted/scripts/trial.py326 # we just add that to the test suite.STRING
LOWsrc/twisted/protocols/ftp.py2632 # so just return it instead of making a new oneCOMMENT
Hyper-Verbose Identifiers34 hits · 36 pts
SeverityFileLineSnippetContext
LOWbenchmarks/test_conch_ssh.py76async def test_connect_and_disconnect():CODE
LOWbenchmarks/test_log_publisher.py20def test_log_publisher_call_dispatch(benchmark):CODE
LOWbenchmarks/test_log_publisher.py41def test_log_publisher_add_remove(benchmark):CODE
LOWbenchmarks/test_web_server.py76def test_bit_more_complex_response(benchmark):CODE
LOWbenchmarks/test_deferred.py17def test_deferred_await_unfired(benchmark):CODE
LOWbenchmarks/test_deferred.py42def test_deferred_callback_chain_fires_at_start(benchmark):CODE
LOWbenchmarks/test_deferred.py59def test_deferred_callback_chain_fires_at_end(benchmark):CODE
LOWbenchmarks/test_deferred.py76def test_deferred_errback_chain(benchmark):CODE
LOWbenchmarks/test_deferred.py104def test_deferred_chained_already_fired(benchmark):CODE
LOWbenchmarks/test_deferred.py126def test_deferred_chained_not_fired(benchmark):CODE
LOWbenchmarks/test_web_client.py25def test_http_client_small_response(benchmark):CODE
LOW⚡src/twisted/test/test_defer.py1733 def test_canceller_circular_reference_callback(self) -> None:CODE
LOW⚡src/twisted/test/test_defer.py1762 def test_canceller_circular_reference_errback(self) -> None:CODE
LOW⚡src/twisted/test/test_defer.py1794 def test_canceller_circular_reference_non_final(self) -> None:CODE
LOWsrc/twisted/test/test_paths.py737 def test_getAndSet(self) -> None:CODE
LOWsrc/twisted/test/test_application.py988 def test_calculates_correct_values(self):CODE
LOWsrc/twisted/test/test_application.py999 def test_does_not_overflow_on_high_attempts(self):CODE
LOWsrc/twisted/test/test_application.py1011 def test_does_not_overflow_with_large_factor_value(self):CODE
LOWsrc/twisted/trial/test/test_runner.py327 def test_runner_can_get_reporter(self):CODE
LOWsrc/twisted/trial/test/test_runner.py363 def test_runner_working_directory(self):CODE
LOWsrc/twisted/web/domhelpers.py86def getAndClear(node, nodeId):CODE
LOWsrc/twisted/web/test/test_domhelpers.py151 def test_getAndClear(self):CODE
LOWsrc/twisted/conch/unix.py124 def global_cancel_tcpip_forward(self, data):CODE
LOWsrc/twisted/conch/test/test_userauth.py755 def test_unsupported_publickey(self):CODE
LOWsrc/twisted/conch/test/test_userauth.py1044 def test_publickey_without_privatekey(self):CODE
LOWsrc/twisted/conch/test/test_session.py561 def test_client_closed_with_env_subsystem(self):CODE
LOWsrc/twisted/conch/test/test_conch.py673 def test_unsupported_algorithm(self):CODE
LOWsrc/twisted/conch/test/test_filetransfer.py162 def test_interface_implementation(self):CODE
LOWsrc/twisted/conch/test/test_ssh.py120 def global_cancel_tcpip_forward(self, data):CODE
LOWsrc/twisted/conch/ssh/userauth.py709 def auth_keyboard_interactive(self) -> bool:CODE
LOWsrc/twisted/internet/test/test_process.py940 def test_process_unregistered_before_protocol_ended_callback(self):CODE
LOWsrc/twisted/internet/test/test_tcp.py787 def test_getaddrinfo_negative_port(self):CODE
LOWsrc/twisted/internet/test/test_tcp.py813 def test_getaddrinfo_overflow_port(self):CODE
LOWsrc/twisted/protocols/test/test_tls.py1926 def test_writes_get_aggregated(self, writes: list[bytes | None]) -> None:CODE
AI Structural Patterns32 hits · 32 pts
SeverityFileLineSnippetContext
LOWsrc/twisted/words/protocols/jabber/sasl_mechanisms.py263CODE
LOWsrc/twisted/names/dns.py1448CODE
LOWsrc/twisted/names/dns.py2409CODE
LOWsrc/twisted/names/dns.py2634CODE
LOWsrc/twisted/names/dns.py2956CODE
LOWsrc/twisted/test/test_defer.py3547CODE
LOWsrc/twisted/test/test_defer.py3570CODE
LOWsrc/twisted/test/test_sslverify.py2106CODE
LOWsrc/twisted/python/rebuild.py115CODE
LOWsrc/twisted/web/_flatten.py77CODE
LOWsrc/twisted/web/client.py1325CODE
LOWsrc/twisted/web/http.py1321CODE
LOWsrc/twisted/web/microdom.py200CODE
LOWsrc/twisted/persisted/sob.py177CODE
LOWsrc/twisted/conch/client/knownhosts.py104CODE
LOWsrc/twisted/conch/insults/helper.py51CODE
LOWsrc/twisted/spread/flavors.py237CODE
LOWsrc/twisted/internet/_sslverify.py1291CODE
LOWsrc/twisted/internet/tcp.py698CODE
LOWsrc/twisted/internet/process.py595CODE
LOWsrc/twisted/internet/endpoints.py473CODE
LOWsrc/twisted/internet/test/test_defer_yieldfrom.py29CODE
LOWsrc/twisted/internet/test/test_defer_yieldfrom.py52CODE
LOWsrc/twisted/internet/test/test_defer_yieldfrom.py57CODE
LOWsrc/twisted/internet/test/test_defer_yieldfrom.py80CODE
LOWsrc/twisted/internet/test/test_defer_yieldfrom.py176CODE
LOWsrc/twisted/internet/test/test_defer_await.py52CODE
LOWsrc/twisted/internet/test/test_defer_await.py57CODE
LOWsrc/twisted/internet/test/test_defer_await.py80CODE
LOWsrc/twisted/internet/test/test_defer_await.py94CODE
LOWsrc/twisted/protocols/sip.py156CODE
LOWsrc/twisted/protocols/sip.py307CODE
Decorative Section Separators6 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUM⚡docs/core/examples/ftpserver.py35# =====================COMMENT
MEDIUM⚡docs/core/examples/ftpserver.py38# =====================COMMENT
MEDIUMsrc/twisted/words/xish/xmlstream.py70 ### --------------------------------------------------------------COMMENT
MEDIUMsrc/twisted/words/xish/xmlstream.py74 ### --------------------------------------------------------------COMMENT
MEDIUMsrc/twisted/words/xish/xmlstream.py109 ### --------------------------------------------------------------COMMENT
MEDIUMsrc/twisted/words/xish/xmlstream.py113 ### --------------------------------------------------------------COMMENT
Fake / Example Data15 hits · 9 pts
SeverityFileLineSnippetContext
LOWsrc/twisted/words/xish/domish.py372 >>> message['to'] = 'user@example.com'STRING
LOWsrc/twisted/words/xish/domish.py376 u"<message to='user@example.com'><body>Hi!</body></message>"STRING
LOWsrc/twisted/words/xish/domish.py393 u"<message to='user@example.com'><body>Hi!</body><envelope xmlns='http://example.com/'><presence xmlns=''/></envelSTRING
LOWsrc/twisted/mail/test/test_bounce.py34 "nonexistent@example.org",CODE
LOWsrc/twisted/mail/test/test_bounce.py41 self.assertEqual(mess["From"], "postmaster@example.org")CODE
LOWsrc/twisted/mail/test/test_bounce.py58 b"nonexistent@example.org",STRING
LOWsrc/twisted/mail/test/test_bounce.py65 self.assertEqual(mess["From"], "postmaster@example.org")STRING
LOWsrc/twisted/mail/test/test_bounce.py82 b"nonexistent@example.org",STRING
LOWsrc/twisted/mail/test/test_bounce.py90 self.assertEqual(mess["From"], "postmaster@example.org")STRING
LOWsrc/twisted/mail/test/test_bounce.py106 ioType(header + message), "moshez@example.com", "nonexistent@example.org"STRING
LOWsrc/twisted/mail/test/test_bounce.py111 self.assertEqual(mess["From"], "postmaster@example.org")STRING
LOWsrc/twisted/mail/test/test_mail.py270 self.address = b"user@example.com"CODE
LOWsrc/twisted/mail/test/test_smtp.py394 b"foo@bar.com",STRING
LOWsrc/twisted/mail/test/test_smtp.py1014 b"bob@example.org",STRING
LOWsrc/twisted/mail/test/test_smtp.py1662 self.clientProtocol.getMailFrom = lambda: "test@example.org"STRING
Overly Generic Function Names6 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/twisted/test/test_defer.py2689 def helper(resultValue: object, returnValue: object = None) -> object:CODE
LOWsrc/twisted/test/test_defer.py2762 def helper(arg: object) -> Deferred[None]:CODE
LOWsrc/twisted/test/test_reflect.py660 def test_function(self):CODE
LOWsrc/twisted/internet/test/test_testing.py447 def helper(self, test: Callable[..., object], obj: _SupportsName) -> None:CODE
LOW⚡src/twisted/protocols/sip.py826 def handle_request(self, message, addr):CODE
LOWsrc/twisted/protocols/sip.py924 def handle_request(self, message, addr):CODE
Slop Phrases4 hits · 5 pts
SeverityFileLineSnippetContext
LOWdocs/core/examples/shaper.py6look accurate with wget's rate-meter, don't forget to examine your networkSTRING
LOWsrc/twisted/test/test_process.py1458 # Don't forget to raise an error, or you'll end up in parentCOMMENT
LOWsrc/twisted/web/_newclient.py1592 # Currently the rest parameter is ignored. Don't forget to use it ifCOMMENT
LOWsrc/twisted/internet/base.py1021 # insert new delayed calls to make sure to include them in timeout valueCOMMENT
Redundant / Tautological Comments4 hits · 5 pts
SeverityFileLineSnippetContext
LOWtox.ini153 # Set this to `True` to run similar to Read The Docs.COMMENT
LOWdocs/conch/examples/sshsimpleclient.py34# Set CLIENT_RSA_PUBLIC to empty to not use SSH key auth.COMMENT
LOWsrc/twisted/web/http.py2084 # Check if we've run up against the trailer size limit: if the nextSTRING
LOWsrc/twisted/internet/tcp.py170 # Set SO_LINGER to 1,0 which, by convention, causes aCOMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/twisted/web/xmlrpc.py82 # event driven equivalent of 'raise UnimplementedError'COMMENT