Jelle Zijlstra
0aa7138c4e
fixes to logging stubs ( #1302 )
...
Found with my stubcheck tool
2017-05-23 12:43:49 -07:00
amstree
028f2dd0a4
add captureWarnings to stdlib logging ( #1298 )
...
Fixes #1235
2017-05-22 15:57:40 -07:00
Jelle Zijlstra
8d1114c0c3
allow string levels in logging ( #1234 )
...
* allow string levels in logging
* remove redundant Union member
2017-05-10 07:09:08 -07:00
Jelle Zijlstra
84371e812c
add Optional to exc_info and extra in logging ( #1117 )
...
None is the default value for these two arguments to logging.Logger._log (which
most other stuff in logging delegates to).
I was getting errors in my codebase because mypy now distinguishes between Any
and Optional[Any].
2017-03-29 13:45:48 -07:00
Tim Abbott
1cc3489463
logging.makeRecord returns a LogRecord. ( #1100 )
2017-03-25 21:48:30 -07:00
Luka Sterbic
1a2381828e
Fix logging.Handler.format return type, should be str, not None ( #1076 )
2017-03-22 19:02:57 -07:00
Jelle Zijlstra
984307bf45
fix odd version comparisons ( #988 )
...
"> (3,)" works but looks like the code is checking for Python 4.
"<= (3, 5)" was intended to check for versions up to and including 3.5, and probably works that
way in current type checkers. However, sys.version_info is actually a 5-tuple that is greater
than (3, 5), so a hypothetical type checker that uses the full version info would interpret
this check incorrectly.
This ensures that all version_info comparisons use <, >=, ==, or !=.
2017-03-12 20:48:48 -07:00
Sebastian Meßmer
afde2fd234
Fix type stubs for logging ( #972 )
...
Add missing type for two parameters
2017-03-06 08:05:42 -08:00
Matthias Kramm
40754e312f
fix import error in logging/__init__.pyi
2017-01-31 14:54:18 -08:00
Lucas Wiman
225f302135
Address str/unicode issue with logging.getLogger. ( #883 )
...
Fixes #843 .
2017-01-29 11:40:20 -08:00
Lukasz Langa
c0c982ada5
Add missing Dict imports.
2016-12-21 01:15:26 -08:00
Lukasz Langa
5f416fae64
Add missing List imports.
2016-12-21 01:06:52 -08:00
Lukasz Langa
6eb97964fd
Fixing flake8 E401, E402 errors
2016-12-20 00:47:51 -08:00
Lukasz Langa
147772950f
Fixing flake8 E265 errors
2016-12-20 00:16:44 -08:00
Lukasz Langa
5b6a9937b2
Fixing flake8 E266 errors
2016-12-20 00:06:36 -08:00
Lukasz Langa
fe0e3744cc
Fixing flake8 E261 errors
2016-12-19 22:09:35 -08:00
Matthias Kramm
7e6000949e
it's threading.Lock, not threading.LockType
2016-12-12 12:02:01 -08:00
Matthias Kramm
ac97b22365
add missing Ellipsis
2016-12-12 12:02:01 -08:00
Matthias Kramm
8a5447be05
add 'Handler' and 'Filterer' classes to logging
2016-12-12 12:02:01 -08:00
Lukasz Langa
d1081b94ee
[logging] Fix forward references
2016-11-30 10:48:10 -08:00
Łukasz Langa
85807ed72a
logging.Formatter attributes fixed ( #721 )
...
Fixes #720 .
Related changes: used a NamedTuple for time.struct_time on Python 3, used
sys.version selectors for proper typing of #716 , added missing *Style classes
to logging on Python 3.
2016-11-30 09:09:05 -08:00
Peter Amstutz
d0f6a05793
Fix logging.Logger.isEnabledFor() to return bool instead of None.
2016-11-28 13:46:40 -08:00
Naomi Seyfer
c134fe7638
handlers should be an optional argument of logging.basicConfig() (#704 )
2016-11-24 09:21:10 +00:00
Matthias Kramm
ccd1dc1fac
fix 2.7 version of Logger.debug ( #578 )
2016-09-29 12:02:12 -07:00
Alvaro Caceres
0321b2179b
Declare logging.root -- undocumented but used. ( #534 )
2016-09-12 10:21:16 -07:00
Tyler O'Meara
1bb090d6f8
Adds logging PlaceHolder class and Logger attributes ( #472 )
...
Adds several attributes which were missing from the Logger types,
including "name", "level", and "parent". Because the type of "parent"
is a union of Logger and PlaceHolder, we also define types for
PlaceHolder and all of it's methods.
2016-08-15 11:42:02 -07:00
Valérian Rousset
6c6f5f19da
apply conditionals ( #417 )
2016-07-29 05:59:26 -07:00
Guido van Rossum
39325bf159
Mypy now supports sys.platform and sys.version_info checks ( #410 )
2016-07-27 13:25:29 -07:00
alvarocaceres
f7b35bc8be
Remove line continuations to help pytype parse ( #390 )
2016-07-22 10:55:42 -07:00
Jukka Lehtosalo
e05edb60f1
Mypy stub fixes for strict optional mode ( #366 )
2016-07-13 09:38:40 -07:00
Guido van Rossum
8ee3123e02
Fix log() signatures; change msg: str to msg: Text.
2016-06-05 17:25:56 -07:00
Guido van Rossum
d75e2ab224
Add logging.WARN; TextIO -> IO[str].
2016-06-05 17:10:15 -07:00
Valérian Rousset
a581397c42
add types to logging ( #247 )
2016-06-04 19:20:15 -07:00