Commit Graph

76 Commits

Author SHA1 Message Date
James Vega a3e4fc5b1d Change the modeline to use softtabstop instead of tabstop. 2006-02-11 15:52:51 +00:00
Jeremy Fincher 5b8400e158 Removed utils.iter.one, which was dumb, because iterators have a .next() method that does the same thing. 2005-07-08 09:14:45 +00:00
Jeremy Fincher b369039507 Added utils.iter.one, to grab one value from an iterable. 2005-06-12 04:54:15 +00:00
Jeremy Fincher b5f1e2a3e7 Added utils.iter.limited, an iterable that limits the number of elements that can be taken from another iterable. 2005-05-30 19:19:11 +00:00
James Vega 7bfc9cbdd3 utils/str: Rename nth to ordinal and have it return the full string instead of just the ordinal ending. 2005-05-09 17:20:43 +00:00
James Vega 9971e991fe Fix the modelines. 2005-03-23 20:07:45 +00:00
Jeremy Fincher 6b19504515 Changed the utils.iter.choice test to work bettar. 2005-03-14 18:55:11 +00:00
James Vega aefcd594df Move structures to utils/ 2005-03-12 18:01:47 +00:00
James Vega 568ebcdf96 Add tests for utils.iter.choice. 2005-02-18 13:40:29 +00:00
Jeremy Fincher 6aca01bafb Made utils.file.mktemp a little more stochastic. 2005-02-18 07:04:48 +00:00
Jeremy Fincher 8897e6458b Removed test/test_fix.py, moving its tests to test/test_utils.py, and fixed the resulting bugs that were discovered. 2005-02-01 07:08:30 +00:00
Jeremy Fincher 2b6994428e Fixed a bug that was introduced in nItems. 2005-02-01 07:06:36 +00:00
Jeremy Fincher 65893c8e3c Added emailRe to utils.net. 2005-02-01 06:34:58 +00:00
James Vega afc3c3f94a Fix some calls to pluralize to not use the extra argument. Also updated the pluralize tests. 2005-01-31 15:59:44 +00:00
Jeremy Fincher a19a979499 Robustified and improved utils.str.format a bit; added a simple test. 2005-01-28 15:23:18 +00:00
Jeremy Fincher 34f1fe6562 Swapped the argument order for nItems *again*. 2005-01-28 15:17:26 +00:00
Jeremy Fincher 5fd6bbb52d Completely restructured our utils modules.
Tons of changes.  Here's the summary of things that matter most:

* There is no more supybot.fix.
* There is no more supybot.webutils; now there is supybot.utils.web.
  * It's no longer webutils.WebError, but just utils.web.Error.
* You shouldn't import itertools, ideally, but instead import utils.iter.
* No more using imap/ifilter in commands unless absolutely necessary.  It's
  premature optimization and annoying.
* utils.str.format isn't quite ready yet, but will be soon.  That'll be the
  next big thing to fix in our code.
2005-01-27 06:59:08 +00:00
Jeremy Fincher 74b9a3c702 Moved eachSubstring to be a nested function; we don't use it anywhere else. 2005-01-26 14:41:42 +00:00
Jeremy Fincher 895cd3e48e Resurrected the test suite with the new supybot-test program and RCS. 2005-01-23 19:42:25 +00:00
Jeremy Fincher 3d3b1498fe Changed copyright years on test files 2005-01-24 21:27:34 +00:00
Jeremy Fincher 8ca625d339 Initial import. 2005-01-19 13:14:38 +00:00
James Vega dbfec8afb9 Add supybot module 2007-04-22 20:10:26 +00:00
Jeremy Fincher fdeae5c022 Better error-checking. 2005-01-13 17:48:47 +00:00
Jeremy Fincher 493aa57d8e Added a couple asserts. 2005-01-12 02:47:35 +00:00
Jeremy Fincher cc084d2535 Removed some XXXes and allowed other separators than /. 2004-12-16 09:22:39 +00:00
Jeremy Fincher 5d37d71afb Test is too tight, commented out until an appropriate test can be devised. 2004-12-16 09:18:36 +00:00
Jeremy Fincher 5466544350 Fix for a bug in the short timeElapsed. 2004-12-08 20:27:59 +00:00
Jeremy Fincher e4f15ae1b3 Cleaner implementation. 2004-12-08 07:45:24 +00:00
Jeremy Fincher 58b3268bdd Have exnToString handle exceptions whose str representation is empty. 2004-11-04 06:01:17 +00:00
James Vega 601d58a662 utils.quoted 2004-10-23 19:40:00 +00:00
James Vega 23397b44b4 Remove #! lines. 2004-09-20 15:25:47 +00:00
Jeremy Fincher ec55e86c61 Let's catch SyntaxError and turn it into an appropriate ValueError. 2004-08-25 05:17:37 +00:00
Jeremy Fincher fbb348b6e7 Copyright updates. Again, more is left to be done, but this is my part. 2004-08-23 13:14:06 +00:00
Jeremy Fincher 0f1842b18d Only do real variable names. 2004-08-21 02:57:47 +00:00
Jeremy Fincher f9c61271ea w00, less path mungingEXCLAIMEXCLAIM 2004-07-24 05:18:26 +00:00
James Vega 315810d08e yay! no more stray whitespace 2004-07-21 19:36:35 +00:00
James Vega 481dd5111a Add comma argument to commaAndify 2004-04-28 06:26:02 +00:00
Jeremy Fincher 48d6c982ce Made a SupyTestCase base class to handle COOL STUFF\! 2004-02-16 04:12:35 +00:00
Jeremy Fincher 9def8a49bd Hmm, didn't define keys. 2004-02-05 07:32:20 +00:00
Jeremy Fincher 6771c24ca6 Added InsensitivePreservingDict and made IrcDict a subclass of it. 2004-02-05 07:14:35 +00:00
Daniel DiPaolo 2c5e6163a0 This episode was brought to you by the letter 't' as in 'test'. More tests are
good.
2004-01-31 07:02:04 +00:00
Vincent Foley 3e2f3b7f77 Added tests to reflect the changes to pluralize() and depluralize() 2004-01-27 21:02:19 +00:00
Jeremy Fincher 29426e2f1d Moved isIP* to utils from ircutils. 2004-01-16 17:33:51 +00:00
Jeremy Fincher 4452ca879e Added functions for reading non-comment or empty lines of a file. 2004-01-11 14:33:38 +00:00
Jeremy Fincher 18b06dbb89 Fix for findBinaryInPath test. 2004-01-03 15:42:59 +00:00
Jeremy Fincher bcbfd2130e Made matchCase its own available function. 2004-01-01 19:47:13 +00:00
Jeremy Fincher 42ce8c33a6 Swapped the argument order for utils.{pluralize,nItems} 2003-12-12 15:41:33 +00:00
Jeremy Fincher 88581d99e4 Added utils.sorted. 2003-12-09 14:46:12 +00:00
Jeremy Fincher 2a9d9d1b5d Reworked so there's no double-import problem. 2003-12-02 12:27:45 +00:00
Jeremy Fincher fb2d9b7f4f Various re fixes, including bug #850931. 2003-12-01 11:06:17 +00:00