Message307547
my code:
logger = logging.getLogger(name)
logger.setLevel(level=logging.DEBUG)
...
stream_handler = logging.StreamHandler(stream=stdout)
stream_handler.setLevel(logging_level)
stream_handler.setFormatter(fmt=formatter)
and mypy-0.550 complains about fmt vs. form parameter in setFormatter method and level vs. lvl in setLevel method.
ta_cc/cc_logger.py: note: In function "_get_stream_handler":
ta_cc/cc_logger.py:34: error: Unexpected keyword argument "fmt" for "setFormatter" of "Handler"
/usr/local/lib/mypy/typeshed/stdlib/2and3/logging/__init__.pyi:147: note: "setFormatter" of "Handler" defined here
ta_cc/cc_logger.py:109: error: Unexpected keyword argument "level" for "setLevel" of "Logger"
/usr/local/lib/mypy/typeshed/stdlib/2and3/logging/__init__.pyi:46: note: "setLevel" of "Logger" defined here
I see in online documentation that indeed there are lvl and form parameters for all 2.7, 3.5 and 3.6 python version. However my Pycharm suggest level and fmt for all my installed python interpreters.
I use:
Pycharm-2017.3
Python 2.7.12
Python 3.5.2
Python 3.6.3
This is copy of my issue of: https://github.com/python/typeshed/issues/1619 |
|
Date |
User |
Action |
Args |
2017-12-04 10:12:27 | Michal Plichta | set | recipients:
+ Michal Plichta, docs@python |
2017-12-04 10:12:27 | Michal Plichta | set | messageid: <1512382347.58.0.213398074469.issue32212@psf.upfronthosting.co.za> |
2017-12-04 10:12:27 | Michal Plichta | link | issue32212 messages |
2017-12-04 10:12:27 | Michal Plichta | create | |
|