jesopo
|
4936b91273
|
Support JSON messages tags, as per IRCv'3 message-tags-0.3 #318 pull request
|
2018-11-05 15:15:08 +00:00 |
|
jesopo
|
7cc6b559be
|
Clarify items and var_items typing in src.utils.parse
|
2018-11-05 11:56:52 +00:00 |
|
jesopo
|
9c233cd4dd
|
Add src.utils.parse.keyvalue, mostly for IRCv3 CAP negotiation
|
2018-11-05 11:56:28 +00:00 |
|
jesopo
|
66ee3ce5f1
|
Add __repr__ to utils.irc.IRCArgs
|
2018-11-05 10:03:20 +00:00 |
|
jesopo
|
c1e9825a33
|
Don't set args to a split of the data left over when parsing out a command if
there's not a space after the command
|
2018-11-04 17:23:34 +00:00 |
|
jesopo
|
1610cfb499
|
Implement utils.irc.IRCArgs.__len__
|
2018-11-04 17:06:50 +00:00 |
|
jesopo
|
b8e3cdb075
|
Fix typo in utils.irc, 'self_args' -> 'self._args'
|
2018-11-04 17:04:16 +00:00 |
|
jesopo
|
52aa8a51a6
|
Move definition of IRCArgs above IRCLine
|
2018-11-04 17:03:01 +00:00 |
|
jesopo
|
e1d261bda0
|
Fix typo in utils.irc
|
2018-11-04 17:01:50 +00:00 |
|
jesopo
|
58363895f1
|
Change line parsing to put arbitrary-length args on the end of
`args` so we can get rid of `last`/`arbitrary` and add IRCArgs (with .get())
to help only getting an arg index if it exists
|
2018-11-04 15:37:06 +00:00 |
|
jesopo
|
9fe7815c17
|
utils.irc.color should take int for foreground/background, not str
|
2018-11-02 13:14:42 +00:00 |
|
jesopo
|
a4d8d1f855
|
Fix some non-explicit None returns, add type hints to important variables
|
2018-10-31 15:12:46 +00:00 |
|
jesopo
|
b543e31cd2
|
Fix/refactor issues brought up by type hint linting
|
2018-10-30 17:49:35 +00:00 |
|
jesopo
|
e07553c362
|
Add type/return hints throughout src/ and, in doing so, fix some cyclical
references.
|
2018-10-30 14:58:48 +00:00 |
|
jesopo
|
50e7aa40b9
|
Typo in utils.parse_docstring, 'multiple_items' -> 'var_items'
|
2018-10-28 11:53:44 +00:00 |
|
jesopo
|
857761a653
|
Support multiple items for docstring kwargs in utils.parse_docstring
|
2018-10-28 11:43:41 +00:00 |
|
jesopo
|
d3231e3282
|
signal.signal timer callback takes 2 args
|
2018-10-25 14:09:19 +01:00 |
|
jesopo
|
8ea6db9422
|
Standardise "Failed to load results" errors!
|
2018-10-20 20:53:24 +01:00 |
|
jesopo
|
ba3cd00c78
|
Add utils.EventError, utilise it for stderr in commands.py/coins.py
|
2018-10-16 14:47:01 +01:00 |
|
jesopo
|
d460375629
|
Use decimal.Decimal in utils.parse_number
|
2018-10-12 11:28:14 +01:00 |
|
jesopo
|
d427e29936
|
Actually pass format args to ValueErrors in utils.parse_number
|
2018-10-12 11:21:57 +01:00 |
|
jesopo
|
a810d273d1
|
int(number) after we've checked .isdigit() in utils.parse_number
|
2018-10-12 11:19:04 +01:00 |
|
jesopo
|
9771fc9f7a
|
Add utils.parse_number, to turn 1k/1m/1b in to 1_000/1_000_000/1_000_000_000
|
2018-10-12 11:16:39 +01:00 |
|
jesopo
|
c655668bbe
|
Add fallback_encoding to utils.http.get_url, in case a page has no implicit
encoding
|
2018-10-10 23:49:59 +01:00 |
|
jesopo
|
f286f3bf48
|
.decode data prior to json.loads in utils.http.get_url
|
2018-10-10 15:25:08 +01:00 |
|
jesopo
|
951c315cec
|
Fix syntax error for throwing a timeout when signal.alarm fires
|
2018-10-10 15:07:04 +01:00 |
|
jesopo
|
015fa8ddff
|
.decode plaintext returns from utils.http.get_url
|
2018-10-10 15:06:30 +01:00 |
|
jesopo
|
5b9ffe013d
|
Use signal.alarm to Deadline utils.http.get_url and throw useful exceptions
|
2018-10-10 14:25:44 +01:00 |
|
jesopo
|
be75f72356
|
Set a max size of 100mb for utils.http.get_url
|
2018-10-10 14:05:15 +01:00 |
|
jesopo
|
68f5626189
|
Change utils.http to use requests
|
2018-10-10 13:41:58 +01:00 |
|
jesopo
|
c28a41ad21
|
Remove debug print in src.utils.http
|
2018-10-09 22:39:34 +01:00 |
|
jesopo
|
f69a1ce7c1
|
Return response code from utils.http.get_url when code=True and soup=True
|
2018-10-09 22:16:04 +01:00 |
|
jesopo
|
383767c7fb
|
Support post_data in utils.http.get_url
|
2018-10-08 12:43:31 +01:00 |
|
jesopo
|
681866339c
|
Support multiple types of comments in utils.get_hashflags
|
2018-10-07 11:24:13 +01:00 |
|
jesopo
|
096fd05cee
|
Typo in utils, 'line.replace[3:]' -> 'line[3:]'
|
2018-10-04 16:01:34 +01:00 |
|
jesopo
|
f2d9ff9d3b
|
Checking for the presence of the seperator in the return from .partition is a
more "correct" way of doing this
|
2018-10-04 15:27:52 +01:00 |
|
jesopo
|
feed251f82
|
Non-present hashflag values should be None, not empty string
|
2018-10-04 15:23:35 +01:00 |
|
jesopo
|
8d3255c46d
|
Simplify hashflag parsing
|
2018-10-04 15:22:09 +01:00 |
|
jesopo
|
75f25db4cd
|
Move 'top 10' logic to utils, add !wordiest to modules/words.py
|
2018-10-04 05:33:15 +01:00 |
|
jesopo
|
6c1ac52fde
|
Use docstring key, not value, as a key.
|
2018-10-03 16:00:53 +01:00 |
|
jesopo
|
69d58eede2
|
Move src/Utils.py in to src/utils/, splitting functionality out in to modules of
related functionality
|
2018-10-03 13:22:37 +01:00 |
|