This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michal Plichta
Recipients Michal Plichta, docs@python
Date 2017-12-04.10:12:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512382347.58.0.213398074469.issue32212@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-12-04 10:12:27Michal Plichtasetrecipients: + Michal Plichta, docs@python
2017-12-04 10:12:27Michal Plichtasetmessageid: <1512382347.58.0.213398074469.issue32212@psf.upfronthosting.co.za>
2017-12-04 10:12:27Michal Plichtalinkissue32212 messages
2017-12-04 10:12:27Michal Plichtacreate